Package org.h2.bnf

# Interface BnfVisitor

All Known Implementing Classes:
  `BnfRandom`

public interface BnfVisitor
The visitor interface for BNF rules.

## Method Summary

Modifier and Type
Method
Description
`void`
`visitRuleElement(boolean keyword, String name, Rule link)`
Visit a rule element.
`void`
`visitRuleExtension(Rule rule, boolean compatibility)`
Visit a rule with non-standard extension.
`void`
`visitRuleFixed(int type)`
Visit a fixed rule.
`void`
`visitRuleList(boolean or, ArrayList<Rule> list)`
Visit a rule list.
`void`
`visitRuleOptional(ArrayList<Rule> list)`
Visit an OR list of optional rules.
`void`
`visitRuleOptional(Rule rule)`
Visit an optional rule.
`void`
`visitRuleRepeat(boolean comma, Rule rule)`
Visit a repeat rule.

## Method Details

### visitRuleElement

void visitRuleElement(boolean keyword, String name, Rule link)
Visit a rule element.

Parameters:
  `keyword` - whether this is a keyword
  `name` - the element name
  `link` - the linked rule if it's not a keyword

### visitRuleRepeat

void visitRuleRepeat(boolean comma, Rule rule)
Visit a repeat rule.

Parameters:
  `comma` - whether the comma is repeated as well
  `rule` - the element to repeat

### visitRuleFixed

void visitRuleFixed(int type)
Visit a fixed rule.

Parameters:
  `type` - the type

### visitRuleList

void visitRuleList(boolean or, ArrayList<Rule> list)
Visit a rule list.

Parameters:
  `or` - true for OR, false for AND
  `list` - the rules

### visitRuleOptional

void visitRuleOptional(Rule rule)
Visit an optional rule.

Parameters:
  `rule` - the rule

### visitRuleOptional

void visitRuleOptional(ArrayList<Rule> list)
Visit an OR list of optional rules.

Parameters:
  `list` - the optional rules

### visitRuleExtension

void visitRuleExtension(Rule rule, boolean compatibility)
Visit a rule with non-standard extension.

Parameters:
  `rule` - the rule
  `compatibility` - whether this rule exists for compatibility only