Re: Reading parser stack

2009-04-29 Thread Philip Herron
#x27;ve red something about yylval, so if I type in Lex file: >> yylval=yytext, >> and so the same your rule shows me >> "The identifier was: snoopy*charlie", and not only "snoopy". >> >> What do you thing about this behaviour? >> >> >> 2009/4/29 Mike A

Re: Reading parser stack

2009-04-29 Thread Mike Aubury
snoopy*charlie", and not only "snoopy". > > What do you thing about this behaviour? > > > 2009/4/29 Mike Aubury > > > Something like : > > > > > > A: B C D { > > printf("The identifier was: %s", $2); > > } > &

Re: Reading parser stack

2009-04-29 Thread Mark Redd
The identifier was: %s", $2); > } > | B E D { > printf("It wasn't an identifier..."); > } > ; > > > > > > 2009/4/29 Mark Redd > >> Hello everybody, >> I would like to receive an hint about reading parser stack. >>

Re: Reading parser stack

2009-04-29 Thread Mike Aubury
Something like : A: B C D { printf("The identifier was: %s", $2); } | B E D { printf("It wasn't an identifier..."); } ; 2009/4/29 Mark Redd > Hello everybody, > I would like to receive an hint about reading parser stack. > > Suppo

Reading parser stack

2009-04-29 Thread Mark Redd
Hello everybody, I would like to receive an hint about reading parser stack. Suppose my (fantasy) bison grammar is this: %start A A : B C D | B E D B: ID C: '*' D: IDENTIFIER E: '-' where IDENTIFIER has been defined like [a-zA-Z0-9]+ using flex. How can I print "the