[stringtemplate-interest] no such attribute error?
Terence Parr
parrt at antlr.org
Tue Dec 1 15:48:58 PST 2009
Hi. in STv3, referencing an undefined attribute is not a problem...unless you define arguments for that template in a group file like:
foo(x) ::= "<y>" // ooops, y doens't exist
you'll get an error since y doesn't exist (assuming foo isn't enclosed in another template with y formally defined as arg).
Now, even template files need a header. A group file is literally the cat of a bunch of templates.
For migrating to STv4, it would be a big burden to force people to add arg lists (the name of template is easy) to each template file.
I don't like that distinction though and so I'm leaning towards forcing accurate arg lists. Not sure an automated tool is feasible to read old STv3 file and figure out the list of args; worse, it can't know what to put:
body() ::= "h1. <title>"
should I put title in body args or is title inherited from enclosing file() template?
Yikes...
Ter
More information about the stringtemplate-interest
mailing list