Skip to content

Commit

Permalink
afprog: Fix the grammar so that program() source works again
Browse files Browse the repository at this point in the history
The grammar of the afprog module was a bit flaky, which resulted in
program() sources not being recognised, because the grammar couldn't
properly terminate the sentence, and skipped it instead. By refactoring
the grammar into the same style the program() destination uses, the
problem went away.

Fixes: elastic#34
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
  • Loading branch information
algernon committed Jul 25, 2013
1 parent 992253b commit ae021e7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/afprog/afprog-grammar.ym
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ source_afprogram_params
free($1);
last_reader_options = &((AFProgramSourceDriver *) last_driver)->reader_options;
}
source_reader_options { $$ = last_driver; }
source_afprogram_options { $$ = last_driver; }
;

source_afprogram_options
: source_afprogram_option source_afprogram_options
|
;

source_afprogram_option
: source_reader_option
;

dest_afprogram
Expand Down

0 comments on commit ae021e7

Please sign in to comment.