Question

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)+)?
;
Was it helpful?

Solution

  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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top