Using Bison and Delphi

"Mike Hahn" <>
17 Nov 2004 11:41:34 -0500

          From comp.compilers

Related articles
Using Bison and Delphi (Mike Hahn) (2004-11-17)
RE: Using Bison and Delphi (Quinn Tyler Jackson) (2004-11-19)
Re: Using Bison and Delphi (2004-11-19)
Re: Using Bison and Delphi (Mike Hahn) (2004-11-20)
Re: Using Bison and Delphi (2004-11-26)
Re: Using Bison and Delphi (2004-11-28)
Re: Using Bison and Delphi (Jeremy Wright) (2004-11-28)
[2 later articles]
| List of all articles for this month |

From: "Mike Hahn" <>
Newsgroups: comp.compilers
Date: 17 Nov 2004 11:41:34 -0500
Organization: Compilers Central
Keywords: yacc, Pascal, question
Posted-Date: 17 Nov 2004 11:41:34 EST


I have designed a new programming language and now I wish to implement
it using Delphi. What I did was, I started with Java, added some
features from Object Pascal, and then made everything prefix (not
infix). Statements and declarations are delimited with semicolons to
cut down on parentheses clutter. Also, the Java dot operator is
implied, so you just write:

foo mymethod (arg1 arg2... );

to call the mymethod method of the class which the foo object belongs to.

I would like to know if it's a good idea to use Bison to generate the
parser, and then translate Bison's output, either using some tool or
by hand, into Object Pascal. I am a complete newbie when it comes to
writing compilers. The grammar of this language can be found at, click on Parenscript > Parenscript
Language > Language Grammar.


Mike Hahn
[Translating a yacc parser from C into another language isn't all that
hard if you know about LALR parser design, but I don't think I'd want
to do it for my first project. I'd either look for a Pascal parser
generator, or if your grammar is simple enough do a recursive descent
parser by hand. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.