[antlr-interest] No default AST construction for a list of single-nonterminal alternatives with local option bactrack turned on (+)
Дмитрий Волосных
dmitry.volosnykh at gmail.com
Tue Dec 22 14:51:12 PST 2009
Having the rule specified below, there's no AST-rewrite code generated for
sub-alternatives for the third alternative ( preceeded by IsObject semantic
predicate ). Was that an intent? Or I am just missing something?
name
:
{ IsFunction( input.LT( 1 ).Text ) }?=> function_call |
{ IsType( input.LT( 1 ).Text ) }?=> type_conversion |
{ IsObject( input.LT( 1 ).Text ) }?=> ( options{ backtrack =
true; } :
slice |
indexed_component ->
indexed_component |
explicit_dereference |
selected_component |
direct_name -> ^( OBJECT
direct_name )
) |
attribute_reference |
CHARACTER_LITERAL |
// erroneous alternatives
( options{ backtrack = true; } :
type_conversion | // conversion to an unknown type or
calling unknown function or indexing unknown object.
indexed_component | // indexing unknown object or calling
unknown function.
slice | // slicing unknown object.
explicit_dereference | // explicitly referencing unknown
object.
selected_component | // selecting component of an unknown
object.
function_call // calling unknown function or using
unknown object
)
;
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20091223/cf85797f/attachment.html
More information about the antlr-interest
mailing list