Graylog2 / Graylog2/graylog2-server

Pipeline rule language parsing error

Open
#18,605 0 comments 0 reactions 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

The grammar defined for ANTLR to recognize a nested expression fails when there are no whitespaces and an arithmetic operation is part of it, for example, function(a,function(b)-1). In this case, -1 is recognized as a SignedExpression, which leads to parsing failure since function SignedExpression is not a valid expression."

## Expected Behavior

Either we improve our documentation or improve the grammar for now we have multiple workarounds.
## Steps to Reproduce (for bugs)

Create a rule using the editor:
`````
rule "test"
when
true
then
let timeday = "011";
let timeday = substring(timeday,length(timeday)-2);
end

`````
## Context

gz#221

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.