Packages

c

info.kwarc.mmt.api.parser

PrefixedTokenLexer

abstract class PrefixedTokenLexer extends LexerExtension

a LexerExtension that detects id (letter sequences) Tokens prefixed by delim

Source
LexerExtension.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PrefixedTokenLexer
  2. LexerExtension
  3. Rule
  4. SemanticObject
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PrefixedTokenLexer(delim: Char, includeDelim: Boolean = true)

    delim

    the begin Char

    includeDelim

    whether the delimiter is part of the token typical example: PrefixedTokenLexer(\)

Abstract Value Members

  1. abstract def include(c: Char): Boolean

    true for the characters to be included before ending the token

    true for the characters to be included before ending the token

    Annotations
    @inline()

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(s: String, index: Int, firstPosition: SourcePosition): Option[Token]

    s

    the string to lex

    firstPosition

    the SourcePosition of the first character

    returns

    the lexed Token, if applicable lexer extensions are called at every position of the input and therefore must fail very quickly if they are not applicable Make sure to call StringSlice(s,i) instead of s.substring(i) for efficiency.

    Definition Classes
    PrefixedTokenLexerLexerExtension
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def init: Unit

    errors in Java initializers are hard to debug; therefore, objects should put initialization code here, which will be called by MMT empty by default, may throw errors

    errors in Java initializers are hard to debug; therefore, objects should put initialization code here, which will be called by MMT empty by default, may throw errors

    Definition Classes
    SemanticObject
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. lazy val mpath: MPath

    the MMT URI of this object, derived from its Scala name: scala://package?name

    the MMT URI of this object, derived from its Scala name: scala://package?name

    Definition Classes
    SemanticObject
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def priority: Int

    lexer with longer triggers have higher priority

    lexer with longer triggers have higher priority

    Definition Classes
    LexerExtensionRule
  19. def providedRules: List[Rule]

    normally the singleton list of this rule; but rules may bundle additional rules as well

    normally the singleton list of this rule; but rules may bundle additional rules as well

    Definition Classes
    Rule
  20. def shadowedRules: List[Rule]

    normally the empty list; but rules may list rules here that should be removed from the context this can be used to override imported rules

    normally the empty list; but rules may list rules here that should be removed from the context this can be used to override imported rules

    Definition Classes
    Rule
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    Rule → AnyRef → Any
  23. def trigger: Some[String]

    if given, only applies to tokens that start with trigger

    if given, only applies to tokens that start with trigger

    Definition Classes
    PrefixedTokenLexerLexerExtension
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from LexerExtension

Inherited from Rule

Inherited from SemanticObject

Inherited from AnyRef

Inherited from Any

Ungrouped