[antlr-interest] Get rule text only if rule was applied
Miguel Ping
mblp at mega.ist.utl.pt
Sun Apr 1 13:21:49 PDT 2007
Just in case someone wants to know how I solved (:
tableAlias
: (schemaName DOT)? tableName (AT_SIGN linkName)? (aliasLabel=alias)?
{refs.notityTableRef($tableName.text, aliasLabel == null ? null :
$aliasLabel.text, this.scope);}
;
On 4/1/07, Miguel Ping <mblp at mega.ist.utl.pt> wrote:
> That was the first thing I tried, didn't work :)
>
> On 3/31/07, Oliver Zeigermann <oliver.zeigermann at gmail.com> wrote:
> > I have not tried this, but doesn't
> >
> > tableAlias
> > : (schemaName DOT)? tableName alias?
> > {refs.notityTableRef($tableName.text, $alias == null ? null
> > : $alias.text, this.scope);}
> > ;
> >
> > work?
> >
> > HTH
> >
> > Oliver
> >
> > 2007/3/31, Miguel Ping <mblp at mega.ist.utl.pt>:
> > > Hi all,
> > >
> > > I got this rule:
> > >
> > >
> > > tableAlias
> > > : (schemaName DOT)? tableName alias?
> > > {refs.notityTableRef($tableName.text, $alias.text, this.scope);}
> > >
> > > But as you can see, if the alias? part was not applied, $alias.text
> > > throws me a NullPointerException (of course, because $alias does not
> > > exist). How can I check if alias rule was applied?
> > >
> > > Thanks,
> > > Miguel Ping
> > >
> >
>
More information about the antlr-interest
mailing list