Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: coco/r for delphi

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    coco/r for delphi

    Is there an up to date coco/r parser for delphi?
    Currently i am using parserbuilder but that one is out of date (2002) and does not support IF (allowing my to check if character form a type i parsed earlier) Also the tetzel version does not support that one.
    The current c# version should be capeable.
    Now the most up to date version of coco/r for delphi should be http://cc.codegear.com/Item/26667 but that one apears to be very broken when compile with delphi2009, but should have support for IF
    Also compiling the tetzel version from source with delphi2009 makes the compiled exe go haywire with only generation rubish in files.
    So once again delphi2009 is not playing nice.
    Who can help?

    Thanks for your help in advance.
    http://3das.noeska.com - create adventure games without programming

  2. #2

    Re: coco/r for delphi

    Hi.

    I was testing COCO/R some months ago. Finally I did compiled the Turbo Pascal version because none of the most modern ones did work. BTW I use Free Pascal . Finally I decided not to use it because it was too complex and I hadn't find much documentation, and the one I find is for the GUI version (Delphi only).

    Anyway it seems that Pascal version is very out of date. If you can build it please let me us know.
    No signature provided yet.

  3. #3

    Re: coco/r for delphi

    Did you find an alternative?

    Also the tetzel and parserbuilder should be fairly equal to the pascal only version, but then again in term of coco/r they are old too. The one on codegear is supposed to be the only version up to date only i cannot get it to work with delphi2009.

    Coco/r has a steap learning curve. But once thing fall together you say wow. But for now i need the IF so i can determine if a word has been given a maining as type or const definition so i can decide in what way to parse a line. Without IF things become very complex, if not undoeable.

    Alternatives would be lex yacc or goldparser.
    http://3das.noeska.com - create adventure games without programming

  4. #4

    Re: coco/r for delphi

    Coco/R is great and I couldn't write a compiler without it

    I use the Tetzel precompiled version to generate a parser that I use with Delphi 2010. But I haven't yet needed the IF-statement. I remember being surprised to find Tetzel did not support it because I thought I read about it in the documentation.

    So is it because of Unicode that the D2009-version does not work? Have you tried compiling it with an earlier version of Delphi? Or contacted the author?
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  5. #5

    Re: coco/r for delphi

    Quote Originally Posted by noeska
    Did you find an alternative?
    No, I didn't. I'm writting a compiler by hand. Recursive parsing, you know.
    No signature provided yet.

  6. #6

    Re: coco/r for delphi

    Quote Originally Posted by VilleK
    So is it because of Unicode that the D2009-version does not work? Have you tried compiling it with an earlier version of Delphi? Or contacted the author?
    Probeably. The version on codegear compiles ok, but when generating sources with it the resulting files are garbled up with only some parts readeable, but when opening in delphi2009 all i see is numbers. I made a comment on the codegear download as i could not find an email for the author there.

    The tetzel also does not compile with delphi 2009 as it gives errors on compiling due to string vs ansistring. Replacing string with ansistring and char with ansichar blindly gives an version that compiles, but just like the version on codegear that gives garbled output files.

    Unfortunately the only delphi that i can use is delphi2009. Maybe i should dig up the delphi7 installer and make a virtual pc for it.

    How do you handle typecasting then? var2 := typecast(variable); vs var2 := function(variable);
    http://3das.noeska.com - create adventure games without programming

  7. #7
    Quote Originally Posted by noeska View Post
    The version on codegear compiles ok, but when generating sources with it the resulting files are garbled up with only some parts readeable, but when opening in delphi2009 all i see is numbers. I made a comment on the codegear download as i could not find an email for the author there.
    I had to update my Coco/R generated parser and found out just like you that this version generates garbled output files. I tried to contact the author on several different email-addresses but got no reply. Finally I found the problem in the source code and uploaded it here: http://code.google.com/p/dcocor/

    Now it generates correct output when compiled in Unicode-versions of Delphi.
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  8. #8
    Quote Originally Posted by VilleK View Post
    I had to update my Coco/R generated parser and found out just like you that this version generates garbled output files. I tried to contact the author on several different email-addresses but got no reply. Finally I found the problem in the source code and uploaded it here: http://code.google.com/p/dcocor/

    Now it generates correct output when compiled in Unicode-versions of Delphi.
    Nice work VilleK, I might check it out (pun intended!)

    cheers,
    Paul

  9. #9
    I can't see how to download it. Should I use SVN? Will it compile on FPC?

    BTW, thanks for the work.
    No signature provided yet.

  10. #10
    Quote Originally Posted by ?ëu?±o Mart??nez View Post
    I can't see how to download it. Should I use SVN? Will it compile on FPC?

    BTW, thanks for the work.
    There is no separate download, go here:
    http://code.google.com/p/dcocor/source/checkout

    and use SVN

    cheers,
    Paul

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •