abstract class Expr extends AnyRef
Base class for expressions
An expression is the right hand side of an EBNF rule, made of sequences, branches, repetitions, and options of terminal and nonterminal symbols. Each of these is represented by a concrete case class.
Provides methods common to all expressions.
- Alphabetic
- By Inheritance
- Expr
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Expr()
Abstract Value Members
-
abstract
def
format: String
Returns a formatted version of this
Returns a formatted version of this
Sub-classes implement this to determine formatting.
- returns
a print-able version in EBNF format
Concrete Value Members
-
def
*(): Expr
Returns a org.benknoble.ebnf.Repetition of this
-
def
?(): Expr
Returns a org.benknoble.ebnf.Option of this
-
def
||(right: Expr): Expr
Returns an org.benknoble.ebnf.Alternation
Returns an org.benknoble.ebnf.Alternation
- right
the right side of the branch
-
def
~(right: Expr): Expr
Returns a org.benknoble.ebnf.Sequence
Returns a org.benknoble.ebnf.Sequence
- right
the next item in the sequence