Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Newbie Q - Grammer rules for parsing HEX string in BISON
Hi,
I am new to BISON and am trying to setup the grammer rules for parsing
a hex string in BISON.

I am using the mfcalc example at
http://dinosaur.compilertools.net/bison/bison_5.html and trying to
parse a file containing strings such as,

DEFINE	Key1	0x01C8

and

SET Key1  0xAC,0xE5,0x31,0x2A,0x4C,0x1D,0x56,0xEA,
0x33,0xE9,0x2E,0x14,0xA2,0x
FA,0x4A,0x18

Can anyone help with the grammar?

thanks
SM

Report this thread to moderator Post Follow-up to this message
Old Post
Space Monkey
08-23-04 09:02 PM


Re: Newbie Q - Grammer rules for parsing HEX string in BISON
spacemonkeyxyz-google@yahoo.co.uk (Space Monkey) wrote
> I am new to BISON and am trying to setup the grammer rules for parsing
> a hex string in BISON.
>
> I am using the mfcalc example at
> http://dinosaur.compilertools.net/bison/bison_5.html and trying to
> parse a file containing strings such as,
>
> DEFINE	Key1	0x01C8
>
> and
>
> SET Key1  0xAC,0xE5,0x31,0x2A,0x4C,0x1D,0x56,0xEA,
0x33,0xE9,0x2E,0x14,0xA2,
0xFA,0x4A,0x18
>
> Can anyone help with the grammar?
>
> thanks

I should have added that the desired outcome is to populate the
contents of a binary file using instructions contained in a separate
text file.

For example, if I have a file test.bin, using the data in the above
email, I want to populate the file at location 0x01C8 (address Key1)
with the data 0xAC,0xE5 ..., according to the SET Key1 instruction.

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
appreciated.

Report this thread to moderator Post Follow-up to this message
Old Post
Space Monkey
08-25-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Compilers archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:41 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.