Commit | Line | Data |
---|---|---|
c7633dd5 CH |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | # | |
3 | /* | |
4 | * pi - Pascal interpreter code translator | |
5 | * | |
6 | * Charles Haley, Bill Joy UCB | |
7 | * Version 1.1 February 1978 | |
8 | * | |
9 | * | |
10 | * pxp - Pascal execution profiler | |
11 | * | |
12 | * Bill Joy UCB | |
13 | * Version 1.1 February 1978 | |
14 | */ | |
15 | ||
16 | #include "whoami" | |
17 | #include "0.h" | |
18 | #include "yy.h" | |
19 | ||
20 | /* | |
21 | * Assign semantics to a generated token | |
22 | * | |
23 | * Most terminals have a semantic value the current | |
24 | * input line. If they are generated they are flagged | |
25 | * by having this number negated. | |
26 | * | |
27 | * The terminals which have true semantics such | |
28 | * as identifiers and strings are instead given | |
29 | * semantic value NIL here - we do not attempt | |
30 | * to do repair, e.g. by giving generated integers | |
31 | * the value 1, etc. | |
32 | */ | |
33 | nullsem(ch) | |
34 | int ch; | |
35 | { | |
36 | ||
37 | switch (ch) { | |
38 | case YID: | |
39 | case YINT: | |
40 | case YNUMB: | |
41 | case YBINT: | |
42 | case YSTRING: | |
43 | return (NIL); | |
44 | default: | |
45 | return (-yyeline); | |
46 | } | |
47 | } |