[stringtemplate-interest] $r.st vs $r.template
Kamal Verma
KamalV at infragistics.com
Mon Nov 21 18:31:27 PST 2005
I will personally like ".template", though longer to type, it is clear and avoid chances of error while reading the big code.
I am new to string template and antlr, but I was wondering if there is any round-trip example which preserves whitespaces will be great. Like,
source1-->LEXER-->token_stream-->PARSER-->some_tree-->STRING_TEMPLATE->source2
given is,
source1=source2 (syntactically) (like, reformatted)
source1=source2 (semantically) (translated)
source1=source2 (both) - complete round trip preserving whitespace.
Since, I am new to this I was wondering if there are examples already.
_K
________________________________
From: stringtemplate-interest-bounces at antlr.org on behalf of Terence Parr
Sent: Mon 11/21/2005 4:58 PM
To: ANTLR Interest
Cc: stringtemplate-interest
Subject: [stringtemplate-interest] $r.st vs $r.template
Howdy. I can't decide whether to use .st or .template as the
predefined property of a rule label reference. Do you like this:
formalParameter
: type declarator
-> parameter(type={$type.st},name={$declarator.st})
;
or would you prefer $type.template and $declarator.template? I had
it this verbose way at first, but I quickly got tired of typing it.
My one concern with .st is it is the file extension for template
files (only for people using it for web stuff I guess though).
ST is an officially approved abbreviation for StringTemplate in email
though ;) Perhaps it's ok.
By the way, do you like that ANTLR+ST integration? I've got it
working and am converting my cminus.g translator to this v3 stuff.
Should be done shortly.
Ter
_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest at antlr.org
http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list