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

objective c - Can't build GCM with Protobuf in Xcode -

ember.js - EmberJS Model find not up-to-date with underlying store -

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