(I responded earlier via email, but that response was lost... sorry if there is a duplicate later...)
The corresponding definition for "type" from the puppet grammar is called "classname" and it is what is used to specify a resource "type". Written in (E)BNF the rules for the different types of names/ identifiers/references would be: classname : NAME | CLASS_NAME | CLASS ; NAME : (DEC | LOWER_ALPHA_CHAR) WORD_CHAR* ; CLASS_NAME : (LOWER_ALPHA_CHAR WORD_CHAR*)? (NS LOWER_ALPHA_CHAR WORD_CHAR*)+; CLASS_REF: (NS? UPPER_ALPHA_CHAR WORD_CHAR*)+ ; DEC : '0'..'9' ; LOWER_ALPHA_CHAR : 'a'..'z' ; UPPER_ALPHA_CHAR : 'A'..'Z' ; WORD_CHAR : (DEC | ALPHA_CHARACTER | UNDERSCORE) ; ALPHA_CHARACTER : LOWER_ALPHA_CHAR | UPPER_ALPHA_CHAR ; UNDERSCORE : '_' ; NS : "::" ; CLASS : "class" ; This is what I am using in the Xtext based parser for .pp (and I double checked against the lexer/parser rules, but may have misunderstood something). - henrik -- 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.
