[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LR Parser for MCL

>I'm sorry if this is a FAQ, I'm new to MCL.
>Does anyone know of a way I could get my hands on a general
>LR (or other) parser package? I would use it to parse and analyze
>C and C++ programs. I could use YACC and the foriegn-function package,
>but I would then lose all of the benefits of LISP for the parsing portion
>of my program.
>Any info would be appreciated :)
>John Matthews

I also needed a LR parser for my project, so I checked a few ones written
in lisp, but found none that where as nice as UNIX's YACC. As a partial
I wrote some lisp code that enables you to write your YACC grammer in lisp,
generate the YACC format file read back the YACC generated parser into lisp
construct the automata from the YACC parser.

This setup, while clumsyer than having YACC in lisp, works very well if you
an AppleShare server on the UNIX side (such as CAP), enabling you to write
and read
files directly from MCL onto the UNIX side.

If you want, I can send you the code, but I wont have any time to comment
or remove all the personal stuff that may be imbeded in it.

Guillaume Cartier
LACIM, Universite du Quebec a Montreal.
Bureau: (514) 987-4290
E-Mail: cartier@math.uqam.ca