Skip to content

Commit

Permalink
require arg
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Oct 24, 2023
1 parent 51ed0f3 commit 2b0b525
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion grammar/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ class SiriGrammar(Grammar):
'(', Optional(time_expr), ')')
f_offset = Sequence(
k_offset,
'(', Optional(time_expr), ')')
'(', time_expr, ')')
f_timeval = Sequence(
k_timeval,
'(', ')')
Expand Down
2 changes: 1 addition & 1 deletion include/siri/grammar/grammar.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* should be used with the libcleri module.
*
* Source class: SiriGrammar
* Created at: 2023-10-24 14:29:56
* Created at: 2023-10-24 15:46:26
*/
#ifndef CLERI_EXPORT_SIRI_GRAMMAR_GRAMMAR_H_
#define CLERI_EXPORT_SIRI_GRAMMAR_GRAMMAR_H_
Expand Down
2 changes: 1 addition & 1 deletion include/siri/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Note that debian alpha packages should use versions like this:
* 2.0.34-0alpha0
*/
#define SIRIDB_VERSION_PRE_RELEASE "-alpha-1"
#define SIRIDB_VERSION_PRE_RELEASE "-alpha-2"

#ifndef NDEBUG
#define SIRIDB_VERSION_BUILD_RELEASE "+debug"
Expand Down
11 changes: 3 additions & 8 deletions src/siri/db/aggregate.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,10 @@ vec_t * siridb_aggregate_list(cleri_children_t * children, char * err_msg)
siridb_aggregate_list_free(vec);
return NULL;
}
if (cleri_gn(cleri_gn(children)->children)
->children->next->next->next != NULL)
{
/* group_by is always > 0 */
aggr->offset = CLERI_NODE_DATA(
cleri_gn(cleri_gn(cleri_gn(cleri_gn(children)
->children)->children->next->next)->children)
) % aggr->group_by;
}
aggr->offset = CLERI_NODE_DATA(
cleri_gn(cleri_gn(cleri_gn(children)
->children)->children->next->next)) % aggr->group_by;
break;
case CLERI_GID_F_LIMIT:
AGGR_NEW
Expand Down
7 changes: 3 additions & 4 deletions src/siri/grammar/grammar.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* should be used with the libcleri module.
*
* Source class: SiriGrammar
* Created at: 2023-10-24 14:29:56
* Created at: 2023-10-24 15:46:26
*/

#include "siri/grammar/grammar.h"
Expand Down Expand Up @@ -1056,7 +1056,7 @@ cleri_grammar_t * compile_siri_grammar_grammar(void)
4,
k_offset,
cleri_token(CLERI_NONE, "("),
cleri_optional(CLERI_NONE, time_expr),
time_expr,
cleri_token(CLERI_NONE, ")")
);
cleri_t * f_timeval = cleri_sequence(
Expand Down Expand Up @@ -1103,8 +1103,7 @@ cleri_grammar_t * compile_siri_grammar_grammar(void)
cleri_choice(
CLERI_NONE,
CLERI_FIRST_MATCH,
14,
k_offset,
13,
k_mean,
k_median,
k_median_high,
Expand Down

0 comments on commit 2b0b525

Please sign in to comment.