trait Lexer extends AnyRef
A trait for a lexer that allows separating a string into "tokens" and "delimiters". Each lexer defines tokens and delimiters differently. A whitespace lexer assigns whitespace runs as delimiters and non-whitespace runs as tokens. A capitalization-based lexer creates tokens when capitalization changes from lower case to upper case but produces no delimiters.
- Alphabetic
- By Inheritance
- Lexer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
lex(s: String): LexResult
Lazily separate a string into tokens based on some boundary condition and preserve the delimiter characters that were between the boundaries, including any leading or trailing delimiters.
Lazily separate a string into tokens based on some boundary condition and preserve the delimiter characters that were between the boundaries, including any leading or trailing delimiters.
- s
string to separate
- returns
a lazy result
-
abstract
def
tokens(s: String): Iterator[String]
Separate a string into tokens based on some boundary condition ignoring any delimiter characters between any two tokens.
Separate a string into tokens based on some boundary condition ignoring any delimiter characters between any two tokens.
- s
string to separate into tokens
- returns
Iterator of tokens
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
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( ... )