[antlr-interest] linear list from tree
marc schellens
marc at riken.jp
Wed Aug 10 06:29:09 PDT 2005
I would like to build a linear list made from the 'expr'
in the following grammer fragment.
This way it does not work.
So how to do it?
Thanks,
marc
arrayindex_list!
: ( #(ARRAYIX
( ALL
| ( e1:expr // 0 or 2
{
#arrayindex_list = #( NULL, (arrayindex_list),e1);
// also not working: #arrayindex_list = #( arrayindex_list,e1);
// #arrayindex_list = #( (arrayindex_list),e1);
}
)
)
)+
{
// #arrayindex_list = #([ARRAYIX,"[...]"], arrayindex_list);
// #arrayindex_list->SetArrayIndexList( ixList.release());
}
;
More information about the antlr-interest
mailing list