ragel-guide.txt (ragel-7.0.0.11) | : | ragel-guide.txt (ragel-7.0.0.12) | ||
---|---|---|---|---|
skipping to change at line 498 | skipping to change at line 498 | |||
[[import]] | [[import]] | |||
==== Importing Definitions | ==== Importing Definitions | |||
-------------- | -------------- | |||
import "inputfile.h"; | import "inputfile.h"; | |||
-------------- | -------------- | |||
The +import+ statement scrapes a file for sequences of tokens that match the | The +import+ statement scrapes a file for sequences of tokens that match the | |||
following forms. Ragel treats these forms as state machine definitions. | following forms. Ragel treats these forms as state machine definitions. | |||
* +name '=' number+ | * name '=' number | |||
* +name '=' lit_string+ | * name '=' lit_string | |||
* +'define' name number+ | * 'define' name number | |||
* +'define' name lit_string+ | * 'define' name lit_string | |||
If the input file is a Ragel program then tokens inside any Ragel | If the input file is a Ragel program then tokens inside any Ragel | |||
specifications are ignored. See the section on <<export, Write Exports>> for a | specifications are ignored. See the section on <<export, Write Exports>> for a | |||
description of exporting machine definitions. | description of exporting machine definitions. | |||
Ragel searches for imported files from the location of the current file. | Ragel searches for imported files from the location of the current file. | |||
Additional directories can be added to the search path using the +-I+ option. | Additional directories can be added to the search path using the +-I+ option. | |||
[[lexing]] | [[lexing]] | |||
=== Lexical Analysis of a Ragel Block | === Lexical Analysis of a Ragel Block | |||
End of changes. 1 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added |