]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/src/engine/scan.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / src / engine / scan.h
CommitLineData
7c673cae
FG
1/*
2 * Copyright 1993, 1995 Christopher Seiwald.
3 *
4 * This file is part of Jam - see jam.c for Copyright information.
5 */
6
7/*
8 * scan.h - the jam yacc scanner
9 *
10 * External functions:
11 * yyerror( char *s ) - print a parsing error message.
12 * yyfparse( char *s ) - scan include file s.
13 * yylex() - parse the next token, returning its type.
14 * yymode() - adjust lexicon of scanner.
15 * yyparse() - declaration for yacc parser.
16 * yyanyerrors() - indicate if any parsing errors occured.
17 *
18 * The yymode() function is for the parser to adjust the lexicon of the scanner.
19 * Aside from normal keyword scanning, there is a mode to handle action strings
20 * (look only for the closing }) and a mode to ignore most keywords when looking
21 * for a punctuation keyword. This allows non-punctuation keywords to be used in
22 * lists without quoting.
23 */
24
25#include "lists.h"
26#include "object.h"
27#include "parse.h"
28
29
30/*
31 * YYSTYPE - value of a lexical token
32 */
33
34#define YYSTYPE YYSYMBOL
35
36typedef struct _YYSTYPE
37{
38 int type;
39 OBJECT * string;
40 PARSE * parse;
41 LIST * list;
42 int number;
43 OBJECT * file;
44 int line;
45 char const * keyword;
46} YYSTYPE;
47
48extern YYSTYPE yylval;
49
50void yymode( int n );
51void yyerror( char const * s );
52int yyanyerrors();
53void yyfparse( OBJECT * s );
54void yyfdone( void );
55int yyline();
56int yylex();
57int yyparse();
58void yyinput_last_read_token( OBJECT * * name, int * line );
59
60#define SCAN_NORMAL 0 /* normal parsing */
61#define SCAN_STRING 1 /* look only for matching } */
62#define SCAN_PUNCT 2 /* only punctuation keywords */