On Tue, 2009-09-22 at 14:35 -0700, Luke Kanies wrote:
> On Sep 22, 2009, at 12:21 AM, Brice Figureau wrote:
> 
> >
> > On Tue, 2009-09-22 at 07:31 +0100, Paul Nasrat wrote:
> >> 2009/9/21 Brice Figureau <[email protected]>:
> >>>
> >>> This is a temporary fix for 0.25.1.
> >>> Unfortunately I don't have any good/better fix for this problem  
> >>> except adding
> >>> once again more parsing in the lexer (ie remember if the previous  
> >>> token
> >>> is a token that can be followed by a :REGEX token).
> >>>
> >>> Frankly, the real fix would be to move to a PEG parser or anything  
> >>> not
> >>> LALR(1) :-(
> >>
> >> Are you thinking about TreeTop?
> >
> > Basically yes. It seems to be the only ruby supported PEG parser (I  
> > was
> > interested by Grammar but it doesn't seem to be actively maintained).
> > But I'm afraid of the performances... and the amount of work to  
> > convert
> > our existing large grammar.
> >
> > Did you use it?
> 
> 
> I don't know much about these alternative parsers, but I've also heard  
> a lot about ANTLR.  Neither was available when I first wrote Puppet,  
> unfortunately.

Yes, ANTLR is the most known parser generator out there nowadays. If I
remind correctly its ruby support had some political issues...
Treetop is a nice ruby only system. I don't know its performances
compared to racc.

> I'm a bit skeptical that the right answer to a lexing problem is to  
> change parsing architectures, though.

The issue is that almost all my previous language work have encountered
an issue coming either from the parser type or the lexer. In the end, we
stacked a lot of "parser" functionalities into the lexer to overcome
this.
I suspect we'll hit more and more this kind of issues (for instance when
adding the hash structure).
Note: I'm not saying we should change anything (I know what would be the
price), just that those moderns alternatives are certainly much easier
to work with.
-- 
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to