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
Post a Comment