Mercurial > dnsbl
annotate src/tokenizer.cpp @ 191:2a67d31099c3 stable-6-0-13
fix null pointer dereference from missing HELO command
author | carl |
---|---|
date | Sat, 10 Nov 2007 16:20:51 -0800 |
parents | d6531c702be3 |
children | 4db1457cd11a |
rev | line source |
---|---|
72 | 1 /* |
2 | |
152 | 3 Copyright (c) 2007 Carl Byington - 510 Software Group, released under |
4 the GPL version 3 or any later version at your choice available at | |
5 http://www.gnu.org/licenses/gpl-3.0.txt | |
72 | 6 |
7 */ | |
8 | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
9 #include "includes.h" |
71 | 10 |
73 | 11 static char* tokenizer_version="$Id$"; |
71 | 12 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
13 const int maxlen = 1000; // used for snprintf buffers |
71 | 14 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
15 enum state {s_init, |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
16 s_token, |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
17 s_string, |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
18 s_ignore, // whitespace |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
19 s_eol, // ignore to eol |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
20 end_state, |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
21 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
22 s_term, // token terminator |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
23 s_single, |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
24 s_string1, // first " of string |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
25 s_string2, // last " of string |
102 | 26 s_slash // possible start of ignore to eol |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
27 }; |
71 | 28 |
29 typedef state PARSE[end_state]; | |
30 | |
31 static PARSE parse_table[256] = { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
32 // s_init s_token s_string s_ignore s_eol |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
33 { s_single, s_term, s_string, s_single, s_eol, }, // 0x00 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
34 { s_single, s_term, s_string, s_single, s_eol, }, // 0x01 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
35 { s_single, s_term, s_string, s_single, s_eol, }, // 0x02 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
36 { s_single, s_term, s_string, s_single, s_eol, }, // 0x03 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
37 { s_single, s_term, s_string, s_single, s_eol, }, // 0x04 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
38 { s_single, s_term, s_string, s_single, s_eol, }, // 0x05 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
39 { s_single, s_term, s_string, s_single, s_eol, }, // 0x06 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
40 { s_single, s_term, s_string, s_single, s_eol, }, // 0x07 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
41 { s_single, s_term, s_string, s_single, s_eol, }, // 0x08 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
42 { s_ignore, s_term, s_string, s_ignore, s_eol, }, // 0x09 <tab> |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
43 { s_ignore, s_term, s_string2, s_ignore, s_ignore, }, // 0x0a <lf> |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
44 { s_single, s_term, s_string, s_single, s_eol, }, // 0x0b |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
45 { s_single, s_term, s_string, s_single, s_eol, }, // 0x0c |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
46 { s_ignore, s_term, s_string2, s_ignore, s_eol, }, // 0x0d <cr> |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
47 { s_single, s_term, s_string, s_single, s_eol, }, // 0x0e |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
48 { s_single, s_term, s_string, s_single, s_eol, }, // 0x0f |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
49 { s_single, s_term, s_string, s_single, s_eol, }, // 0x10 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
50 { s_single, s_term, s_string, s_single, s_eol, }, // 0x11 xon char |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
51 { s_single, s_term, s_string, s_single, s_eol, }, // 0x12 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
52 { s_single, s_term, s_string, s_single, s_eol, }, // 0x13 xoff char |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
53 { s_single, s_term, s_string, s_single, s_eol, }, // 0x14 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
54 { s_single, s_term, s_string, s_single, s_eol, }, // 0x15 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
55 { s_single, s_term, s_string, s_single, s_eol, }, // 0x16 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
56 { s_single, s_term, s_string, s_single, s_eol, }, // 0x17 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
57 { s_single, s_term, s_string, s_single, s_eol, }, // 0x18 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
58 { s_single, s_term, s_string, s_single, s_eol, }, // 0x19 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
59 { s_single, s_term, s_string, s_single, s_eol, }, // 0x1a |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
60 { s_single, s_term, s_string, s_single, s_eol, }, // 0x1b |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
61 { s_single, s_term, s_string, s_single, s_eol, }, // 0x1c |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
62 { s_single, s_term, s_string, s_single, s_eol, }, // 0x1d |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
63 { s_single, s_term, s_string, s_single, s_eol, }, // 0x1e |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
64 { s_single, s_term, s_string, s_single, s_eol, }, // 0x1f |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
65 { s_ignore, s_term, s_string, s_ignore, s_eol, }, // 0x20 space |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
66 { s_single, s_term, s_string, s_single, s_eol, }, // 0x21 ! |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
67 { s_string1, s_term, s_string2, s_string1, s_eol, }, // 0x22 " |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
68 { s_eol, s_term, s_string, s_eol, s_eol, }, // 0x23 # |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
69 { s_single, s_term, s_string, s_single, s_eol, }, // 0x24 $ |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
70 { s_single, s_term, s_string, s_single, s_eol, }, // 0x25 % |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
71 { s_single, s_term, s_string, s_single, s_eol, }, // 0x26 & |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
72 { s_single, s_term, s_string, s_single, s_eol, }, // 0x27 ' |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
73 { s_single, s_term, s_string, s_single, s_eol, }, // 0x28 ( |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
74 { s_single, s_term, s_string, s_single, s_eol, }, // 0x29 ) |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
75 { s_single, s_term, s_string, s_single, s_eol, }, // 0x2A * |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
76 { s_single, s_token, s_string, s_single, s_eol, }, // 0x2B + |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
77 { s_single, s_term, s_string, s_single, s_eol, }, // 0x2C , |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
78 { s_single, s_token, s_string, s_single, s_eol, }, // 0x2D - |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
79 { s_single, s_token, s_string, s_single, s_eol, }, // 0x2E . |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
80 { s_slash, s_token, s_string, s_slash, s_eol, }, // 0x2F / |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
81 { s_token, s_token, s_string, s_token, s_eol, }, // 0x30 0 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
82 { s_token, s_token, s_string, s_token, s_eol, }, // 0x31 1 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
83 { s_token, s_token, s_string, s_token, s_eol, }, // 0x32 2 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
84 { s_token, s_token, s_string, s_token, s_eol, }, // 0x33 3 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
85 { s_token, s_token, s_string, s_token, s_eol, }, // 0x34 4 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
86 { s_token, s_token, s_string, s_token, s_eol, }, // 0x35 5 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
87 { s_token, s_token, s_string, s_token, s_eol, }, // 0x36 6 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
88 { s_token, s_token, s_string, s_token, s_eol, }, // 0x37 7 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
89 { s_token, s_token, s_string, s_token, s_eol, }, // 0x38 8 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
90 { s_token, s_token, s_string, s_token, s_eol, }, // 0x39 9 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
91 { s_single, s_term, s_string, s_single, s_eol, }, // 0x3A : |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
92 { s_single, s_term, s_string, s_single, s_eol, }, // 0x3B ; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
93 { s_single, s_term, s_string, s_single, s_eol, }, // 0x3C < |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
94 { s_single, s_token, s_string, s_single, s_eol, }, // 0x3D = |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
95 { s_single, s_term, s_string, s_single, s_eol, }, // 0x3E > |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
96 { s_single, s_term, s_string, s_single, s_eol, }, // 0x3F ? |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
97 { s_single, s_token, s_string, s_single, s_eol, }, // 0x40 @ |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
98 { s_token, s_token, s_string, s_token, s_eol, }, // 0x41 A |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
99 { s_token, s_token, s_string, s_token, s_eol, }, // 0x42 B |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
100 { s_token, s_token, s_string, s_token, s_eol, }, // 0x43 C |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
101 { s_token, s_token, s_string, s_token, s_eol, }, // 0x44 D |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
102 { s_token, s_token, s_string, s_token, s_eol, }, // 0x45 E |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
103 { s_token, s_token, s_string, s_token, s_eol, }, // 0x46 F |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
104 { s_token, s_token, s_string, s_token, s_eol, }, // 0x47 G |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
105 { s_token, s_token, s_string, s_token, s_eol, }, // 0x48 H |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
106 { s_token, s_token, s_string, s_token, s_eol, }, // 0x49 I |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
107 { s_token, s_token, s_string, s_token, s_eol, }, // 0x4A J |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
108 { s_token, s_token, s_string, s_token, s_eol, }, // 0x4B K |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
109 { s_token, s_token, s_string, s_token, s_eol, }, // 0x4C L |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
110 { s_token, s_token, s_string, s_token, s_eol, }, // 0x4D M |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
111 { s_token, s_token, s_string, s_token, s_eol, }, // 0x4E N |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
112 { s_token, s_token, s_string, s_token, s_eol, }, // 0x4F O |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
113 { s_token, s_token, s_string, s_token, s_eol, }, // 0x50 P |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
114 { s_token, s_token, s_string, s_token, s_eol, }, // 0x51 Q |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
115 { s_token, s_token, s_string, s_token, s_eol, }, // 0x52 R |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
116 { s_token, s_token, s_string, s_token, s_eol, }, // 0x53 S |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
117 { s_token, s_token, s_string, s_token, s_eol, }, // 0x54 T |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
118 { s_token, s_token, s_string, s_token, s_eol, }, // 0x55 U |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
119 { s_token, s_token, s_string, s_token, s_eol, }, // 0x56 V |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
120 { s_token, s_token, s_string, s_token, s_eol, }, // 0x57 W |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
121 { s_token, s_token, s_string, s_token, s_eol, }, // 0x58 X |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
122 { s_token, s_token, s_string, s_token, s_eol, }, // 0x59 Y |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
123 { s_token, s_token, s_string, s_token, s_eol, }, // 0x5A Z |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
124 { s_single, s_term, s_string, s_single, s_eol, }, // 0x5B [ |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
125 { s_single, s_term, s_string, s_single, s_eol, }, // 0x5C backslash |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
126 { s_single, s_term, s_string, s_single, s_eol, }, // 0x5D ] |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
127 { s_single, s_term, s_string, s_single, s_eol, }, // 0x5E ^ |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
128 { s_single, s_token, s_string, s_single, s_eol, }, // 0x5F _ |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
129 { s_single, s_term, s_string, s_single, s_eol, }, // 0x60 ` |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
130 { s_token, s_token, s_string, s_token, s_eol, }, // 0x61 a |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
131 { s_token, s_token, s_string, s_token, s_eol, }, // 0x62 b |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
132 { s_token, s_token, s_string, s_token, s_eol, }, // 0x63 c |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
133 { s_token, s_token, s_string, s_token, s_eol, }, // 0x64 d |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
134 { s_token, s_token, s_string, s_token, s_eol, }, // 0x65 e |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
135 { s_token, s_token, s_string, s_token, s_eol, }, // 0x66 f |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
136 { s_token, s_token, s_string, s_token, s_eol, }, // 0x67 g |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
137 { s_token, s_token, s_string, s_token, s_eol, }, // 0x68 h |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
138 { s_token, s_token, s_string, s_token, s_eol, }, // 0x69 i |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
139 { s_token, s_token, s_string, s_token, s_eol, }, // 0x6A j |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
140 { s_token, s_token, s_string, s_token, s_eol, }, // 0x6B k |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
141 { s_token, s_token, s_string, s_token, s_eol, }, // 0x6C l |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
142 { s_token, s_token, s_string, s_token, s_eol, }, // 0x6D m |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
143 { s_token, s_token, s_string, s_token, s_eol, }, // 0x6E n |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
144 { s_token, s_token, s_string, s_token, s_eol, }, // 0x6F o |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
145 { s_token, s_token, s_string, s_token, s_eol, }, // 0x70 p |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
146 { s_token, s_token, s_string, s_token, s_eol, }, // 0x71 q |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
147 { s_token, s_token, s_string, s_token, s_eol, }, // 0x72 r |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
148 { s_token, s_token, s_string, s_token, s_eol, }, // 0x73 s |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
149 { s_token, s_token, s_string, s_token, s_eol, }, // 0x74 t |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
150 { s_token, s_token, s_string, s_token, s_eol, }, // 0x75 u |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
151 { s_token, s_token, s_string, s_token, s_eol, }, // 0x76 v |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
152 { s_token, s_token, s_string, s_token, s_eol, }, // 0x77 w |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
153 { s_token, s_token, s_string, s_token, s_eol, }, // 0x78 x |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
154 { s_token, s_token, s_string, s_token, s_eol, }, // 0x79 y |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
155 { s_token, s_token, s_string, s_token, s_eol, }, // 0x7A z |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
156 { s_single, s_term, s_string, s_single, s_eol, }, // 0x7B { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
157 { s_single, s_term, s_string, s_single, s_eol, }, // 0x7C | |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
158 { s_single, s_term, s_string, s_single, s_eol, }, // 0x7D } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
159 { s_single, s_term, s_string, s_single, s_eol, }, // 0x7E ~ |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
160 { s_single, s_term, s_string, s_single, s_eol, }, // 0x7f |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
161 { s_single, s_term, s_string, s_single, s_eol, }, // 0x80 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
162 { s_single, s_term, s_string, s_single, s_eol, }, // 0x81 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
163 { s_single, s_term, s_string, s_single, s_eol, }, // 0x82 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
164 { s_single, s_term, s_string, s_single, s_eol, }, // 0x83 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
165 { s_single, s_term, s_string, s_single, s_eol, }, // 0x84 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
166 { s_single, s_term, s_string, s_single, s_eol, }, // 0x85 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
167 { s_single, s_term, s_string, s_single, s_eol, }, // 0x86 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
168 { s_single, s_term, s_string, s_single, s_eol, }, // 0x87 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
169 { s_single, s_term, s_string, s_single, s_eol, }, // 0x88 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
170 { s_single, s_term, s_string, s_single, s_eol, }, // 0x89 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
171 { s_single, s_term, s_string, s_single, s_eol, }, // 0x8a |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
172 { s_single, s_term, s_string, s_single, s_eol, }, // 0x8b |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
173 { s_single, s_term, s_string, s_single, s_eol, }, // 0x8c |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
174 { s_single, s_term, s_string, s_single, s_eol, }, // 0x8d |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
175 { s_single, s_term, s_string, s_single, s_eol, }, // 0x8e |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
176 { s_single, s_term, s_string, s_single, s_eol, }, // 0x8f |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
177 { s_single, s_term, s_string, s_single, s_eol, }, // 0x90 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
178 { s_single, s_term, s_string, s_single, s_eol, }, // 0x91 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
179 { s_single, s_term, s_string, s_single, s_eol, }, // 0x92 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
180 { s_single, s_term, s_string, s_single, s_eol, }, // 0x93 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
181 { s_single, s_term, s_string, s_single, s_eol, }, // 0x94 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
182 { s_single, s_term, s_string, s_single, s_eol, }, // 0x95 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
183 { s_single, s_term, s_string, s_single, s_eol, }, // 0x96 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
184 { s_single, s_term, s_string, s_single, s_eol, }, // 0x97 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
185 { s_single, s_term, s_string, s_single, s_eol, }, // 0x98 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
186 { s_single, s_term, s_string, s_single, s_eol, }, // 0x99 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
187 { s_single, s_term, s_string, s_single, s_eol, }, // 0x9a |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
188 { s_single, s_term, s_string, s_single, s_eol, }, // 0x9b |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
189 { s_single, s_term, s_string, s_single, s_eol, }, // 0x9c |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
190 { s_single, s_term, s_string, s_single, s_eol, }, // 0x9d |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
191 { s_single, s_term, s_string, s_single, s_eol, }, // 0x9e |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
192 { s_single, s_term, s_string, s_single, s_eol, }, // 0x9f |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
193 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa0 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
194 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa1 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
195 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa2 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
196 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa3 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
197 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa4 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
198 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa5 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
199 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa6 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
200 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa7 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
201 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa8 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
202 { s_single, s_term, s_string, s_single, s_eol, }, // 0xa9 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
203 { s_single, s_term, s_string, s_single, s_eol, }, // 0xaa |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
204 { s_single, s_term, s_string, s_single, s_eol, }, // 0xab |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
205 { s_single, s_term, s_string, s_single, s_eol, }, // 0xac |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
206 { s_single, s_term, s_string, s_single, s_eol, }, // 0xad |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
207 { s_single, s_term, s_string, s_single, s_eol, }, // 0xae |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
208 { s_single, s_term, s_string, s_single, s_eol, }, // 0xaf |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
209 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb0 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
210 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb1 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
211 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb2 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
212 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb3 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
213 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb4 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
214 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb5 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
215 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb6 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
216 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb7 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
217 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb8 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
218 { s_single, s_term, s_string, s_single, s_eol, }, // 0xb9 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
219 { s_single, s_term, s_string, s_single, s_eol, }, // 0xba |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
220 { s_single, s_term, s_string, s_single, s_eol, }, // 0xbb |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
221 { s_single, s_term, s_string, s_single, s_eol, }, // 0xbc |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
222 { s_single, s_term, s_string, s_single, s_eol, }, // 0xbd |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
223 { s_single, s_term, s_string, s_single, s_eol, }, // 0xbe |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
224 { s_single, s_term, s_string, s_single, s_eol, }, // 0xbf |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
225 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc0 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
226 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc1 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
227 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc2 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
228 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc3 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
229 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc4 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
230 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc5 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
231 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc6 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
232 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc7 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
233 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc8 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
234 { s_single, s_term, s_string, s_single, s_eol, }, // 0xc9 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
235 { s_single, s_term, s_string, s_single, s_eol, }, // 0xca |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
236 { s_single, s_term, s_string, s_single, s_eol, }, // 0xcb |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
237 { s_single, s_term, s_string, s_single, s_eol, }, // 0xcc |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
238 { s_single, s_term, s_string, s_single, s_eol, }, // 0xcd |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
239 { s_single, s_term, s_string, s_single, s_eol, }, // 0xce |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
240 { s_single, s_term, s_string, s_single, s_eol, }, // 0xcf |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
241 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd0 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
242 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd1 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
243 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd2 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
244 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd3 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
245 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd4 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
246 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd5 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
247 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd6 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
248 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd7 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
249 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd8 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
250 { s_single, s_term, s_string, s_single, s_eol, }, // 0xd9 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
251 { s_single, s_term, s_string, s_single, s_eol, }, // 0xda |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
252 { s_single, s_term, s_string, s_single, s_eol, }, // 0xdb |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
253 { s_single, s_term, s_string, s_single, s_eol, }, // 0xdc |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
254 { s_single, s_term, s_string, s_single, s_eol, }, // 0xdd |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
255 { s_single, s_term, s_string, s_single, s_eol, }, // 0xde |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
256 { s_single, s_term, s_string, s_single, s_eol, }, // 0xdf |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
257 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe0 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
258 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe1 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
259 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe2 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
260 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe3 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
261 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe4 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
262 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe5 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
263 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe6 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
264 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe7 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
265 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe8 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
266 { s_single, s_term, s_string, s_single, s_eol, }, // 0xe9 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
267 { s_single, s_term, s_string, s_single, s_eol, }, // 0xea |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
268 { s_single, s_term, s_string, s_single, s_eol, }, // 0xeb |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
269 { s_single, s_term, s_string, s_single, s_eol, }, // 0xec |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
270 { s_single, s_term, s_string, s_single, s_eol, }, // 0xed |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
271 { s_single, s_term, s_string, s_single, s_eol, }, // 0xee |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
272 { s_single, s_term, s_string, s_single, s_eol, }, // 0xef |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
273 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf0 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
274 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf1 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
275 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf2 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
276 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf3 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
277 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf4 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
278 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf5 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
279 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf6 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
280 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf7 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
281 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf8 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
282 { s_single, s_term, s_string, s_single, s_eol, }, // 0xf9 |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
283 { s_single, s_term, s_string, s_single, s_eol, }, // 0xfa |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
284 { s_single, s_term, s_string, s_single, s_eol, }, // 0xfb |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
285 { s_single, s_term, s_string, s_single, s_eol, }, // 0xfc |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
286 { s_single, s_term, s_string, s_single, s_eol, }, // 0xfd |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
287 { s_single, s_term, s_string, s_single, s_eol, }, // 0xfe |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
288 { s_single, s_term, s_string, s_single, s_eol, }, // 0xff |
71 | 289 }; |
290 | |
291 | |
292 TOKEN::TOKEN(char *fn, string_set *includes) { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
293 pushed = false; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
294 include_files = includes; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
295 include(fn); |
71 | 296 } |
297 | |
298 | |
299 TOKEN::~TOKEN() { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
300 while (!streams.empty()) pop(); |
71 | 301 } |
302 | |
303 | |
304 void TOKEN::pop() { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
305 ifstream *is = streams.front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
306 char *fn = filenames.front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
307 streams.pop_front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
308 filenames.pop_front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
309 filenamess.erase(fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
310 linenumbers.pop_front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
311 is->close(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
312 delete is; |
71 | 313 } |
314 | |
315 | |
316 void TOKEN::push_char(u_char c) { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
317 pushed = true; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
318 pushed_char = c; |
71 | 319 } |
320 | |
321 | |
322 bool TOKEN::next_char(u_char &uc) { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
323 if (pushed) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
324 uc = (u_char)tolower((char)pushed_char); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
325 pushed = false; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
326 return true; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
327 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
328 while (!streams.empty() && streams.front()->eof()) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
329 pop(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
330 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
331 if (streams.empty()) return false; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
332 ifstream *is = streams.front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
333 uc = (u_char)is->get(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
334 if (is->eof()) return next_char(uc); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
335 if (uc == (u_char)'\n') { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
336 int &line = linenumbers.front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
337 line++; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
338 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
339 uc = (u_char)tolower((char)uc); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
340 return true; |
71 | 341 } |
342 | |
343 | |
344 bool TOKEN::include(char *fn) { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
345 string_set::iterator i = filenamess.find(fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
346 if (i != filenamess.end()) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
347 token_error("redundant or recursive include file detected"); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
348 return false; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
349 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
350 ifstream *is = new ifstream; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
351 is->open(fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
352 if (is->fail()) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
353 char buf[maxlen]; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
354 snprintf(buf, sizeof(buf), "include file %s not found", fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
355 token_error(buf); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
356 return false; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
357 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
358 string_set &inc = *include_files; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
359 inc.insert(fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
360 streams.push_front(is); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
361 filenames.push_front(fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
362 filenamess.insert(fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
363 linenumbers.push_front(1); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
364 return true; |
71 | 365 } |
366 | |
367 | |
368 char *TOKEN::next() { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
369 if (!pending_tokens.empty()) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
370 char *t = pending_tokens.front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
371 pending_tokens.pop_front(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
372 return t; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
373 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
374 if (streams.empty()) return NULL; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
375 const int PENDING_LIMIT = 1000; |
178 | 376 u_char buffer[PENDING_LIMIT]; |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
377 int count = 0; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
378 state st = s_init; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
379 while (true) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
380 if (count == (PENDING_LIMIT-1)) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
381 token_error("token too long"); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
382 break; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
383 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
384 if (st >= end_state) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
385 token_error("finite state machine error"); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
386 break; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
387 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
388 u_char c; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
389 if (!next_char(c)) break; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
390 st = parse_table[c][st]; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
391 switch (st) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
392 case s_string: |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
393 case s_token: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
394 buffer[count++] = c; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
395 } break; |
71 | 396 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
397 case s_term: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
398 push_char(c); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
399 st = s_init; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
400 } break; |
71 | 401 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
402 case s_string1: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
403 st = s_string; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
404 } break; |
71 | 405 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
406 case s_string2: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
407 st = s_init; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
408 } break; |
71 | 409 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
410 case s_single: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
411 buffer[count++] = c; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
412 st = s_init; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
413 } break; |
71 | 414 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
415 case s_ignore: |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
416 case s_eol: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
417 } break; |
71 | 418 |
419 | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
420 case s_slash: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
421 buffer[count++] = c; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
422 if (next_char(c)) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
423 if (c == (u_char)'/') { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
424 // start of ignore to eol on // |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
425 count--; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
426 st = s_eol; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
427 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
428 else { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
429 // not a // token, just return this single / |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
430 push_char(c); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
431 st = s_init; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
432 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
433 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
434 else { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
435 // cannot get another char |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
436 st = s_init; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
437 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
438 } break; |
71 | 439 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
440 default: { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
441 token_error(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
442 token_error("unknown state %d %s \n", st, " "); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
443 } break; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
444 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
445 if (st == s_init) break; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
446 } |
71 | 447 |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
448 buffer[count] = '\0'; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
449 if (count == 0) return NULL; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
450 char *t = register_string((char*)buffer); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
451 if (t == token_include) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
452 char *f = next(); // should be file name |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
453 char *s = next(); // should be semicolon |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
454 if (s == token_semi) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
455 include(f); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
456 return next(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
457 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
458 else { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
459 push(s); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
460 push(f); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
461 return t; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
462 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
463 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
464 return t; |
71 | 465 } |
466 | |
467 | |
468 int TOKEN::nextint() { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
469 char *t = next(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
470 char *e; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
471 long i = strtol(t, &e, 10); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
472 if (*e != '\0') { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
473 token_error("integer", t); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
474 return 0; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
475 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
476 return (int)i; |
71 | 477 } |
478 | |
479 | |
480 void TOKEN::skipeol() { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
481 while (true) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
482 u_char c; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
483 if (!next_char(c)) break; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
484 if (c == (u_char)'\n') break; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
485 } |
71 | 486 } |
487 | |
488 | |
489 void TOKEN::token_error(const char *err) { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
490 token_error(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
491 char buf[maxlen]; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
492 snprintf(buf, sizeof(buf), "%s \n", err); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
493 my_syslog(buf); |
71 | 494 } |
495 | |
496 | |
497 void TOKEN::token_error(const char *fmt, int d, const char *s) { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
498 char buf[maxlen]; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
499 snprintf(buf, sizeof(buf), fmt, d, s); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
500 my_syslog(buf); |
71 | 501 } |
502 | |
503 | |
504 void TOKEN::token_error(const char *fmt, const char *t, const char *h) { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
505 if (!h) h = "null"; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
506 char buf[maxlen]; |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
507 snprintf(buf, sizeof(buf), fmt, t, h); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
508 my_syslog(buf); |
71 | 509 } |
510 | |
511 | |
75 | 512 void TOKEN::token_error(const char *want, const char *have) { |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
513 token_error(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
514 token_error("expecting %s, found %s \n", want, have); |
71 | 515 } |
516 | |
517 | |
518 void TOKEN::token_error() { | |
98
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
519 token_error("syntax error at line %d in file %s -- ", cur_line(), cur_fn()); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
520 line_list::iterator j = linenumbers.begin(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
521 string_list::iterator i = filenames.begin(); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
522 for (; i!=filenames.end(); i++,j++) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
523 if (i != filenames.begin()) { |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
524 char *fn = (*i); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
525 int li = (*j); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
526 token_error("\n included from line %d in file %s -- ", li, fn); |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
527 } |
91c27c00048f
tokenizer errors now go thru syslog to be visible during config file reloads in normal operation
carl
parents:
75
diff
changeset
|
528 } |
71 | 529 } |
530 |