[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting [1,1] expecting: EOF no matter what



Hi Jorge,

That's normal!  "if" is recognized as a TIf token.  Now, your grammar
does not accept statements, as it is written.  You should probably
modify it to accept not only declarations, but also statements.  For
example:

...
Productions
  programa =
    lista_decl lista_instr;  // I have added lista_instr !
...


So, it's all behaving as expected.  :-)

Have fun!

Etienne

Jorge Mario G. Mazo wrote:
>... 
> but when I put an "if" it fails again... :(

-- 
Etienne M. Gagnon, Ph.D.            http://www.info2.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/

Attachment: signature.asc
Description: OpenPGP digital signature