Вопрос

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)+)?
;
Это было полезно?

Решение

  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.
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top