]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/scan.h
2 * Copyright 1993, 1995 Christopher Seiwald.
4 * This file is part of Jam - see jam.c for Copyright information.
8 * scan.h - the jam yacc scanner
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.
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.
31 * YYSTYPE - value of a lexical token
34 #define YYSTYPE YYSYMBOL
36 typedef struct _YYSTYPE
48 extern YYSTYPE yylval
;
51 void yyerror( char const * s
);
53 void yyfparse( OBJECT
* s
);
55 void yysparse( OBJECT
* name
, const char * * lines
);
59 void yyinput_last_read_token( OBJECT
* * name
, int * line
);
61 #define SCAN_NORMAL 0 /* normal parsing */
62 #define SCAN_STRING 1 /* look only for matching } */
63 #define SCAN_PUNCT 2 /* only punctuation keywords */
64 #define SCAN_COND 3 /* look for operators that can appear in conditions. */
65 #define SCAN_PARAMS 4 /* The parameters of a rule "()*?+" */
66 #define SCAN_CALL 5 /* Inside a rule call. [].*/
67 #define SCAN_CASE 6 /* A case statement. We only recognize ':' as special. */
68 #define SCAN_CONDB 7 /* The beginning of a condition (ignores leading comparison operators, so that if <x> in $(y) works.)*/
69 #define SCAN_ASSIGN 8 /* The list may be terminated by an assignment operator. */
70 #define SCAN_XASSIGN 9 /* The next token might be an assignment, but to token afterwards cannot. */