On Sat, 26 Sep 2009, Brice Figureau wrote: > To summarize, I didn't want to make regexes in the Puppet DSL as a type > since there is no "real" type information. So regexes are used only in > some specific situations and you can't do: > > $a = /regex/ > if "value" =~ $a > > There is less sense to do this in Puppet DSL than in any other language, > so I didn't feel it was necessary.
What had weirded me out was that the grammar structurally permits REGEX as the first token in an rvalue (via the selector rule, IIRC) and even as the first token in an expression, so there are about three dozen tokens that could precede it, including things like FARROW and QMARK, INHERITS, etc. as well as the usual suspects (PLUS, LESSTHAN, etc.). This isn't a problem, in that DIV isn't valid in any of these places (it's only found after REGEX (which isn't semantically valid), RPAREN, and rvalue. But it was a loose end. So last night I did what I should have done, which is read the grammar more systematically and make a list of potential problem areas. Short story: you're right. > What I'm planning to add sooner or later to the DSL if nobody objects is: > * more place where you can use expressions (ie function arugments, > case and selectors). > * hash containers > > > All of these are trivial to deal with but since we prohibit everything that > > isn't explicitly allowed, > > I just want to ask these sorts of questions now, not later. > > Sure, you're right. > > > Sent via BlackBerry from T-Mobile > > What?! You don't have an i-phone :-) Nope. And this is being sent from pine. -- Markus --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
