Last change
on this file since 29 was
29,
checked in by landauf, 16 years ago
|
updated boost from 1_33_1 to 1_34_1
|
File size:
1.4 KB
|
Line | |
---|
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 | * |
---|
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 |
---|
18 | * |
---|
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. |
---|
24 | */ |
---|
25 | |
---|
26 | /* |
---|
27 | * YYSTYPE - value of a lexical token |
---|
28 | */ |
---|
29 | |
---|
30 | # define YYSTYPE YYSYMBOL |
---|
31 | |
---|
32 | typedef struct _YYSTYPE { |
---|
33 | int type; |
---|
34 | char *string; |
---|
35 | PARSE *parse; |
---|
36 | LIST *list; |
---|
37 | int number; |
---|
38 | char *file; |
---|
39 | int line; |
---|
40 | } YYSTYPE; |
---|
41 | |
---|
42 | extern YYSTYPE yylval; |
---|
43 | |
---|
44 | void yymode( int n ); |
---|
45 | void yyerror( char *s ); |
---|
46 | int yyanyerrors(); |
---|
47 | void yyfparse( char *s ); |
---|
48 | int yyline(); |
---|
49 | int yylex(); |
---|
50 | int yyparse(); |
---|
51 | void yyinput_stream( char** name, int* line ); |
---|
52 | |
---|
53 | # define SCAN_NORMAL 0 /* normal parsing */ |
---|
54 | # define SCAN_STRING 1 /* look only for matching } */ |
---|
55 | # define SCAN_PUNCT 2 /* only punctuation keywords */ |
---|
Note: See
TracBrowser
for help on using the repository browser.