Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion g4/SecLangLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ CONFIG_DIR_SEC_TMP_DIR
: 'SecTmpDir' -> pushMode(FILE_PATH)
;

DIRECTIVE
CONFIG_DIR_SEC_RULE
: 'SecRule'
;

Expand Down
6 changes: 3 additions & 3 deletions g4/SecLangParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ configuration
;

stmt:
comment* rules_directive variables operator actions?
comment* engine_config_rule_directive variables operator actions?
| comment* rule_script_directive file_path actions?
| comment* rule_script_directive QUOTE file_path QUOTE actions?
| comment* remove_rule_by_id remove_rule_by_id_values+
Expand All @@ -43,8 +43,8 @@ comment:
HASH COMMENT?
;

rules_directive:
DIRECTIVE
engine_config_rule_directive:
CONFIG_DIR_SEC_RULE
;

engine_config_directive:
Expand Down
2 changes: 1 addition & 1 deletion listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (l *TreeShapeListener) EnterVar_count(ctx *parser.Var_countContext) {
l.results.CollectionLengthCount++
}

func (l *TreeShapeListener) EnterRules_directive(ctx *parser.Rules_directiveContext) {
func (l *TreeShapeListener) EnterEngine_config_rule_directive(ctx *parser.Engine_config_rule_directiveContext) {
l.results.DirectiveList = append(l.results.DirectiveList, ctx.GetText())
}

Expand Down
63 changes: 32 additions & 31 deletions parser/seclang_lexer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading