compiler construction - Ambiguous grammar in parse phase -


i want build compiler own language, wrote grammar , finished lexer phase question in parse phase part of ebnf grammer

       statement      →     block | assignment | callstatement | declaration |                              inputstatement |outputstatement | ifstatement | whilestatement         callstatement  →     identifier { /[expression/] }  {. identifier } /( arguments /)         lefthand       →     identifier { /[expression/] }  {. identifier { /[expression/] } } 

i use recursive descent parser method , problem distinguish between callstatement , lefthand ,how should solve ,i apologize if can't explain idea :(


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -