|Newbie Q - Grammer rules for parsing HEX string in BISON email@example.com (2004-08-23)|
|Re: Newbie Q - Grammer rules for parsing HEX string in BISON firstname.lastname@example.org (2004-08-25)|
|Re: Newbie Q - Grammer rules for parsing HEX string in BISON email@example.com (2004-09-03)|
|Date:||3 Sep 2004 12:38:37 -0400|
|Organization:||AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com|
|Posted-Date:||03 Sep 2004 12:38:37 EDT|
firstname.lastname@example.org (Space Monkey) schreibt:
>I should have added that the desired outcome is to populate the
>contents of a binary file using instructions contained in a separate
In that simple case I'd handcraft the appropriate code.
>I am a complete novice on YACC and BISON and any help with the grammar
>rules for the parsing the hexadecimal list in the above example is
If you want to learn more about YACC and BISON, then have a look at a C like
grammar (you'll not need a full C/C++ grammar). The semantic code may be
simple, depending on the "commands" in your text file. For your example you can
use a global variable for the memory address, where every parsed number is to
be stored, and afterwards the address has to be incremented (*addr++ = nmbr;).
Return to the
Search the comp.compilers archives again.