Q: pyhton based lex, yacc tools

Steve Holden sholden at holdenweb.com
Wed Nov 8 21:34:54 CET 2000


Vassilis Virvilis wrote:
> 
> Halo everybody,
> 
> Since I am rather new to the python world I would like to ask:
> 
> Is there available any python tool which corresponds to a lex scanner
> and/or a yacc parser? If not why?
> 
Well, there are a few tools which will deal with the same sort of task,
but as far as I know (and this is not a major interest area for me),
nothing directly to compare.

> Does the community behind this newsgroup think that they are useless? Is
> it so much better to hand code things? or do I really miss something? It
> looks to me that having the expressive power of python and the re module
> the scanner should be at least a perfectly doable task.
> 

Nice things have been said about both lex and yacc in the past.  When you
know more about it than me you will be able to wrap lex and yacc output
up using SWIG, and use them directly inside Python programs.  So I suppose
one answer is they don't *need* to be rewritten in Python ...

A list of parsing systems is available at
  
  http://starship.python.net/crew/amk/python/string.html#parsing

but sadly everybody's favorite website seems to be temporarily indisposed
(again), so it may take a while to be able to get at that.

There's also a parsing package available as part of the Gadfly database
system, see

  http://www.chordate.com/kwParsing/index.html

You might also be interested in (watch it, the URL will wrap):

 
http://www.foretec.com/python/workshops/1998-11/proceedings/papers/aycock-little/aycock-little.html

> Please comment...
> 

A sarcastic reply, which we Yorkshirepersons are known to be predisposed to,
would run along the lines of "I found these references by searching the
Deja.com comp.lang.python archive, which is what the community behind this
newsgroup tend to do before asking questions".  But that would only be
because I'm typing this in my new house, with no furniture, and my knees
hurt!

My favorite surmise, however, is that the group collectively knew you'd
come along and want to do the job!  I'm sure you could recruit some support
for such an enterprise from the readership.

>         .Bill

regards
 Steve
-- 
Helping people meet their information needs with training and technology.
703 967 0887      sholden at bellatlantic.net      http://www.holdenweb.com/





More information about the Python-list mailing list