On Sep 23, 2009, at 11:34 AM, Markus Roberts wrote:

> >>> Given the ridiculous complexity we're looking at adding to work
> >> around this, making the lexer easier by adding the leading 'm'
> >> or whatever seems like a good step.  A bit ugly lexically, but
> >> way easier to implement and will help us avoid more pain in
> >> the future.
>
> > Definitely.
> > For which version^H^H^H^H codename do we plan the change?
>
> Well, it's a bugfix that just happens to horribly break backward
> compatibility.  But I'd say 0.25.1, because we're basically choosing
> between breaking compatibility with code in 0.24 (incorrectly lexing
> division) and 0.25 (changing the regex lexing).
>
> Thoughts?
>
> Yeah.  I don't like the leading 'm'.
>
> Further, I think the complexity in the workaround is coming from the  
> approach (maintaining special purpose state) rather than the problem.
>
> I'd favor (as I mentioned on the ticket) adding a general purpose  
> "acceptable?" test to tokens and have the lexer use that in with the  
> longest match first logic.
>
> Make "acceptable?" default to true, but in the case of REGEX have it  
> check to see if it's in a value context (that is, that the last  
> token generated was in the set LBRACE, RBRACE, COMMA, etc.).  As far  
> as I can see, the last token gives a clean division between where  
> DIV is acceptable and where REGEX is acceptable so there need only  
> be one place (REGEX.acceptable?) where we do anything funky--and  
> that just an [...].include? test.
>
> I'm working on debugging a 24.8/25.0 problem at the moment but I'll  
> try to code this up later today.

Ok, I look forward to seeing your code.  I also am not that fond of  
the m//, but in the absence of another clean solution...

>
> P.S. As always, there may be a complexity that I'm not seeing that  
> makes this unworkable, and I welcome anyone pointing it out if you  
> see it.  It looks pretty straight forward.


-- 
The truth is that there is nothing noble in being superior to somebody
else. The only real nobility is in being superior to your former self.
     -- Whitney Young
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
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