case class Option(expr: Expr) extends Expr with Product with Serializable
An optional expression.
Equivalent to Alternation(expr, ε)
. Surrounded by square brackets:
scala> var o = Option(Sequence(Nonterminal('A), Terminal("abc"))).format o: String = [<A>'abc'] scala> o = Sequence(Nonterminal('A), Terminal("abc")).?.format o: String = [<A>'abc']
- expr
the optional expression
- Alphabetic
- By Inheritance
- Option
- 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
- val expr: Expr
-
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
-
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