summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-11-29 17:15:04 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-11-29 17:15:04 +0100
commitdbe62b2491a6ccce6bdd636b218e69b9bc12f53e (patch)
tree972129687b010ca330b6aa357f2ea60fab12519f
parentb5610312465a6d6d4505cbdb153b9bd506157a39 (diff)
add _accessor_/prop_ to ragel actions to avoid name clash
-rw-r--r--eo_tokenizer.rl24
1 files changed, 12 insertions, 12 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl
index b9c1a91..84007f0 100644
--- a/eo_tokenizer.rl
+++ b/eo_tokenizer.rl
@@ -224,21 +224,21 @@ _eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type)
224 INF(" %s", toknz->tmp.accessor->comment); 224 INF(" %s", toknz->tmp.accessor->comment);
225 } 225 }
226 226
227 action end_rettype { 227 action end_accessor_rettype {
228 if (toknz->tmp.accessor->ret.type != NULL) 228 if (toknz->tmp.accessor->ret.type != NULL)
229 ABORT(toknz, "accessor has already a return type"); 229 ABORT(toknz, "accessor has already a return type");
230 toknz->tmp.accessor->ret.type = _eo_tokenizer_token_get(toknz, fpc); 230 toknz->tmp.accessor->ret.type = _eo_tokenizer_token_get(toknz, fpc);
231 INF(" %s", toknz->tmp.accessor->ret.type); 231 INF(" %s", toknz->tmp.accessor->ret.type);
232 } 232 }
233 233
234 action end_rettype_comment { 234 action end_accessor_rettype_comment {
235 if (toknz->tmp.accessor->ret.comment != NULL) 235 if (toknz->tmp.accessor->ret.comment != NULL)
236 ABORT(toknz, "accessor return type has already a comment"); 236 ABORT(toknz, "accessor return type has already a comment");
237 toknz->tmp.accessor->ret.comment = _eo_tokenizer_token_get(toknz, fpc-2); 237 toknz->tmp.accessor->ret.comment = _eo_tokenizer_token_get(toknz, fpc-2);
238 INF(" %s", toknz->tmp.accessor->ret.comment); 238 INF(" %s", toknz->tmp.accessor->ret.comment);
239 } 239 }
240 240
241 action end_legacy { 241 action end_accessor_legacy {
242 toknz->tmp.accessor->legacy = _eo_tokenizer_token_get(toknz, fpc); 242 toknz->tmp.accessor->legacy = _eo_tokenizer_token_get(toknz, fpc);
243 } 243 }
244 244
@@ -250,10 +250,10 @@ _eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type)
250 fgoto tokenize_property; 250 fgoto tokenize_property;
251 } 251 }
252 252
253 rettype_comment = ws* eo_comment %end_rettype_comment; 253 rettype_comment = ws* eo_comment %end_accessor_rettype_comment;
254 rettype = 'return' ws+ alpha+ >save_fpc (alnum_u | '*' | ws )+ %end_rettype end_statement rettype_comment?; 254 rettype = 'return' ws+ alpha+ >save_fpc (alnum_u | '*' | ws )+ %end_accessor_rettype end_statement rettype_comment?;
255 255
256 legacy = 'legacy' ws+ ident %end_legacy end_statement; 256 legacy = 'legacy' ws+ ident %end_accessor_legacy end_statement;
257 257
258 tokenize_accessor := |* 258 tokenize_accessor := |*
259 ignore+; #=> show_ignore; 259 ignore+; #=> show_ignore;
@@ -335,16 +335,16 @@ _eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type)
335 fgoto tokenize_properties; 335 fgoto tokenize_properties;
336 } 336 }
337 337
338 get = 'get' ws* begin_def; 338 prop_get = 'get' ws* begin_def;
339 set = 'set' ws* begin_def; 339 prop_set = 'set' ws* begin_def;
340 params = 'params' ws* begin_def; 340 prop_params = 'params' ws* begin_def;
341 341
342 tokenize_property := |* 342 tokenize_property := |*
343 ignore+; #=> show_ignore; 343 ignore+; #=> show_ignore;
344 comment => show_comment; 344 comment => show_comment;
345 get => begin_property_get; 345 prop_get => begin_property_get;
346 set => begin_property_set; 346 prop_set => begin_property_set;
347 params => begin_property_params; 347 prop_params => begin_property_params;
348 end_def => end_property; 348 end_def => end_property;
349 any => show_error; 349 any => show_error;
350 *|; 350 *|;