Skip to content

Latest commit

 

History

History
361 lines (227 loc) · 13.6 KB

File metadata and controls

361 lines (227 loc) · 13.6 KB

src/minisql/sql/lexer.ml

Home · Files

Provides minisql sql lexer facilities for this project.

Package: minisql.sql.lexer

Reachable from entry: yes

Imports

Declarations

advance

function advance(state)

Advances advance using the supplied inputs. Returns the computed value or operation status. May mutate supplied state as documented by the operation name.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

appendToken

function appendToken(state, kind, text, value, offset, line, column, quoted)

Appends token using the supplied inputs. Returns the computed value or operation status. May mutate supplied state as documented by the operation name.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.
kind dynamic kind value consumed by this operation.
text dynamic Text consumed by the operation.
value dynamic Value consumed or transformed by the operation.
offset dynamic Zero-based offset at which processing starts.
line dynamic line value consumed by this operation.
column dynamic column value consumed by this operation.
quoted dynamic quoted value consumed by this operation.

View source

componentName

function componentName()

Performs the componentName operation for the minisql sql lexer module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

View source

current

function current(state)

Implements current for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

fail

function fail(state, message)

Performs the fail operation for the minisql sql lexer module. Returns its result or propagates a structured error from validation or a dependency. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.
message dynamic Human-readable message associated with the operation.

View source

INVALID_ARGUMENT

const INVALID_ARGUMENT = 9001

Defines the invalid argument constant used by the minisql sql lexer module.

View source

isDigit

function isDigit(value)

Returns whether the supplied value satisfies the digit condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
value dynamic Value consumed or transformed by the operation.

View source

isIdentifierPart

function isIdentifierPart(value)

Returns whether the supplied value satisfies the identifier part condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
value dynamic Value consumed or transformed by the operation.

View source

isIdentifierStart

function isIdentifierStart(value)

Returns whether the supplied value satisfies the identifier start condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
value dynamic Value consumed or transformed by the operation.

View source

isImplemented

function isImplemented()

Returns whether implemented satisfies the condition required by the minisql sql lexer module. Returns the computed value or operation status. Does not modify its inputs.

View source

isWhitespace

function isWhitespace(value)

Returns whether the supplied value satisfies the whitespace condition. Returns the computed value or operation status. Does not modify its inputs.

Parameter Type Default Description
value dynamic Value consumed or transformed by the operation.

View source

peek

function peek(state, distance)

Implements peek for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.
distance dynamic distance value consumed by this operation.

View source

rawText

function rawText(state, startOffset, endOffset)

Implements raw text for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.
startOffset dynamic startOffset value consumed by this operation.
endOffset dynamic endOffset value consumed by this operation.

View source

readIdentifier

function readIdentifier(state)

Reads identifier using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

readNumber

function readNumber(state)

Reads number using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

readQuotedIdentifier

function readQuotedIdentifier(state)

Reads quoted identifier using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

readString

function readString(state)

Reads string using the supplied inputs. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

skipIgnored

function skipIgnored(state)

Implements skip ignored for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

SQL_SYNTAX

const SQL_SYNTAX = 9019

Defines the sql syntax constant used by the minisql sql lexer module.

View source

symbolToken

function symbolToken(state)

Implements symbol token for this module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

Parameter Type Default Description
state dynamic Mutable state inspected or updated by the operation.

View source

targetMilestone

function targetMilestone()

Performs the targetMilestone operation for the minisql sql lexer module. Returns the computed value or operation status. Any side effects are limited to the explicitly invoked dependencies.

View source

tokenizeSql

function tokenizeSql(source)

Tokenizes SQL using the supplied inputs. Requires arguments that satisfy the validation performed below. Returns its result or propagates a structured error from validation or a dependency. May mutate supplied state as documented by the operation name.

Parameter Type Default Description
source dynamic source value consumed by this operation.

View source