Skip to content

Commit cc92e62

Browse files
dmitriplotnikovcopybara-github
authored andcommitted
[Pratt Parser] Add Lexer
PiperOrigin-RevId: 953000456
1 parent b09d209 commit cc92e62

6 files changed

Lines changed: 1535 additions & 12 deletions

File tree

parser/internal/BUILD

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
load("@rules_cc//cc:cc_library.bzl", "cc_library")
16+
load("@rules_cc//cc:cc_test.bzl", "cc_test")
1617
load("//bazel:antlr.bzl", "antlr_cc_library")
1718

1819
package(default_visibility = ["//visibility:public"])
@@ -29,3 +30,29 @@ antlr_cc_library(
2930
src = "Cel.g4",
3031
package = "cel_parser_internal",
3132
)
33+
34+
cc_library(
35+
name = "lexer",
36+
srcs = ["lexer.cc"],
37+
hdrs = ["lexer.h"],
38+
deps = [
39+
"//common:source",
40+
"@com_google_absl//absl/base:core_headers",
41+
"@com_google_absl//absl/base:no_destructor",
42+
"@com_google_absl//absl/container:flat_hash_map",
43+
"@com_google_absl//absl/functional:function_ref",
44+
"@com_google_absl//absl/log:absl_check",
45+
"@com_google_absl//absl/strings",
46+
"@com_google_absl//absl/strings:string_view",
47+
],
48+
)
49+
50+
cc_test(
51+
name = "lexer_test",
52+
srcs = ["lexer_test.cc"],
53+
deps = [
54+
":lexer",
55+
"//common:source",
56+
"//internal:testing",
57+
],
58+
)

0 commit comments

Comments
 (0)