[climacs-devel] lisp-syntax and parse tables
Earl J. Wagner
ewagner at cs.northwestern.edu
Tue Aug 16 16:07:48 UTC 2005
Hi all,
I've been looking at how to automatically generate the lisp-syntax
parser from BNF descriptions like S -> form*, etc. To do this, I'm
integrating a modified version of Mark Johnson's LALR parse table
generator linked to from here:
http://www.cog.brown.edu/~mj/Software.htm
I have a few questions however
1) What's the rationale behind representing parse states as CLOS
objects, as opposed to just numbers?
On the one hand this is a little easier to understand when parsing
breaks, but my intuition is that it introduces a lot of overhead.
2) Is it necessary to interleave lexing and parsing?
It's conventional to have a lexing stage then a parsing stage, but
because of C's macros and other reasons for C++, that doesn't work
for those languages. Correct me if I'm wrong, but Lisp seems uniform
enough that even if you introduce macros or additional syntax, the
lexer should be able to function independently of the parser.
My inclination is to split current-state into a lexer state and parse
state. Lexer state will be identified symbolically as is done now and
the parse state will be represented by state-ids.
-Earl
More information about the climacs-devel
mailing list