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
12 * yyerror( char *s ) - print a parsing error message
13 * yyfparse( char *s ) - scan include file s
14 * yylex() - parse the next token, returning its type
15 * yymode() - adjust lexicon of scanner
16 * yyparse() - declaration for yacc parser
17 * yyanyerrors() - indicate if any parsing errors occured
19 * The yymode() function is for the parser to adjust the lexicon of the
20 * scanner. Aside from normal keyword scanning, there is a mode to
21 * handle action strings (look only for the closing }) and a mode to
22 * ignore most keywords when looking for a punctuation keyword. This
23 * allows non-punctuation keywords to be used in lists without quoting.
25 * 11/04/02 (seiwald) - const-ing for string literals
32 * YYSTYPE - value of a lexical token
35 # define YYSTYPE YYSYMBOL
37 typedef struct _YYSTYPE
{
45 extern YYSTYPE yylval
;
47 extern void yymode (int n
);
48 extern void yyerror (const char *s
);
49 extern int yyanyerrors (void);
50 extern void yyfparse (const char *s
);
51 extern int yyline (void);
52 extern int yylex (void);
53 extern int yyparse (void);
57 SCAN_NORMAL
, /* normal parsing */
58 SCAN_STRING
, /* look only for matching } */
59 SCAN_PUNCT
/* only punctuation keywords */