I am using jison and I saw the documentation of ebnf grammars but I can't make my grammar works: Here are the images of my grammar, input and error In the error, the grammar is recognizing just one line but kleen star should recognize 0 to several instances. I am new in jison so maybe the way to use ebnf is not as i'm doing it, if you can help i'd be so grateful
The minimal complete version of my grammar:
METODO
: 'void' id '(' ')' '{' INSTR '}'
;
INSTR
: INSTRUCCION*
;
INSTRUCCION
: IF
| id '=' EXP ';'
| id ':' INSTR
;
Input:
void metodo_1(){
t2 = p + 1;
l2:
t6 = heap[t4];
print("%c", t6);
t5 = t5 + 1;
if t6 != 0 goto l2;
l0: }
Error: Error
I added %ebnf
at the beginning of my parser