diff options
| author | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
| commit | e0737c56c1e384e05064a0c6e1ac46979371041b (patch) | |
| tree | a0123d694a2d36c43dabdf0a3907392fce11d457 /boost/tools/build/src/engine/scan.h | |
| parent | b4aebf2d137b892f53503b13785ecae900062ff7 (diff) | |
New upstream version 2.0.0+repackupstream/2.0.0+repack
Diffstat (limited to 'boost/tools/build/src/engine/scan.h')
| -rw-r--r-- | boost/tools/build/src/engine/scan.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/boost/tools/build/src/engine/scan.h b/boost/tools/build/src/engine/scan.h new file mode 100644 index 00000000..371d6514 --- /dev/null +++ b/boost/tools/build/src/engine/scan.h @@ -0,0 +1,62 @@ +/* + * Copyright 1993, 1995 Christopher Seiwald. + * + * This file is part of Jam - see jam.c for Copyright information. + */ + +/* + * scan.h - the jam yacc scanner + * + * External functions: + * yyerror( char *s ) - print a parsing error message. + * yyfparse( char *s ) - scan include file s. + * yylex() - parse the next token, returning its type. + * yymode() - adjust lexicon of scanner. + * yyparse() - declaration for yacc parser. + * yyanyerrors() - indicate if any parsing errors occured. + * + * The yymode() function is for the parser to adjust the lexicon of the scanner. + * Aside from normal keyword scanning, there is a mode to handle action strings + * (look only for the closing }) and a mode to ignore most keywords when looking + * for a punctuation keyword. This allows non-punctuation keywords to be used in + * lists without quoting. + */ + +#include "lists.h" +#include "object.h" +#include "parse.h" + + +/* + * YYSTYPE - value of a lexical token + */ + +#define YYSTYPE YYSYMBOL + +typedef struct _YYSTYPE +{ + int type; + OBJECT * string; + PARSE * parse; + LIST * list; + int number; + OBJECT * file; + int line; + char const * keyword; +} YYSTYPE; + +extern YYSTYPE yylval; + +void yymode( int n ); +void yyerror( char const * s ); +int yyanyerrors(); +void yyfparse( OBJECT * s ); +void yyfdone( void ); +int yyline(); +int yylex(); +int yyparse(); +void yyinput_last_read_token( OBJECT * * name, int * line ); + +#define SCAN_NORMAL 0 /* normal parsing */ +#define SCAN_STRING 1 /* look only for matching } */ +#define SCAN_PUNCT 2 /* only punctuation keywords */ |
