|help_needed in bison/yacc email@example.com (vicky) (2005-05-02)|
|Re: help_needed in bison/yacc Meyer-Eltz@t-online.de (Detlef Meyer-Eltz) (2005-05-02)|
|Re: help_needed in bison/yacc Brian.Inglis@SystematicSW.ab.ca (Brian Inglis) (2005-05-06)|
|Re: help_needed in bison/yacc firstname.lastname@example.org (Clint Olsen) (2005-06-10)|
|Date:||2 May 2005 14:28:24 -0400|
|Posted-Date:||02 May 2005 14:28:24 EDT|
my input is verilog code, and i need to convert turnary expressions
into if-else statements.
please tell me if it is possible using Flex/Bison (i.e. pls tell me
how to create interperter using flex/bison).
All i wanted to say is, i don't want to take pain for writing grammer
for whole verilog code. i just want to make changes in turnary
expression. i.e. want a small script to change turnary expression into
if-else statement. pls help.
Thanks in Advance.
[If you don't want to parse the entire program, I'd suggest a kludge
that uses regular expressions to match something like ( .* ? .* : .* )
or whatever the syntax is and then spits out the corresponding
if/then/else. My experience suggests that if you want to do a complete
job, you'll end up having to parse the whole language, but if you're willing
to have it give up on the hardest ones and leave them for hand repair,
the kludge works pretty well. -John]
Return to the
Search the comp.compilers archives again.