Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %baseclass-preinclude <iostream>
- %lsp-needed
- %token NUMBER;
- %token KETTOSPONT;
- %token COMMENT;
- %token DOT;
- %token COMMA;
- %left LESS;
- %left MORE;
- %left EQUAL;
- %left OR;
- %left AND;
- %left DIVIDE;
- %left MOD;
- %token NOT;
- %token KEYWORD;
- %token I_TYPE;
- %token B_TYPE;
- %token B_TYPE;
- %token VARIABLE;
- %token DATA;
- %token TYPE;
- %token PROGRAM;
- %token ADD;
- %token MOVE;
- %token READ;
- %token WRITE;
- %token TO;
- %token WHILE;
- %token ENDWHILE;
- %token IF;
- %token ENDIF;
- %token TRUE;
- %token FALSE;
- %token MORE;
- %token SUBTRACT;
- %token MULTIPLY;
- %token FROM;
- %token BY;
- %%
- start:
- INT MAIN NYITOZAROJEL CSUKOZAROJEL NYITOKAPOCS deklaraciok utasitasok ZAROKAPOCS
- {
- std::cout<<"S-> INT MAIN NYITOZAROJEL CSUKOZAROJEL NYITOKAPOCS deklaraciok utasitasok ZAROKAPOCS"<<std::endl;
- }
- ;
- deklaraciok:
- // epszilon
- {
- std::cout<<"deklaraciok->epszilon"<<std::endl;
- }
- |
- deklaracio deklaraciok
- {
- std::cout<<"deklaraciok->deklaracio deklaraciok"<<std::endl;
- }
- ;
- deklaracio:
- UNSIGNED AZONOSITO PONTOSVESSZO
- {
- std::cout<<"deklaracio -> UNSIGNED AZONOSITO PONTOSVESSZO"<<std::endl;
- }
- |
- BOOL AZONOSITO PONTOSVESSZO
- {
- std::cout<<"deklaracio -> BOOL AZONOSITO PONTOSVESSZO "<<std::endl;
- }
- ;
- utasitasok:
- utasitas
- {
- std::cout<<"utasitasok->utasitas "<<std::endl;
- }
- |
- utasitas utasitasok
- {
- std::cout<<"utasitasok->utasitas utasitasok"<<std::endl;
- }
- ;
- utasitas:
- CIN BEOLVASAS kifejezes PONTOSVESSZO
- {
- std::cout<<"utasitas ->CIN BEOLVASAS kifejezes PONTOSVESSZO"<<std::endl;
- }
- |
- AZONOSITO ERTEKADAS kifejezes PONTOSVESSZO
- {
- std::cout<<"utasitas ->AZONOSITO ERTEKADAS kifejezes PONTOSVESSZO"<<std::endl;
- }
- |
- COUT KIIRAS kifejezes PONTOSVESSZO
- {
- std::cout<<"utasitas ->COUT KIIRAS kifejezes PONTOSVESSZO"<<std::endl;
- }
- |
- elagazas
- {
- std::cout<<"utasitas ->elagazas"<<std::endl;
- }
- |
- ciklus
- {
- std::cout<<"utasitas ->ciklus"<<std::endl;
- }
- ;
- ciklus:
- while_cikl
- {
- std::cout<<"ciklus->while_cikl"<<std::endl;
- }
- ;
- while_cikl:
- WHILE NYITOZAROJEL kifejezes CSUKOZAROJEL NYITOKAPOCS utasitasok ZAROKAPOCS
- {
- std::cout<<"while_cikl->WHILE NYITOZAROJEL kifejezes CSUKOZAROJEL NYITOKAPOCS utasitasok ZAROKAPOCS"<<std::endl;
- }
- ;
- elagazas:
- IF NYITOZAROJEL kifejezes CSUKOZAROJEL NYITOKAPOCS utasitasok ZAROKAPOCS
- {
- std::cout<<"elagazas->IF NYITOZAROJEL kifejezes CSUKOZAROJEL NYITOKAPOCS utasitasok ZAROKAPOCS"<<std::endl;
- }
- |
- IF NYITOZAROJEL kifejezes CSUKOZAROJEL NYITOKAPOCS utasitasok ZAROKAPOCS ELSE NYITOKAPOCS utasitasok ZAROKAPOCS
- {
- std::cout<<"elagazas->IF NYITOZAROJEL kifejezes CSUKOZAROJEL NYITOKAPOCS utasitasok ZAROKAPOCS ELSE NYITOKAPOCS utasitasok ZAROKAPOCS"<<std::endl;
- }
- ;
- kifejezes:
- SZAM
- {
- std::cout<<"kifejezes->SZAM"<<std::endl;
- }
- |
- TRUE
- {
- std::cout<<"kifejezes->TRUE"<<std::endl;
- }
- |
- FALSE
- {
- std::cout<<"kifejezes->FALSE"<<std::endl;
- }
- |
- AZONOSITO
- {
- std::cout<<"kifejezes->AZONOSITO"<<std::endl;
- }
- |
- kifejezes PLUS kifejezes
- {
- std::cout<<"kifejezes->kifejezes PLUS kifejezes"<<std::endl;
- }
- |
- kifejezes MINUS kifejezes
- {
- std::cout<<"kifejezes->kifejezes MINUS kifejezes"<<std::endl;
- }
- |
- kifejezes SZORZAS kifejezes
- {
- std::cout<<"kifejezes->kifejezes SZORZAS kifejezes"<<std::endl;
- }
- |
- kifejezes OSZTAS kifejezes
- {
- std::cout<<"kifejezes->kifejezes OSZTAS kifejezes"<<std::endl;
- }
- |
- kifejezes MARADEKKEPZES kifejezes
- {
- std::cout<<"kifejezes->kifejezes MARADEKKEPZES kifejezes"<<std::endl;
- }
- |
- kifejezes EGYENLOSEG kifejezes
- {
- std::cout<<"kifejezes->kifejezes EGYENLOSEG kifejezes"<<std::endl;
- }
- |
- kifejezes KISEBB kifejezes
- {
- std::cout<<"kifejezes->kifejezes KISEBB kifejezes"<<std::endl;
- }
- |
- kifejezes NAGYOBB kifejezes
- {
- std::cout<<"kifejezes->kifejezes NAGYOBB kifejezes"<<std::endl;
- }
- |
- kifejezes KONJUNKCIO kifejezes
- {
- std::cout<<"kifejezes->kifejezes KONJUNKCIO kifejezes"<<std::endl;
- }
- |
- kifejezes DISZJUNKCIO kifejezes
- {
- std::cout<<"kifejezes->kifejezes DISZJUNKCIO kifejezes"<<std::endl;
- }
- |
- NEGACIO kifejezes
- {
- std::cout<<"kifejezes->NEGACIO kifejezes"<<std::endl;
- }
- |
- kifejezes NAGYOBBEGYENLO kifejezes
- {
- std::cout<<"kifejezes->kifejezes NAGYOBBEGYENLO kifejezes"<<std::endl;
- }
- |
- kifejezes KISEBBEGYENLO kifejezes
- {
- std::cout<<"kifejezes->kifejezes KISEBBEGYENLO kifejezes"<<std::endl;
- }
- |
- NYITOZAROJEL kifejezes CSUKOZAROJEL
- {
- std::cout<<"kifejezes->NYITOZAROJEL kifejezes CSUKO"<<std::endl;
- }
- |
- NYITOKAPOCS kifejezes ZAROKAPOCS
- {
- std::cout<<"kifejezes->NYITOKAPOCS kifejezes ZAROKAPOCS"<<std::endl;
- }
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement