diff --git a/src/record_accessor/ra.l b/src/record_accessor/ra.l index 6027467aca3..a7850fda4f6 100644 --- a/src/record_accessor/ra.l +++ b/src/record_accessor/ra.l @@ -61,7 +61,6 @@ static inline char *remove_dup_quotes(const char *s, size_t n) "." | "," | ";" { return yytext[0]; } -\' return QUOTE; \n [ \t]+ /* ignore whitespace */; diff --git a/src/record_accessor/ra.y b/src/record_accessor/ra.y index 3b5d6a83292..9c4e25b87db 100644 --- a/src/record_accessor/ra.y +++ b/src/record_accessor/ra.y @@ -1,5 +1,5 @@ %define api.pure full -%name-prefix="flb_ra_" +%name-prefix "flb_ra_" %parse-param { struct flb_ra_parser *rp }; %parse-param { const char *str }; @@ -33,8 +33,7 @@ void flb_ra_error(struct flb_ra_parser *rp, const char *query, void *scanner, /* Known Tokens (refer to sql.l) */ /* Keywords */ -%token IDENTIFIER QUOTE QUOTED -%token STRING INTEGER +%token IDENTIFIER STRING INTEGER %define parse.error verbose @@ -85,7 +84,8 @@ record_accessor: record_key } flb_free($2); } - record_subkey: + record_subkey: record_subkey record_subkey_index | record_subkey_index + record_subkey_index: '[' STRING ']' { flb_ra_parser_subentry_add_string(rp, $2); @@ -96,6 +96,4 @@ record_accessor: record_key { flb_ra_parser_subentry_add_array_id(rp, $2); } - | - record_subkey record_subkey ;