[fpc-pascal] Customizing tply

Agustin Barto abarto at gmail.com
Thu Dec 9 23:13:34 CET 2004


After some work I was able to translate my parser's grammar from
Coco/R to Lex/Yacc. It wasn't easy and I hate to loose the more
"functional" aspects of Coco/R, but at least my project can compile
both on Windows (with Delphi) and Linux (with fpc) (at least the
non-UI parts).

When I started to modify lexlib to work with streams instead of just
files (I have to parse stuff that could be on memory) I dicovered some
new issues:

* How can I use standard input/ouput with streams?
* Is there an easy way to do a ReadLn (or similar) with streams? The
idea is instead of rewriting the lexlib io functions, I replace the
standard io functions like Eof, ReadLn, Write and WriteLn. My initial
idea was to read the whole stream on a TStrings, but that could waste
a lot of memory.

Thanks in advance,
Agustin




More information about the fpc-pascal mailing list