According to Orlando Llanes:
I want to include a script interpreter into my game programming lib which will compile the plain-text script source into a platform independant virtual machine, I also want to write the interpreter using OOP, so I don't know if Lex/Yacc will help with this
Lex/Yacc (Flex/Bison) are designed to generate C code, AFAIK. If you want to use it with Pascal, you can either just write Pascal code between the {...} and translate the remaining parts of the generated file somehow, or you can write a C wrapper that calls Pascal procedures which in turn do the real work.
Having solved these problems, it's your decision whether you want to use OOP or not. I recommand to do so; GPC's parser itself - while written in C, not C++ - uses kind of objects ("tree nodes").
(BTW, does anyone know where I can find Lex/Yacc for Pascal that allows *commercial* use? Lex/Yacc itself won't be part of the libs, but the code it generates will),
Recent versions of Bison have more relaxed license conditions that allow the generated source to be used in non-free programs, so this should be no problem.
The main things I'm confused about is about everything, the syntax checking phase (scanning?), parsing, and executing.
I am not an expert, but AFAIK, "scanning" means to split the input into its atoms, the "tokens", "parsing" means to check the syntax rules and to "understand" the input, and if you write an interpreter, the execution of your input will be in the parsing stage.
Hope this helps,
Peter -- Peter Gerwinski, Essen, Germany, free physicist and programmer Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - 1 Oct 1997 PGP key fingerprint: AC 6C 94 45 BE 28 A4 96 0E CC E9 12 47 25 82 75 Fight the SPAM! http://maps.vix.com/