NonTerminal

alpaca.internal.parser.NonTerminal
See theNonTerminal companion class
object NonTerminal

Attributes

Companion
class
Experimental
true
Source
Symbol.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

inline def apply(inline name: String): NonTerminal & NonEmpty

Creates a non-terminal symbol from a name.

Creates a non-terminal symbol from a name.

Value parameters

name

the name of the non-terminal

Attributes

Returns

a non-empty non-terminal symbol

Source
Symbol.scala
def fresh(name: String): NonTerminal & NonEmpty

Creates a fresh non-terminal symbol with a unique name.

Creates a fresh non-terminal symbol with a unique name.

This is used internally to create temporary non-terminals for EBNF operators like optional and repeated patterns.

Value parameters

name

the base name for the non-terminal

Attributes

Returns

a non-terminal with a unique name based on the input

Source
Symbol.scala