Skip to content

fabioscmelo/Compiladores_java_2019

Repository files navigation

Compilador

Trabalho de compiladores PUC-MG desenvolvido em Java.

Grupo:

Fabio Melo

Gustavo Lescowicz Kotarsky

Parte Valor Nota
Analise Léxica/Sintática 10 10
Analise Semântica 20 20

Automato:

Gramática:

  • S-> {D}+ main {C}+end

  • D-> (integer | boolean | byte | string) id [= [-]v_const] {,id [= [-]v_const]}; | const id = [-]v_const;

  • C-> id = EXP;| while ‘(‘ EXP ’)’ W | if ‘(‘EXP’)’ then ( C [else (W) ] | begin {C} end [else (W) ] ) | ; | readln’(‘ id ’)’; | (write | writeln)’(‘ EXP{,EXP} ’)’;

  • W-> begin {C} end | C

  • EXP-> EXPS [(==|!=|<|>|<=|>=) EXPS]

  • EXPS-> [+|-] T {(+|-|or) T}

  • T-> F {(*|and|/) F}

  • F-> ‘(‘ EXP ’)’| id | v_const | not F

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages