/* * 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. * * 11/04/02 (seiwald) - const-ing for string literals */ /* * YYSTYPE - value of a lexical token */ # define YYSTYPE YYSYMBOL typedef struct _YYSTYPE { int type; const char *string; PARSE *parse; LIST *list; int number; } YYSTYPE; extern YYSTYPE yylval; void yymode( int n ); void yyerror( const char *s ); int yyanyerrors(); void yyfparse( const char *s ); int yyline(); int yylex(); int yyparse(); # define SCAN_NORMAL 0 /* normal parsing */ # define SCAN_STRING 1 /* look only for matching } */ # define SCAN_PUNCT 2 /* only punctuation keywords */
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 4381 | Lawrence You | Branch files for jam at change #3108 to prepare for a fix. | ||
//guest/perforce_software/jam/src/scan.h | |||||
#4 | 2493 | rmg |
Rewrite the past: update all jam's source with comments to reflect changes since about 2.3, very early 2001. Whitespace only change. === computer:1666: Change 37660 by seiwald@play-seiwald on 2002/11/06 22:41:35 Note: I regenerated jamgram.c on my linux 7.3 system prior to the submit, since patch was so unhappy trying to lay down the changes from Christopher's change. Presumably this is just due to different yacc/bison/whatever particulars on the system where Christopher made the changes originally. - rmg |
||
#3 | 2491 | rmg |
Some consting in jam to make it more compilable by C++ compilers. No functional change. === computer:1666: Change 37433 by perforce@perforce on 2002/10/30 16:08:51 Recreational const-ing of jam, for compilers that don't allow "string" to be passed as a non-const char *. This included a few places where we were modifying what could possibly have been read-only storage, oddly enough. No functional change. === computer:1666: Change 37602 by seiwald@play-seiwald on 2002/11/04 17:25:40 |
||
#2 | 486 | Perforce staff |
Jam 2.3. See RELNOTES for a list of changes from 2.2.x. Just about every source file was touched when jam got ANSI-fied. |
||
#1 | 2 | laura | Add Jam/MR 2.2 source |