Template initialization

18 views
Skip to first unread message

gaulou...@gmail.com

unread,
Dec 11, 2016, 7:54:48 PM12/11/16
to stringtemplate-discussion
Hello,

How to initialize USE_GRAMMAR_NAME to boolean True or False ?

USE_GRAMMAR_NAME() ::= "How to make it intepreted as False in if statement"

<! LEXER_MACRO returns "HELLO_LEXER" or "LEXER" !>
LEXER_MACRO() ::= <<
<if (USE_GRAMMAR_NAME())>LEXER<else><(EXTRACT_GRAMMAR_NAME_FROM_LEXER()); format="upper">_LEXER<endif>
>>

<! many other use of USE_GRAMMAR_NAME() !>


Thanks you

PS: Sorry for my bad english

Reply all
Reply to author
Forward
0 new messages