Skip to content

Commit be95b7a

Browse files
committed
Consolidate LexInit.lean
1 parent 9980f8f commit be95b7a

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

Auto/Parser/LexInit.lean

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ open Lean
44

55
namespace Auto.Lexer
66

7-
-- SMT-LIB2 compliant lexer
8-
--〈spec_constant〉 ::= 〈numeral〉 | 〈decimal〉 | 〈hexadecimal〉 | 〈binary〉 | 〈string〉
9-
--〈s_expr〉 ::= 〈spec_constant〉 | 〈symbol〉 | 〈keyword〉 | ( 〈s_expr〉∗ )
7+
/-
8+
SMT-LIB2 compliant lexer
9+
Contains all lexical categories used in 〈spec_constant〉 and 〈s_expr〉
10+
11+
〈spec_constant〉 ::= 〈numeral〉 | 〈decimal〉 | 〈hexadecimal〉 | 〈binary〉 | 〈string〉
12+
〈s_expr〉 ::= 〈spec_constant〉 | 〈symbol〉 | 〈keyword〉 | ( 〈s_expr〉∗ )
13+
14+
See https://smt-lib.org/papers/smt-lib-reference-v2.7-r2025-07-07.pdf P23
15+
-/
1016
namespace SMT
1117

1218
open Regex
@@ -87,10 +93,14 @@ def lexicon : ERE := .plus #[
8793
]
8894

8995
/-
96+
9097
#eval string.toADFA
98+
9199
#eval specConst.toADFA
92-
-- Good property: Each state have at most one attribute!
100+
101+
-- Good property: Each state has at most one attribute!
93102
#eval lexicon.toADFA
103+
94104
-/
95105

96106
local instance : Hashable Char where

0 commit comments

Comments
 (0)