[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LR Parser for MCL
- To: info-mcl
- Subject: Re: LR Parser for MCL
- From: email@example.com (Daniel LaLiberte)
- Date: 22 Jan 92 17:40:08 GMT
- In-reply-to: firstname.lastname@example.org's message of 20 Jan 92 23:42:30 GMT
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Illinois, Urbana-Champaign, Dept CS
- References: <email@example.com>
- Sender: firstname.lastname@example.org (News Database (admin-Mike Schwager))
> From: email@example.com (John Matthews)
> Does anyone know of a way I could get my hands on a general
> LR (or other) parser package?
The GLisp package might do what you want, but I dont think it handles
all LR languages.
I've got two parsing related things for GNU Emacs Lisp that may be relevant.
Both work with bison as the parser generator.
One extracts the tables from the generated parser and interprets them
in Emacs Lisp. This is pretty slow, but could probably be improved
greatly in Common Lisp. One advantage is you have more control of
the parsing process to play with modifications, e.g. error recovery.
The other lets the bison parser do the parsing, and each of the semantic
actions prints the rule name or number. In GNU Emacs Lisp, I read the
list of rule numbers, with symbols and literals intermixed, and do the
corresponding semantic actions in lisp code. This worked pretty well
and enabled me to build a pascal compiler for a class.
If you want the code, email me.
If you want to convert it to CL, I'd be willing to help.
(Join the League for Programming Freedom: firstname.lastname@example.org)