-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pkg/ottl] Parsing of named arguments is whitespace dependent #27638
Labels
Comments
TylerHelmuth
added
bug
Something isn't working
needs triage
New item requiring triage
priority:p2
Medium
pkg/ottl
and removed
needs triage
New item requiring triage
labels
Oct 11, 2023
Additional testing revealed that |
Turns out that the |
evan-bradley
pushed a commit
that referenced
this issue
Oct 24, 2023
**Description:** Fixes an issue with the grammar where named parameters had to have a space after the `=`. **Link to tracking Issue:** Closes #27638 **Testing:** Added a new unit test
sigilioso
pushed a commit
to carlossscastro/opentelemetry-collector-contrib
that referenced
this issue
Oct 27, 2023
**Description:** Fixes an issue with the grammar where named parameters had to have a space after the `=`. **Link to tracking Issue:** Closes open-telemetry#27638 **Testing:** Added a new unit test
jmsnll
pushed a commit
to jmsnll/opentelemetry-collector-contrib
that referenced
this issue
Nov 12, 2023
**Description:** Fixes an issue with the grammar where named parameters had to have a space after the `=`. **Link to tracking Issue:** Closes open-telemetry#27638 **Testing:** Added a new unit test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
pkg/ottl
What happened?
Description
While testing out some optional parameter situations I discovered that the named argument parsing is whitespace dependent. This is in contrast with the rest of OTTL which does not depend on whitespace. I am not yet sure why this is happening as the grammar/tokens seem correct. The whitespace in
(@(Lowercase(Uppercase | Lowercase)*) Equal)?
is ignored by the parser and theEqual
token cannot appear inLowercase
orUppercase
.Steps to Reproduce
I added this test to parser_test.go:
Expected Result
Test passed
Actual Result
Got an error parsing the statement. No error occurs if the statement is written as
set(name = "foo")
The text was updated successfully, but these errors were encountered: