Skip to content
Open
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
8 changes: 6 additions & 2 deletions parser/internal/antlr_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ class AntlrParserImpl final : public cel::Parser {
absl::flat_hash_set<std::string> library_ids)
: options_(options),
macro_registry_(std::move(macro_registry)),
library_ids_(std::move(library_ids)) {}
library_ids_(std::move(library_ids)) {
options_.enable_pratt_parser = false;
}

~AntlrParserImpl() override = default;

Expand Down Expand Up @@ -74,7 +76,9 @@ absl::StatusOr<std::unique_ptr<cel::Ast>> AntlrParseImpl(
class AntlrParserBuilderImpl final : public cel::ParserBuilder {
public:
explicit AntlrParserBuilderImpl(const cel::ParserOptions& options)
: options_(options) {}
: options_(options) {
options_.enable_pratt_parser = false;
}

cel::ParserOptions& GetOptions() override { return options_; }

Expand Down
2 changes: 1 addition & 1 deletion parser/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct ParserOptions final {
// This option is temporary and should not be used by new code outside of the
// early testing of the Pratt parser.
// TODO(b/527638023): Remove this option once the ANTLR parser is removed.
bool enable_pratt_parser = false;
bool enable_pratt_parser = true;
};

} // namespace cel
Expand Down
Loading