Skip to content
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

Parser enum bug #669

Open
tomas99batista opened this issue Jun 2, 2021 · 0 comments
Open

Parser enum bug #669

tomas99batista opened this issue Jun 2, 2021 · 0 comments

Comments

@tomas99batista
Copy link

When parsing enum values the parser has a greedy approach, resulting in an error.

I have an enum

enum Operator {
  o EQUAL // Equal
  o NOT_EQUAL // Not Equal
  o GREATER // Greater
  o GREATER_EQUAL // Greater or Equal
  o LESS // Less
  o LESS_EQUAL // Less or Equal
}

and when using the values on the markdown text I can't use the values GREATER_EQUAL and LESS_EQUAL . All the other values are okay and even this last 2 are ok when using them inside an emit on the logic.

9:46:15 AM - error: Parse error at line 20 column 109
2. "response_time" : "http://www.provider.com/metrics/response-time" - "milliseconds" ("80"). Operator: LESS_EQUAL, tolerance: "15", consequence: "Extra credit at the end of the billing cycle".
                                                                                                            ^^^^^^^^^^^^^
Expected: ', tolerance: '

&

9:46:02 AM - error: Parse error at line 20 column 112
2. "response_time" : "http://www.provider.com/metrics/response-time" - "milliseconds" ("80"). Operator: GREATER_EQUAL, tolerance: "15", consequence: "Extra credit at the end of the billing cycle".
                                                                                                               ^^^^^^^^^^^^^
Expected: ', tolerance: '

Expected Behavior

It should parse GREATER_EQUAL and not interpret that is a GREATER and _EQUAL is some additional text that should not be there.

Steps to Reproduce

files can be seen here: https://filebin.net/sxuo28ictd18n7ws

run cicero parse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant