[antlr-interest] Paraphrase (ing)
Henry Butowsky
henryb at ntlworld.com
Tue Feb 13 07:31:44 PST 2007
Hi Guys,
I have the following Lexer rule (cpp runtime)
// Return var or attribute (var_nm at att_nm) or function
VAR_ATT options {testLiterals=true; paraphrase="variable or attribute
identifier"; }
: (LPH)(LPH|DGT)*
{// check function table
if( prs_arg->ptr_sym_vtr->find($getText) !=NULL )
$setType(FUNC);
else $setType(VAR_ID);
}
('@'(LPH)(LPH|DGT)* {$setType(ATT_ID); })?
;
How do I a custom paraphrase for each of the types it may be ?
e.g if VAR_ID paraphrase="variable identifier"
ATT_ID paraphrase="attribute identifier"
FUNC paraphrase="function identifier"
Many thx
Regards Henry
More information about the antlr-interest
mailing list