Following PR is a cleanup demonstrating push/pop mode of defining CEL as an island grammar within OpenFGA.
Currently both CEL and OpenFGA grammars are mixed together. This change provides isolation of the CEL grammar between { } in the Lexer configuration, removing the need to have the Parser directly define a list of CEL tokens.
This is desirable because we are not doing semantic validation of CEL expressions, and only need to know what symbols are available for tokenization. This reduces the complexity of the Paser definition, and adds some resiliency for changes.
// TODO: Fix validation tests to use new symbol definitions in their comparisons.
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[ ] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected
Description
Following PR is a cleanup demonstrating push/pop mode of defining CEL as an island grammar within OpenFGA.
Currently both CEL and OpenFGA grammars are mixed together. This change provides isolation of the CEL grammar between
{ }
in the Lexer configuration, removing the need to have the Parser directly define a list of CEL tokens.This is desirable because we are not doing semantic validation of CEL expressions, and only need to know what symbols are available for tokenization. This reduces the complexity of the Paser definition, and adds some resiliency for changes.
// TODO: Fix validation tests to use new symbol definitions in their comparisons.
References
Review Checklist
main