help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

The Bison Manual Example Infix Calculator


From: Donges, William E.,, III
Subject: The Bison Manual Example Infix Calculator
Date: Fri, 2 Aug 2002 04:05:39 -0400

At 4:00 am in the morning on August 2nd after searching google and 100 other 
places to no avail, then using geocrawler to go through the gnu archives and 
somehow not finding the help-bison mailing list a search, I no longer know 
which one. Led me to this mailing list.

I am working with the infix calculator example in the bison manual and would 
like to alter it slightly to read its input from a c-string rather than from 
stdin. It seems to me that this should be a straight forward operation but 
nothing in the bison manual seems to cover this. What changes should be made to 
the yylex function or to the calc.y file in general to parse from a passed 
buffer rather then from stdin. 

Can this be done without implementing the calculator in lex as well the I tied 
to add the yy_scan_string function directly to the main in the example but of 
course I got many undefined references as a result. I am completely unfamilliar 
with Flex and its documentation seems far less comprehensible then bison's what 
should the calc.l file look like if I do have to rewrite it...

Many questions I know but I do not even know where to begin and the more I read 
the documentation available online the bigger my headache becomes.

Thanks in Advance,
William Donges



reply via email to

[Prev in Thread] Current Thread [Next in Thread]