That most definitely worked !!! Thanks a ton...
-Rajat...
User Profile
Collapse
-
yeah it has to be lex/yacc to fit in with the rest of the software my colleague is developing. you are correct perl would be definitely the easier way yo to do...but we have legacy code that is hooked into the lex/yacc structure....Leave a comment:
-
=============== =============== =============== ===========
Hi weaknessforcats ,
Many thanks for your reply. Unfortunately while the fscanf works very reliably, this parser is going to have to grow to support additional ( optional ) parameters on a per line basis ( or even multiline )and needs to be written using lex/yacc.
Can you unzip the archive that I have attached the source files are in there for you to take a look at ???...Leave a comment:
-
parsing problem with lex/yacc - yylval returns unintended value for $1
Hi Folks,
I am writing a simple parser to parse SPICE code ( Spice is a transistor level simulator ). The spice code looks like this -
=============== =========
R10 2 3 0.5e-3
C11 4 6 0.2e-6
L13 4 4 0.1e-9
=============== ==========
As you can see each line has 4 items -
a character string followed by an integer then another integer and finally a floating point number.
I need to return... -
parsing problem with lex/yacc - yylval returns unintended value for $1
Hi Folks,
I am writing a simple parser to parse SPICE code ( Spice is a transistor level simulator ). The spice code looks like this -
=============== =========
R10 2 3 0.5e-3
C11 4 6 0.2e-6
L13 4 4 0.1e-9
=============== ==========
As you can see each line has 4 items -
a character string followed by an integer then another integer and finally a floating point number.
I need to return...
No activity results to display
Show More
Leave a comment: