Re: [fpc-pascal] Customizing tply

2004-12-15 Thread Agustin Barto
Success!!! My problem was that I forgot to use $H- for the parser unit. Now everything works on Linux with fpc and on Windows with Delphi with the same code. in windows I have to compile tply from the latest 1.9.5 with Delphi, but it works just fine. Thanks for all the help. Agustin On Fri, 10

Re: [fpc-pascal] Customizing tply

2004-12-12 Thread Steve Williams
I cannot remember where I found that code. From the unit header, it was written by a Peter Below (a member of TeamB) and posted on UseNet a while back. So I guess it is up to you to include it or not, or if you want to try to track down Peter Below and ask his permission. Sly Michael Van Cann

Re: [fpc-pascal] Customizing tply

2004-12-10 Thread Agustin Barto
I did a little more testing, and the console based apps fail too, with the same access violation exception. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Customizing tply

2004-12-10 Thread Agustin Barto
I integrated the generated parser and libs with the old code and now I get a lot of run-time errors. I traced some of them to lexlib's assigns of the default input and ouput so I commented out those (It's a GUI app anyway). But then I started to get access violations. What puzzles me is that my con

Re: [fpc-pascal] Customizing tply

2004-12-10 Thread Michael Van Canneyt
On Fri, 10 Dec 2004, Steve Williams wrote: > > Actually, do you think you could extend this and > > create a bridge between streams and text files ? > > > > I mean 2 calls like > > > > First: Text->Stream. > > > > Var > > f : Text; > > S : TSTream; > > > > begin > > AssignTextStream(F,S);

Re: [fpc-pascal] Customizing tply

2004-12-10 Thread Steve Williams
> Actually, do you think you could extend this and > create a bridge between streams and text files ? > > I mean 2 calls like > > First: Text->Stream. > > Var > f : Text; > S : TSTream; > > begin > AssignTextStream(F,S); > Rewrite(F); > Writeln(F,'Something'); // Writes actually to stream

Re: [fpc-pascal] Customizing tply

2004-12-10 Thread Michael Van Canneyt
On Fri, 10 Dec 2004, Michalis Kamburelis wrote: > Hi, > > I'm attaching my unit TextReader, it > > - implements TTextReader class (that is able to read from any TStream > class using simple Readln and Eof methods) and > > - initializes/finalizes some variables to treat standard input/output > li

Re: [fpc-pascal] Customizing tply

2004-12-09 Thread Michalis Kamburelis
Hi, I'm attaching my unit TextReader, it - implements TTextReader class (that is able to read from any TStream class using simple Readln and Eof methods) and - initializes/finalizes some variables to treat standard input/output like a TStream classes (or, only in case of standard input, like a

Re: [fpc-pascal] Customizing tply

2004-12-09 Thread Steve Williams
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 rewritin

[fpc-pascal] Customizing tply

2004-12-09 Thread Agustin Barto
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 mod