Re: [SOLVED with questions] Identifying start of new rule

2013-06-16 Thread Chris verBurg
On Sun, Jun 16, 2013 at 10:17 AM, Test User wrote: > A new grammar in combination with %glr-parser worked. > Woot! Question: > > (1)I understand that if I have a file of the form: > ::= ::= , bison parses my rules by default > as ( ::= ) ::= and generates a syntax error > when it reaches

Re: [SOLVED with questions] Identifying start of new rule

2013-06-16 Thread Test User
A new grammar in combination with %glr-parser worked. %{ #include #include extern int yylex(); extern int yyparse(); extern FILE *yyin; void yyerror(const char *s); %} %union { char cval; int ival; float fval; char *sval; } /* define the "terminal symbol" token types */ ... %

Re: Identifying start of new rule

2013-06-16 Thread Test User
On Sun, Jun 16, 2013 at 1:29 AM, wrote: > 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? No, I w

Re: Identifying start of new rule

2013-06-16 Thread Test User
On Sat, Jun 15, 2013 at 11:19 PM, Chris verBurg wrote: > 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. :) Yes, it's the snazzle tutorial. I d