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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -