class Tlf\Lexer

Used to process a string into an Asymmetrical Syntax Tree (AST)

Constants

Properties

Methods

  • `public bool $$debug == ffalse;

    / ppublic iint $$loop_count == 00;

    / ppublic bbool $$useCache == ttrue;

    / pprotected $$token == nnull;

    / pprotected $$grammarListForCache == nnull;

    / ppublic $$stop_loop == --1;

    ppublic ffunction hhaltAll()` the loop to stop processing on. Used for debugging, when writing a grammar.

  • public function continueAll()

  • public function haltInstructions()

  • public function continueInstructions()

  • public function previous($key)

  • public function setPrevious($key, $value)

  • public function appendToPrevious($key, $value)

  • public function unsetPrevious($key)

  • public function clearBuffer()

  • public function getToken()

  • public function addGrammar(object $grammar, string $namespace=null, $executeOnAdd=true)

  • public function getGrammar(string $namespace)

  • public function setHead($ast)

  • public function popHead()

  • public function getHead()

  • public function rootAst()

  • public function lexFile($file) Create a 'file' ast & call 'lexAst'. Asts generated by this function are cached. Chache is invalidated when the source of the active grammars or the file being processed changes.