case class Alternation(left: Expr, right: Expr) extends Expr with Product with Serializable
A choice of expressions in the tree
Alternations are just their elements separated by '|':
scala> import org.benknoble.ebnf._ import org.benknoble.ebnf._ scala> val a = Alternation(Nonterminal('A), Terminal("a")).format a: String = <A>|'a'
- left
the left side of the Alternation
- right
the right side in the Alternation
- Alphabetic
- By Inheritance
- Alternation
- Serializable
- Serializable
- Product
- Equals
- Expr
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
*(): Expr
Returns a org.benknoble.ebnf.Repetition of this
Returns a org.benknoble.ebnf.Repetition of this
- Definition Classes
- Expr
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
?(): Expr
Returns a org.benknoble.ebnf.Option of this
Returns a org.benknoble.ebnf.Option of this
- Definition Classes
- Expr
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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
- Definition Classes
- Alternation → Expr
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val left: Expr
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val right: Expr
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
||(right: Expr): Expr
Returns an org.benknoble.ebnf.Alternation
-
def
~(right: Expr): Expr
Returns a org.benknoble.ebnf.Sequence