Skip to content

Commit 2b0b525

Browse files
committed
require arg
1 parent 51ed0f3 commit 2b0b525

File tree

5 files changed

+9
-15
lines changed

5 files changed

+9
-15
lines changed

grammar/grammar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ class SiriGrammar(Grammar):
530530
'(', Optional(time_expr), ')')
531531
f_offset = Sequence(
532532
k_offset,
533-
'(', Optional(time_expr), ')')
533+
'(', time_expr, ')')
534534
f_timeval = Sequence(
535535
k_timeval,
536536
'(', ')')

include/siri/grammar/grammar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* should be used with the libcleri module.
66
*
77
* Source class: SiriGrammar
8-
* Created at: 2023-10-24 14:29:56
8+
* Created at: 2023-10-24 15:46:26
99
*/
1010
#ifndef CLERI_EXPORT_SIRI_GRAMMAR_GRAMMAR_H_
1111
#define CLERI_EXPORT_SIRI_GRAMMAR_GRAMMAR_H_

include/siri/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Note that debian alpha packages should use versions like this:
1616
* 2.0.34-0alpha0
1717
*/
18-
#define SIRIDB_VERSION_PRE_RELEASE "-alpha-1"
18+
#define SIRIDB_VERSION_PRE_RELEASE "-alpha-2"
1919

2020
#ifndef NDEBUG
2121
#define SIRIDB_VERSION_BUILD_RELEASE "+debug"

src/siri/db/aggregate.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,10 @@ vec_t * siridb_aggregate_list(cleri_children_t * children, char * err_msg)
229229
siridb_aggregate_list_free(vec);
230230
return NULL;
231231
}
232-
if (cleri_gn(cleri_gn(children)->children)
233-
->children->next->next->next != NULL)
234-
{
235232
/* group_by is always > 0 */
236-
aggr->offset = CLERI_NODE_DATA(
237-
cleri_gn(cleri_gn(cleri_gn(cleri_gn(children)
238-
->children)->children->next->next)->children)
239-
) % aggr->group_by;
240-
}
233+
aggr->offset = CLERI_NODE_DATA(
234+
cleri_gn(cleri_gn(cleri_gn(children)
235+
->children)->children->next->next)) % aggr->group_by;
241236
break;
242237
case CLERI_GID_F_LIMIT:
243238
AGGR_NEW

src/siri/grammar/grammar.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* should be used with the libcleri module.
66
*
77
* Source class: SiriGrammar
8-
* Created at: 2023-10-24 14:29:56
8+
* Created at: 2023-10-24 15:46:26
99
*/
1010

1111
#include "siri/grammar/grammar.h"
@@ -1056,7 +1056,7 @@ cleri_grammar_t * compile_siri_grammar_grammar(void)
10561056
4,
10571057
k_offset,
10581058
cleri_token(CLERI_NONE, "("),
1059-
cleri_optional(CLERI_NONE, time_expr),
1059+
time_expr,
10601060
cleri_token(CLERI_NONE, ")")
10611061
);
10621062
cleri_t * f_timeval = cleri_sequence(
@@ -1103,8 +1103,7 @@ cleri_grammar_t * compile_siri_grammar_grammar(void)
11031103
cleri_choice(
11041104
CLERI_NONE,
11051105
CLERI_FIRST_MATCH,
1106-
14,
1107-
k_offset,
1106+
13,
11081107
k_mean,
11091108
k_median,
11101109
k_median_high,

0 commit comments

Comments
 (0)