case class Nonterminal(name: Symbol) extends Word with Product with Serializable
A nonterminal symbol of the grammar
Nonterminals look like <Name>
:
scala> import org.benknoble.ebnf._ import org.benknoble.ebnf._ scala> val n = Nonterminal('A).format n: String = <A>
- name
the name of the Nonterminal
- Alphabetic
- By Inheritance
- Nonterminal
- Serializable
- Serializable
- Product
- Equals
- Word
- Expr
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Nonterminal(name: Symbol)
create a new Nonterminal with a name
create a new Nonterminal with a name
- name
the name of the Nonterminal
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
-
def
::=(rule: Expr): Production
Syntactic sugar to create org.benknoble.ebnf.Productions:
Syntactic sugar to create org.benknoble.ebnf.Productions:
scala> import org.benknoble.ebnf._ import org.benknoble.ebnf._ scala> val p = Nonterminal('A) ::= Terminal("a") p: org.benknoble.ebnf.Production = Production(Nonterminal('A), Terminal(a))
- rule
the right hand side of a production
- returns
an org.benknoble.ebnf.Production of this ::= rule
-
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
- Nonterminal → Expr
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val name: Symbol
-
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