aboutsummaryrefslogtreecommitdiff
path: root/src/json-lex.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/json-lex.l')
-rw-r--r--src/json-lex.l22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/json-lex.l b/src/json-lex.l
index 169cf32..1068404 100644
--- a/src/json-lex.l
+++ b/src/json-lex.l
@@ -22,16 +22,16 @@
22 You should have received a copy of the GNU General Public License 22 You should have received a copy of the GNU General Public License
23 along with Grecs. If not, see <http://www.gnu.org/licenses/>. */ 23 along with Grecs. If not, see <http://www.gnu.org/licenses/>. */
24 24
25#include "grecs.h" 25#include "argot.h"
26#include "json-gram.h" 26#include "json-gram.h"
27#include "grecs/json.h" 27#include "argot/json.h"
28 28
29static char const *input_ptr; 29static char const *input_ptr;
30static size_t input_size; 30static size_t input_size;
31struct grecs_locus_point json_current_locus_point; /* Input location */ 31struct argot_locus_point json_current_locus_point; /* Input location */
32 32
33char const *json_err_diag; 33char const *json_err_diag;
34struct grecs_locus json_err_locus; 34struct argot_locus json_err_locus;
35 35
36#undef YY_INPUT 36#undef YY_INPUT
37#define YY_INPUT(buf,result,max_size) \ 37#define YY_INPUT(buf,result,max_size) \
@@ -122,7 +122,7 @@ utf8_wctomb(char *u)
122 case 1: 122 case 1:
123 r[0] = wc; 123 r[0] = wc;
124 } 124 }
125 grecs_line_acc_grow(r, count); 125 argot_line_acc_grow(r, count);
126 return count; 126 return count;
127} 127}
128 128
@@ -148,13 +148,13 @@ yywrap()
148 return 1; 148 return 1;
149} 149}
150 150
151static struct grecs_txtacc *json_line_acc; 151static struct argot_txtacc *json_line_acc;
152 152
153static void 153static void
154json_line_begin() 154json_line_begin()
155{ 155{
156 if (!json_line_acc) 156 if (!json_line_acc)
157 json_line_acc = grecs_txtacc_create(); 157 json_line_acc = argot_txtacc_create();
158} 158}
159 159
160static char * 160static char *
@@ -162,8 +162,8 @@ json_line_finish()
162{ 162{
163 if (json_line_acc) { 163 if (json_line_acc) {
164 char nil = 0; 164 char nil = 0;
165 grecs_txtacc_grow(json_line_acc, &nil, 1); 165 argot_txtacc_grow(json_line_acc, &nil, 1);
166 return grecs_txtacc_finish(json_line_acc, 1); 166 return argot_txtacc_finish(json_line_acc, 1);
167 } 167 }
168 return NULL; 168 return NULL;
169} 169}
@@ -171,7 +171,7 @@ json_line_finish()
171static void 171static void
172json_line_grow(char const *text, size_t len) 172json_line_grow(char const *text, size_t len)
173{ 173{
174 grecs_txtacc_grow(json_line_acc, text, len); 174 argot_txtacc_grow(json_line_acc, text, len);
175} 175}
176%} 176%}
177D [0-9] 177D [0-9]
@@ -224,6 +224,6 @@ true { yylval.b = 1; return T_BOOL; }
224false { yylval.b = 0; return T_BOOL; } 224false { yylval.b = 0; return T_BOOL; }
225"{"|"}"|"["|"]"|":"|"," return yytext[0]; 225"{"|"}"|"["|"]"|":"|"," return yytext[0];
226[ \t]* ; 226[ \t]* ;
227\n grecs_locus_point_advance_line(json_current_locus_point); 227\n argot_locus_point_advance_line(json_current_locus_point);
228. { jsonlex_diag("bogus character"); 228. { jsonlex_diag("bogus character");
229 return T_ERR; } 229 return T_ERR; }

Return to:

Send suggestions and report system problems to the System administrator.