Domanda

I can't understand these grammar rules, and what the "returns" and "current" keywords means ?

WhereEntry returns WhereEntry:
AndWhereEntry ({OrWhereEntry.entries+=current} 
    ("OR" entries+=AndWhereEntry)+)?
;
È stato utile?

Soluzione

  1. returns means: the result of the rule will be of type WhereEntry.
  2. current means: the object parsed so far.

In sum this will mean

  • AndWhereEntry is a Subclass of WhereEntry.
  • if there is an OR then the AndWhereEntry parsed before will be added to the OrWhereEntry entries list.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top