trait SimpleTokenParsers extends Parsers
- Alphabetic
- By Inheritance
- SimpleTokenParsers
- Parsers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
Failure
(loc: Location, expected: Set[String], found: Token, completions: Set[ICompletion]) extends ParseResult[Nothing] with Product with Serializable
- Definition Classes
- Parsers
-
abstract
class
ParseResult
[+Result] extends AnyRef
- Definition Classes
- Parsers
-
trait
Parser
[+Result] extends AnyRef
- Definition Classes
- Parsers
-
case class
Success
[Result](loc: Location, result: Result, completions: Set[ICompletion], expectedAfter: Set[String]) extends ParseResult[Result] with Product with Serializable
- Definition Classes
- Parsers
-
case class
Suggestion
(fullToken: String, replacementString: String, docString: Option[String]) extends Product with Serializable
- Definition Classes
- Parsers
Abstract Value Members
-
abstract
val
tokenizer: GeneratesSimpleTokens
- Definition Classes
- SimpleTokenParsers → Parsers
Concrete Value Members
-
object
Suggestion
extends Serializable
- Definition Classes
- Parsers
-
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( ... )
-
val
completionTokenDelimiter: String
Delimiter that is inserted before the completion when a completion creates a completely new token and no other delimiter is already present (and we're not at the beginning of the file).
Delimiter that is inserted before the completion when a completion creates a completely new token and no other delimiter is already present (and we're not at the beginning of the file).
The purpose of this is to make '"if", ctrl+space, select "myCond"' complete to "if myCond" rather than "ifmyCond" (in a language where "myCond" would be a valid token after "if").
If a space is not a suitable token delimiter in your language, override this to something that is.
- Definition Classes
- Parsers
-
def
describeAs[Result](description: String)(parser: Parser[Result]): Parser[Result]
Set a custom description for the given parser.
Set a custom description for the given parser. This will show up in "Expected X, but got Y" error messages instead of the token list generated by default.
- Definition Classes
- Parsers
-
def
eof: Parser[Some[SimpleTokens.EOF.type]]
Matches at the end of file.
Matches at the end of file. Using this rule instead of
token(EOF)prevents an empty string from being added to the completions list.- Definition Classes
- Parsers
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fail: Parser[Nothing]
Parser that fails unconditionally.
Parser that fails unconditionally.
This is useful as a default when combining a possibly-empty list of parsers with
|for example.- Definition Classes
- Parsers
-
def
fail(expected: String): Parser[Nothing]
Parser that fails unconditionally.
Parser that fails unconditionally.
This is useful as a default when combining a possibly-empty list of parsers with
|for example.- expected
The message associated with this rule in "X expected, but Y found" error messages.
- Definition Classes
- Parsers
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def float: Parser[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def ident: Parser[String]
- def int: Parser[String]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
matchToken[Result](description: String, suggestions: ⇒ Set[Suggestion] = Set())(f: PartialFunction[WithLocation[SimpleTokens.Token], Result]): Parser[Result]
This rule matches a token if the given function is defined for that function.
This rule matches a token if the given function is defined for that function. If so the result is a
Successwhose value is the return value of the function. Otherwise the rule fails.- Definition Classes
- Parsers
-
def
matchTokenAlt[Result](description: Set[String], suggestions: ⇒ Set[Suggestion] = Set())(f: PartialFunction[WithLocation[SimpleTokens.Token], Result]): Parser[Result]
This rule matches a token if the given function is defined for that function.
This rule matches a token if the given function is defined for that function. If so the result is a
Successwhose value is the return value of the function. Otherwise the rule fails.- Definition Classes
- Parsers
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
parseAll[Result](p: ⇒ Parser[Result], s: String): ParseResult[Result]
- Definition Classes
- Parsers
-
def
parseAll[Result](p: ⇒ Parser[Result], s: Source): ParseResult[Result]
- Definition Classes
- Parsers
-
def
parseAll[Result](p: ⇒ Parser[Result], s: LookaheadSource): ParseResult[Result]
- Definition Classes
- Parsers
-
def
parseAll[Result](p: ⇒ Parser[Result], tokenIterator: GeneratesSimpleTokens.TokenIterator): ParseResult[Result]
- Definition Classes
- Parsers
-
def
parseMany[Result](p: ⇒ Parser[Result], s: Source): Iterator[ParseResult[Result]]
- Definition Classes
- Parsers
-
def
parseMany[Result](p: ⇒ Parser[Result], input: GeneratesSimpleTokens.TokenIterator): Iterator[ParseResult[Result]]
Lazily apply the given parser on the given input repeatedly until the parse fails or the end of the file is reached.
Lazily apply the given parser on the given input repeatedly until the parse fails or the end of the file is reached.
- returns
An iterator containing the ParseResults. All results except the last one are guaranteed to be successful.
- Definition Classes
- Parsers
-
def
rep1sep[T](rep: Parser[T], sep: Parser[Any]): Parser[Seq[T]]
Matches one or more occurrences of
repseparated bysepand produces a list of the results if successful.Matches one or more occurrences of
repseparated bysepand produces a list of the results if successful.- Definition Classes
- Parsers
-
def
repsep[T](rep: Parser[T], sep: Parser[Any]): Parser[Seq[T]]
Matches zero or more occurrences of
repseparated bysepand produces a list of the results.Matches zero or more occurrences of
repseparated bysepand produces a list of the results.- Definition Classes
- Parsers
- def string: Parser[String]
-
def
success[Result](result: ⇒ Result): Parser[Result] { def parse(input: SimpleTokenParsers.this.tokenizer.TokenIterator): SimpleTokenParsers.this.Success[Result] }
Succeeds unconditionally and without consuming tokens.
Succeeds unconditionally and without consuming tokens. The resulitng
Successobject will containresultas its result value.- Definition Classes
- Parsers
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
implicit
def
token[T <: SimpleTokens.Token](tok: T): Parser[WithLocation[T]]
This rule matches the given token and fails on any other token.
This rule matches the given token and fails on any other token.
- Definition Classes
- Parsers
-
def
token[T <: SimpleTokens.Token](tok: T, docString: String): Parser[WithLocation[T]]
This rule matches the given token and fails on any other token.
This rule matches the given token and fails on any other token.
The given docstring will be used as the documentation for the completion produced for this token.
- Definition Classes
- Parsers
-
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( ... )
-
def
when[T](condition: Boolean)(thenParser: ⇒ Parser[T]): Parser[T]
Only use the given parser when the given condition is met.
Only use the given parser when the given condition is met. When the condition is not met, this parser fails unconditionally.
- Definition Classes
- Parsers