The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

scan.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1993, 1995 Christopher Seiwald.
00003  *
00004  * This file is part of Jam - see jam.c for Copyright information.
00005  */
00006 
00007 /*
00008  * scan.h - the jam yacc scanner
00009  *
00010  * External functions:
00011  *
00012  *      yyerror( char *s ) - print a parsing error message
00013  *      yyfparse( char *s ) - scan include file s
00014  *      yylex() - parse the next token, returning its type
00015  *      yymode() - adjust lexicon of scanner
00016  *      yyparse() - declaration for yacc parser
00017  *      yyanyerrors() - indicate if any parsing errors occured
00018  *
00019  * The yymode() function is for the parser to adjust the lexicon of the
00020  * scanner.  Aside from normal keyword scanning, there is a mode to
00021  * handle action strings (look only for the closing }) and a mode to 
00022  * ignore most keywords when looking for a punctuation keyword.  This 
00023  * allows non-punctuation keywords to be used in lists without quoting.
00024  */
00025 
00026 /*
00027  * YYSTYPE - value of a lexical token
00028  */
00029 
00030 # define YYSTYPE YYSYMBOL
00031 
00032 typedef struct _YYSTYPE {
00033     int     type;
00034     char    *string;
00035     PARSE   *parse;
00036     LIST    *list;
00037     int     number;
00038     char    *file;
00039     int     line;
00040 } YYSTYPE;
00041 
00042 extern YYSTYPE yylval;
00043 
00044 void yymode( int n );
00045 void yyerror( char *s );
00046 int yyanyerrors();
00047 void yyfparse( char *s );
00048 int yyline();
00049 int yylex();
00050 int yyparse();
00051 void yyinput_stream( char** name, int* line );
00052 
00053 # define SCAN_NORMAL    0       /* normal parsing */
00054 # define SCAN_STRING    1       /* look only for matching } */
00055 # define SCAN_PUNCT     2       /* only punctuation keywords */

Generated on Mon Nov 8 17:07:52 2004 for MPT by  doxygen 1.3.9.1