The parser
Factor handbook ยป The implementation

Next:Definitions


The Factor parser reads textual representations of objects and definitions, with all syntax determined by Parsing words. The parser is implemented in the parser vocabulary, with standard syntax in the syntax vocabulary. See Syntax for a description of standard syntax.

The parser cross-references Source files and Definitions. This functionality is used for improved error checking, as well as tools such as Definition cross referencing and Editor integration.

The parser can be invoked reflectively, to run strings and source files.
Evaluating strings at run time
run-file ( path -- )

parse-file ( path -- quot )


If Factor is run from the command line with a script file supplied as an argument, the script is run using run-file. See Command line arguments.

While run-file can be used interactively in the listener to load user code into the session, this should only be done for quick one-off scripts, and real programs should instead rely on the automatic Vocabulary loader.

See also
Parsing words, Definitions, Definition sanity checking