ExprLexer

A lexer breaks up an incoming string of characters into a sequence of tokens.

Constructor

new L3D.ExprLexer(input)

Parameters
input String

The string to parse.

Properties

The code of the last parsed token.

The string of the last parsed token.

If the parsed token was an identifier, this is the string name of the identifier.

Checks if the lexer position is at the end of the input.

If the parsed token was a number, this is the value of the number.

Methods

static _isAlpha()

Is the character in the range [a, z] or [A, Z]?

static _isAlphaNumber()

Is the character an letter or a number?

static _isDigit()

Is the character in the range [0, 9]

static _isWhitespace()

Is the character a space or tab?

_nextCode()

Get the next character code from the input buffer.

getNextToken() → int

Parses the next token from the input string.

Returns
int

The next parsed token.