Sphinx‎ > ‎Documentation‎ > ‎Reference‎ > ‎

lex.bin

Lex.bin is the first phase of the compiler. It takes a .spn file as input, tokenizes it, and writes the result to a .tok file. On successful completion, lex.bin can automatically run codegen.bin, the next compiler phase.
 
Usage:
lex filename [options]
Options:
  • /c -- run codegen.bin automatically on successful completion.
  • /l -- run codegen.bin automatically on successful completion and tell it to run link.bin.
  • /v n -- set verbosity to 0, 1, 2, or higher (default is 0). The higher the verbosity, the more messages lex.bin prints as it runs.
Example:
lex tv_text /c
This command tokenizes tv_text.spn, producing tv_text.tok, and then runs codegen.bin. Note that you don't have to add ".spn" to the input filename. Lex.bin will add it automatically.
 
You should never have to run lex.bin directly; instead, use the convenient  c command (provided by sphinx.bin) which is equivalent to running lex with the /c option.