File: include.yo

package info (click to toggle)
bisonc%2B%2B 6.09.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,984 kB
  • sloc: cpp: 9,375; ansic: 1,505; fortran: 1,134; makefile: 1,062; sh: 526; yacc: 84; lex: 60
file content (25 lines) | stat: -rw-r--r-- 1,183 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Syntax:     bf(%include) tt(pathname)

This directive is used to switch to tt(pathname) while processing a grammar
specification. Unless tt(pathname) defines an absolute file-path, tt(pathname)
is searched relative to the location of bic()'s main grammar specification
file (i.e., the grammar file that was specified as bic()'s command-line
option). This directive can be used to split long grammar specification files
in shorter, meaningful units. After processing tt(pathname) processing
continues beyond the tt(%include pathname) directive.

        Bic()'s main grammar specification file could simply be:
        verb(
    %include spec/declarations
    %%
    %include spec/rules
        )
    where tt(spec/declarations) contains declarations and tt(spec/rules)
contains the rules. Each of the files included using tt(%include) may itself
use tt(%include) directives (which are then processed relative to their
locations). The default nesting limit for tt(%include) directives is 10, but
the option link(--max-inclusion-depth)(MAXDEPTH) can be used to change this
default.

tt(%include) directives should be specified on their own lines, not containing
any other information.