Deleted Added
full compact
maketab.c (85587) maketab.c (107806)
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 22 unchanged lines hidden (view full) ---

31#include <stdio.h>
32#include <string.h>
33#include <stdlib.h>
34#include "awk.h"
35#include "ytab.h"
36
37struct xx
38{ int token;
1/****************************************************************
2Copyright (C) Lucent Technologies 1997
3All Rights Reserved
4
5Permission to use, copy, modify, and distribute this software and
6its documentation for any purpose and without fee is hereby
7granted, provided that the above copyright notice appear in all
8copies and that both that the copyright notice and this

--- 22 unchanged lines hidden (view full) ---

31#include <stdio.h>
32#include <string.h>
33#include <stdlib.h>
34#include "awk.h"
35#include "ytab.h"
36
37struct xx
38{ int token;
39 char *name;
40 char *pname;
39 const char *name;
40 const char *pname;
41} proc[] = {
42 { PROGRAM, "program", NULL },
43 { BOR, "boolop", " || " },
44 { AND, "boolop", " && " },
45 { NOT, "boolop", " !" },
46 { NE, "relop", " != " },
47 { EQ, "relop", " == " },
48 { LE, "relop", " <= " },

--- 53 unchanged lines hidden (view full) ---

102 { CALL, "call", "call" },
103 { ARG, "arg", "arg" },
104 { VARNF, "getnf", "NF" },
105 { GETLINE, "getline", "getline" },
106 { 0, "", "" },
107};
108
109#define SIZE (LASTTOKEN - FIRSTTOKEN + 1)
41} proc[] = {
42 { PROGRAM, "program", NULL },
43 { BOR, "boolop", " || " },
44 { AND, "boolop", " && " },
45 { NOT, "boolop", " !" },
46 { NE, "relop", " != " },
47 { EQ, "relop", " == " },
48 { LE, "relop", " <= " },

--- 53 unchanged lines hidden (view full) ---

102 { CALL, "call", "call" },
103 { ARG, "arg", "arg" },
104 { VARNF, "getnf", "NF" },
105 { GETLINE, "getline", "getline" },
106 { 0, "", "" },
107};
108
109#define SIZE (LASTTOKEN - FIRSTTOKEN + 1)
110char *table[SIZE];
110const char *table[SIZE];
111char *names[SIZE];
112
113int main(int argc, char *argv[])
114{
111char *names[SIZE];
112
113int main(int argc, char *argv[])
114{
115 struct xx *p;
115 const struct xx *p;
116 int i, n, tok;
117 char c;
118 FILE *fp;
119 char buf[200], name[200], def[200];
120
121 printf("#include <stdio.h>\n");
122 printf("#include \"awk.h\"\n");
123 printf("#include \"ytab.h\"\n\n");

--- 45 unchanged lines hidden ---
116 int i, n, tok;
117 char c;
118 FILE *fp;
119 char buf[200], name[200], def[200];
120
121 printf("#include <stdio.h>\n");
122 printf("#include \"awk.h\"\n");
123 printf("#include \"ytab.h\"\n\n");

--- 45 unchanged lines hidden ---