abstract class StringInterpolationLexer extends LexerExtension
A LexerExtension for string interpolation.
- Source
- LexerExtension.scala
- Alphabetic
- By Inheritance
- StringInterpolationLexer
- LexerExtension
- Rule
- SemanticObject
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- 
      
      
      
        
      
    
      
        
        new
      
      
        StringInterpolationLexer(operator: String, str: Bracket, mmt: Bracket)
      
      
      - operator
- the first part of the opening string before 
- str
- string delimiters for 
- mmt
- delimiters for mmt terms inside the string The opening bracket is split into two parts so that multiple instances with different operators can coexist if they use the same str-bracket. The lexed string is of the form: operator str.begin S(0) mmt.begin M(0) mmt.end S(1) ... str.end str.begin and str.end may occur inside M(i) if and only if they are part of another string interpolation (possibly with a different operator). We do not store this nesting structure here - that is handled when recursively parsing M(i) later. But we keep track of it to avoid stopping too early. 
 
Abstract Value Members
- 
      
      
      
        
      
    
      
        abstract 
        def
      
      
        makeTerm(token: StringInterpolationToken, eti: ExternalTokenParsingInput): Term
      
      
      builds a term from the interpolated string pre: parts begins and ends with StringPart, part types alternate 
Concrete Value Members
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        !=(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ##(): Int
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        ==(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        apply(s: String, index: Int, fp: SourcePosition): Option[StringInterpolationToken]
      
      
      - s
- the string to lex 
- 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
- StringInterpolationLexer → LexerExtension
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        asInstanceOf[T0]: T0
      
      
      - Definition Classes
- Any
 
-  def begin: String
- 
      
      
      
        
      
    
      
        
        def
      
      
        clone(): AnyRef
      
      
      - Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
 
-  def end: String
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        eq(arg0: AnyRef): Boolean
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        equals(arg0: Any): Boolean
      
      
      - Definition Classes
- AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        finalize(): Unit
      
      
      - Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        getClass(): Class[_]
      
      
      - Definition Classes
- AnyRef → Any
- Annotations
- @native()
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        hashCode(): Int
      
      
      - Definition Classes
- AnyRef → Any
- Annotations
- @native()
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        isInstanceOf[T0]: Boolean
      
      
      - Definition Classes
- Any
 
-  val mmt: Bracket
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        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()
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        priority: Int
      
      
      lexer with longer triggers have higher priority lexer with longer triggers have higher priority - Definition Classes
- LexerExtension → Rule
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        
        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
 
- 
      
      
      
        
      
    
      
        final 
        def
      
      
        synchronized[T0](arg0: ⇒ T0): T0
      
      
      - Definition Classes
- AnyRef
 
- 
      
      
      
        
      
    
      
        
        def
      
      
        toString(): String
      
      
      - Definition Classes
- Rule → AnyRef → Any
 
- 
      
      
      
        
      
    
      
        
        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
- StringInterpolationLexer → LexerExtension
 
- 
      
      
      
        
      
    
      
        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
- @throws( ... ) @native()