Generating a simple hand-coded like recursive descent parser

"Mr.E" <mr.waverlye@verizon.net>
8 Sep 2006 23:21:41 -0400

          From comp.compilers

Related articles
Generating a simple hand-coded like recursive descent parser mr.waverlye@verizon.net (Mr.E) (2006-09-08)
Re: Generating a simple hand-coded like recursive descent parser DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-09-09)
Re: Generating a simple hand-coded like recursive descent parser Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2006-09-09)
Re: Generating a simple hand-coded like recursive descent parser oliverhunt@gmail.com (oliverhunt@gmail.com) (2006-09-09)
Re: Generating a simple hand-coded like recursive descent parser pjb@informatimago.com (Pascal Bourguignon) (2006-09-10)
Re: Generating a simple hand-coded like recursive descent parser mr.waverlye@verizon.net (Mr.E) (2006-09-10)
Re: Generating a simple hand-coded like recursive descent parser mr.waverlye@verizon.net (Mr.E) (2006-09-10)
[51 later articles]
| List of all articles for this month |

From: "Mr.E" <mr.waverlye@verizon.net>
Newsgroups: comp.compilers
Date: 8 Sep 2006 23:21:41 -0400
Organization: Compilers Central
Keywords: parse, question
Posted-Date: 08 Sep 2006 23:21:41 EDT

I recently got my scanner working for my [first] compiler. My
compiler is for an existing BASIC language. I am seeing the
complexity of the language at the parsing level. There are
approximately 600 keyword or keyword combinations which include
compound words due to intrinsic functions.


Is there a parser generator that produces the equivalent of a
hand-coded recursive descent parser? I'm looking for a generator that
doesn't require an engine and doesn't use external libraries... just
plain old C.


I can watch and debug recursive descent code because I can understand
that. I cant imagine trying to debug a table driven parser or having
to rewrite it in BASIC.


The reason for my request is that my compiler will be written in a
BASIC dialect instead of C. I would generate the parser in ANSI C
then rewrite it in BASIC. I'm using a BASIC compiler to bootstrap my
own. It seems to be a good idea to write the compiler in the language
its going to compileso that's what I'm doing.


Also are there any algorithms for AST building. Everything I've
understand tells me that I really want to build an AST and do code
generation from it versus trying to generate code as I go along. I
thought I understood the process but I'm not there yet.




Thank you,




W.



Post a followup to this message

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