|implementing I/O functions using Lex and Yacc firstname.lastname@example.org (Raghavendra R) (2007-02-25)|
|From:||"Raghavendra R" <email@example.com>|
|Date:||25 Feb 2007 13:22:47 -0500|
|Keywords:||parse, question, comment|
|Posted-Date:||25 Feb 2007 13:22:47 EST|
I am building an interpreter specific to the EMC test-benches using
Labwindows environment. I have added new functionalities to the famous
Calc code from the Lex and Yacc of John Levine. Now the interpreter
can implement control function(if then else..) and simple loop
instruction(for, while, until ...) also some functions specific to
the Labwindows. Now I want to implement I/O functions i.e. the
interpreter should read and write to file from the input file.
I am not able to go about this problem, can you please suggest me some
pointers or hints in solving this problem.
[There's no magic, you add the syntax to the parser, generate some
code that probably calls your I/O library, write your I/O library, and
debug it all. At this point you should be asking yourself why you are
writing yet another extension language rather an using Lua, Python,
TCL, or any of several other embeddable interpretive languages that
already work. -John]
Return to the
Search the comp.compilers archives again.