From dbe62b2491a6ccce6bdd636b218e69b9bc12f53e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 29 Nov 2013 17:15:04 +0100 Subject: add _accessor_/prop_ to ragel actions to avoid name clash --- eo_tokenizer.rl | 24 ++++++++++++------------ 1 file 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) INF(" %s", toknz->tmp.accessor->comment); } - action end_rettype { + action end_accessor_rettype { if (toknz->tmp.accessor->ret.type != NULL) ABORT(toknz, "accessor has already a return type"); toknz->tmp.accessor->ret.type = _eo_tokenizer_token_get(toknz, fpc); INF(" %s", toknz->tmp.accessor->ret.type); } - action end_rettype_comment { + action end_accessor_rettype_comment { if (toknz->tmp.accessor->ret.comment != NULL) ABORT(toknz, "accessor return type has already a comment"); toknz->tmp.accessor->ret.comment = _eo_tokenizer_token_get(toknz, fpc-2); INF(" %s", toknz->tmp.accessor->ret.comment); } - action end_legacy { + action end_accessor_legacy { toknz->tmp.accessor->legacy = _eo_tokenizer_token_get(toknz, fpc); } @@ -250,10 +250,10 @@ _eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type) fgoto tokenize_property; } - rettype_comment = ws* eo_comment %end_rettype_comment; - rettype = 'return' ws+ alpha+ >save_fpc (alnum_u | '*' | ws )+ %end_rettype end_statement rettype_comment?; + rettype_comment = ws* eo_comment %end_accessor_rettype_comment; + rettype = 'return' ws+ alpha+ >save_fpc (alnum_u | '*' | ws )+ %end_accessor_rettype end_statement rettype_comment?; - legacy = 'legacy' ws+ ident %end_legacy end_statement; + legacy = 'legacy' ws+ ident %end_accessor_legacy end_statement; tokenize_accessor := |* ignore+; #=> show_ignore; @@ -335,16 +335,16 @@ _eo_tokenizer_accessor_get(Eo_Tokenizer *toknz, Eo_Accessor_Type type) fgoto tokenize_properties; } - get = 'get' ws* begin_def; - set = 'set' ws* begin_def; - params = 'params' ws* begin_def; + prop_get = 'get' ws* begin_def; + prop_set = 'set' ws* begin_def; + prop_params = 'params' ws* begin_def; tokenize_property := |* ignore+; #=> show_ignore; comment => show_comment; - get => begin_property_get; - set => begin_property_set; - params => begin_property_params; + prop_get => begin_property_get; + prop_set => begin_property_set; + prop_params => begin_property_params; end_def => end_property; any => show_error; *|; -- cgit v1.1-2-g2b99