Re: Identifying start of new rule

2013-06-15 Thread Ron Burk
If I've understood correct, two points come to mind: a) exp : exp exp | ... Seems highly ambiguous for no good reason. BTW, did you really want to exclude the possibility of productions that have only one symbol on the right-hand side? Not sure why you wouldn't use very standard/common constructs

Re: Identifying start of new rule

2013-06-15 Thread Chris verBurg
Dear Test, I have to start by saying I got a giggle out of your yyerror function, because I saw the "EEK" and figured out it was my tutorial you read through. Awesome! Glad it's still useful. :) I think the core of your problem is this rule: ::= which essentially turns into an arbitrar

Identifying start of new rule

2013-06-15 Thread Test User
Hello All, I am trying to parse an arbitrary BNF file. My simple test file test.txt file contains: ::= PROCEDURE ::= BEGIN END ::= PRINT "hello world" In this grammar upper-case strings and strings in double-quotes are terminal symbols. Lower-case strings in angle brackets are non-terminal