LiteralParser

org.nlogo.parse.LiteralParser
class LiteralParser(importHandler: LiteralImportHandler)

The literal parser. This class contains methods which are used to parse literal NetLogo values from a Iterator[Token]. (It hands off all the complicated import-world stuff involving literal agents and literal agentsets to LiteralAgentParser.)

Attributes

Source
LiteralParser.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def getLiteralFromFile(tokens: Iterator[Token]): AnyRef

Attributes

Source
LiteralParser.scala
def getLiteralValue(tokens: Iterator[Token]): AnyRef

reads a literal value from a token vector. The entire vector must denote a single literal value; extra garbage at the end is illegal. Used for read-from-string and other things.

reads a literal value from a token vector. The entire vector must denote a single literal value; extra garbage at the end is illegal. Used for read-from-string and other things.

Value parameters

tokens

the input tokens

Attributes

Source
LiteralParser.scala
def getNumberValue(tokens: Iterator[Token]): Double

Attributes

Source
LiteralParser.scala
def parseLiteralList(openBracket: Token, tokens: Iterator[Token]): (LogoList, Token)

parses a literal list. Assumes the open bracket was already eaten. Eats the list contents and the close bracket; returns a LogoList and the close bracket token.

parses a literal list. Assumes the open bracket was already eaten. Eats the list contents and the close bracket; returns a LogoList and the close bracket token.

Attributes

Source
LiteralParser.scala
def readLiteralPrefix(token: Token, tokens: Iterator[Token]): AnyRef

reads a literal value from the beginning of a token vector. This method leaves the rest of the token vector intact (i.e., extra garbage after the literal is OK).

reads a literal value from the beginning of a token vector. This method leaves the rest of the token vector intact (i.e., extra garbage after the literal is OK).

Value parameters

tokens

the input tokens

Attributes

Source
LiteralParser.scala