Commit | Line | Data |
---|---|---|
932954ff | 1 | %{ |
e04f5cf8 KB |
2 | /*- |
3 | * Copyright (c) 1990 The Regents of the University of California. | |
4 | * All rights reserved. | |
5 | * | |
6 | * This code is derived from software contributed to Berkeley by | |
7 | * Ed James. | |
8 | * | |
9 | * %sccs.include.redist.c% | |
10 | */ | |
11 | ||
932954ff KB |
12 | /* |
13 | * Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved. | |
14 | * | |
15 | * Copy permission is hereby granted provided that this notice is | |
16 | * retained on all partial or complete copies. | |
17 | * | |
18 | * For more info on this and all of my stuff, mail edjames@berkeley.edu. | |
19 | */ | |
20 | ||
e04f5cf8 KB |
21 | #ifndef lint |
22 | static char sccsid[] = "@(#)lex.l 5.2 (Berkeley) %G%"; | |
23 | #endif /* not lint */ | |
24 | ||
932954ff KB |
25 | #include "y.tab.h" |
26 | extern int line; | |
e04f5cf8 | 27 | |
932954ff KB |
28 | %} |
29 | %% | |
30 | [0-9]+ { yylval.ival = atoi(yytext); return(ConstOp); } | |
31 | height { return(HeightOp); } | |
32 | width { return(WidthOp); } | |
33 | newplane { return(NewplaneOp); } | |
34 | update { return(UpdateOp); } | |
35 | airport { return(AirportOp); } | |
36 | line { return(LineOp); } | |
37 | exit { return(ExitOp); } | |
38 | beacon { return(BeaconOp); } | |
39 | [wedcxzaq] { yylval.cval = *yytext; return (DirOp); } | |
40 | [ \t]+ { } | |
41 | #[^\n]*\n { line++; } | |
42 | \n { line++; } | |
43 | . { return *yytext; } |