|functional script-language - references ? email@example.com (Steve Simon) (2002-05-12)|
|From:||"Steve Simon" <firstname.lastname@example.org>|
|Date:||12 May 2002 00:08:32 -0400|
|Organization:||ntlworld News Service|
|Posted-Date:||12 May 2002 00:08:32 EDT|
I am trying to write a little bit of lex & yacc to parse
simple expressions eg:
output = (input1 + input2 ) * input3
Into a set of calls to setup a process network in the form of a unix
I can cope with the Unix systemcall part, I have a fair (but not
extensive) knowledge of lex and yacc and have got as far as parsing
the input data into a parse tree. I can then taverse this to produce
infix or postfix forms of the expression (first year undergrad
problem, I know :-)
How to go about modifying this to produce a set of processes connected by
pipes is where I'am stuck.
I hope to go on eventually to optimising the parse tree, first to
remove constant expressions, and then to implement super-operators (eg
add,mul,add) processes that can combine several simple processes into
a single heavier weight one - to try to prevent the task switching and
buffering overhead from dominanting the real-work CPU time.
Sorry if this is a dumb question and everyone here finds it simple but
I'am an electronics major and so some simple computer science concepts
(parsing) are a bit beyond me...
Any help, references, sourcecode examples etc greatfully received.
-Steve Steve DOT Simon AT ntlworld DOT com
Return to the
Search the comp.compilers archives again.