[antlr-interest] indirect template references

Torsten Curdt tcurdt at vafer.org
Thu Oct 9 05:16:21 PDT 2008


What wrong with the following indirect reference?

<attributes:{ a |
     <a:(write<typeMap.(a.type)>)>
}>

typeMap ::= [
         "int":"INTEGER",
         "string":"STRING",
         default:"OBJECT"
]

writeSTRING(a) ::= <<
   // STRING
 >>

writeINTEGER(a) ::= <<
   // INT
 >>

writeOBJECT(a) ::= <<
   // OBJECT
 >>

cheers
--
Torsten


More information about the antlr-interest mailing list