All Downloads are FREE. Search and download functionalities are using the official Maven repository.

messages.attributeDescriptions.recoverWhile.html Maven / Gradle / Ivy

The newest version!


Name of the recovery predicate rule or "#auto" which means "! FOLLOWS(rule)".

The contract:

  1. The attributed rule is handled as usual
  2. And regardless of the result parser will continue to consume tokens while the predicate rule matches

Notes:

  1. This attribute in most cases should be specified on a rule that is inside a loop
  2. That rule should always have *pin* attribute somewhere as well
  3. Attribute value should be a predicate rule, i.e. leave input intact
  4. In most cases the predicate is "! FOLLOWS(rule)" and can be copied from the rule Quick Documentation

Parenthesized list example:


  {
    tokens=[number="regexp:\d+" comma="," paren1="(" paren2=")"]
  }
  list ::= "(" [!")" item (',' item) * ] ")" {pin(".*")=1}
  item ::= number {recoverWhile=item_recover}
  private item_recover ::= !(")" | ",")




© 2015 - 2025 Weber Informatics LLC | Privacy Policy