Re: [fpc-pascal] Writing a compiler

2009-01-07 Thread Felipe Monteiro de Carvalho
3. Handwritten Question: Need some references other than Jack Crenshaw's book Pros: Easier to maintain (someone said, but no prove) Cons: I don't have any practical background on this I have written a very simple Pascal to Java-bytecode compiler. It compiles a very simplified Pascal. I

Re: [fpc-pascal] Writing a compiler

2009-01-06 Thread leledumbo
I decided to go with Coco/R Delphi (http://tetzel.com/CocoR/). Has anyone managed to compile it with FP? There's a weird bug in StringTools.pas unit, which I think is a bug of FP. There's only one unit in the uses clause, which is Graphics. After converting the source with Lazarus, compilation

Re: [fpc-pascal] Writing a compiler

2009-01-06 Thread Marco van de Voort
In our previous episode, leledumbo said: I decided to go with Coco/R Delphi (http://tetzel.com/CocoR/). Has anyone managed to compile it with FP? There's a weird bug in StringTools.pas unit, which I think is a bug of FP. Start by renaming the duplicate unit names (at least crt and probably

Re: [fpc-pascal] Writing a compiler

2009-01-06 Thread leledumbo
Start by renaming the duplicate unit names (at least crt and probably crc too) to something else. Thanks, Marco. Just as I thought, that would be the problem. It compiles fine now. But shouldn't the compiler message be more informative? I usually get duplicate unit found or something, which IMO

Re: [fpc-pascal] Writing a compiler

2009-01-05 Thread Frank Peelo
Gerard N/A wrote: Hi, On Mon, Jan 5, 2009 at 6:50 AM, leledumbo leledumbo_c...@yahoo.co.id wrote: I just finished taking compiler techniques class this semester and I'd like to write my own based on the one used in the class. The class uses Java with JLex and JavaCUP, but I don't really like

Re: [fpc-pascal] Writing a compiler

2009-01-05 Thread Frank Peelo
Frank Peelo wrote: ... There's also Compiler Construction by Prof. Wirth, Addison-Wesley, 1996, ISBN 0-201-40353-6. It describes a subset of Oberon, rather than Pascal, but it does have the advantage that he seems to have released it (or rather, a revised 3rd edition) as a PDF. This is