Re: Block Structure Parsing

2006-10-06 Thread hanumizzle
On 10/4/06, Blacktiger [EMAIL PROTECTED] wrote:
 Hi all, I'm new to this list because I had a question about parsing
 python block structure. I am taking a programming languages course
 this semester and for our final project we are writing an interperator
 in scheme(awful language) for whatever language that we want. The
 language that I want to do is one I have been designing for a little
 while and it shares some syntactic features of Python; most notably
 the block structure.

What dialect of scheme are you limited to, if any? Because PLT and
Chicken appear to have the widest selection of extensions, it might be
good to look at them. Already on the chicken website (the cumbersome
http://www.call-with-current-continuation.org/eggs/) I found this:
http://www.iro.umontreal.ca/~boucherd/Lalr/documentation/lalr.html.
Might be what you need, might not, can't be sure.

Or you can just cheat, use s-exp syntax with unique semantics, and
then use (read) as your 'parser'. :)

-- Theerasak
-- 
http://mail.python.org/mailman/listinfo/python-list


Block Structure Parsing

2006-10-04 Thread Blacktiger
Hi all, I'm new to this list because I had a question about parsing
python block structure. I am taking a programming languages course
this semester and for our final project we are writing an interperator
in scheme(awful language) for whatever language that we want. The
language that I want to do is one I have been designing for a little
while and it shares some syntactic features of Python; most notably
the block structure.

We are using SLLGEN which is able to parse LL(1) grammars and its
lexical scanner can parse regular expressions. I can't seem to think
of a way to put this kind of block structure into a regualr expression
so I am currently thinking of writing my own scanner to replace blocks
with indent/dedent tokens before calling SLLGEN.

Thanks in adv,
Michael Martz
-- 
Concentrate on the solution, not the problem.
http://www.ku.edu/~fencing
-- 
http://mail.python.org/mailman/listinfo/python-list