|
|
1.1 root 1: %{
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: * Redistribution and use in source and binary forms are permitted
10: * provided that: (1) source distributions retain this entire copyright
11: * notice and comment, and (2) distributions including binaries display
12: * the following acknowledgement: ``This product includes software
13: * developed by the University of California, Berkeley and its contributors''
14: * in the documentation or other materials provided with the distribution
15: * and in all advertising materials mentioning features or use of this
16: * software. Neither the name of the University nor the names of its
17: * contributors may be used to endorse or promote products derived
18: * from this software without specific prior written permission.
19: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
20: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
21: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22: */
23:
24: /*
25: * Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved.
26: *
27: * Copy permission is hereby granted provided that this notice is
28: * retained on all partial or complete copies.
29: *
30: * For more info on this and all of my stuff, mail [email protected].
31: */
32:
33: #ifndef lint
34: static char sccsid[] = "@(#)lex.l 5.2 (Berkeley) 4/30/90";
35: #endif /* not lint */
36:
37: #include "y.tab.h"
38: extern int line;
39:
40: %}
41: %%
42: [0-9]+ { yylval.ival = atoi(yytext); return(ConstOp); }
43: height { return(HeightOp); }
44: width { return(WidthOp); }
45: newplane { return(NewplaneOp); }
46: update { return(UpdateOp); }
47: airport { return(AirportOp); }
48: line { return(LineOp); }
49: exit { return(ExitOp); }
50: beacon { return(BeaconOp); }
51: [wedcxzaq] { yylval.cval = *yytext; return (DirOp); }
52: [ \t]+ { }
53: #[^\n]*\n { line++; }
54: \n { line++; }
55: . { return *yytext; }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.