Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëtan Gilbert
Iris
Commits
8239ab05
Commit
8239ab05
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
ProofMode intro patterns: accept _ as part of variable names
parent
d0743f7e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
proofmode/intro_patterns.v
+2
-3
2 additions, 3 deletions
proofmode/intro_patterns.v
proofmode/spec_patterns.v
+1
-0
1 addition, 0 deletions
proofmode/spec_patterns.v
with
3 additions
and
3 deletions
proofmode/intro_patterns.v
+
2
−
3
View file @
8239ab05
...
@@ -29,7 +29,6 @@ Module intro_pat.
...
@@ -29,7 +29,6 @@ Module intro_pat.
Inductive
token
:=
Inductive
token
:=
|
TName
:
string
→
token
|
TName
:
string
→
token
|
TAnom
:
token
|
TAnom
:
token
|
TDrop
:
token
|
TFrame
:
token
|
TFrame
:
token
|
TBar
:
token
|
TBar
:
token
|
TBracketL
:
token
|
TBracketL
:
token
...
@@ -55,7 +54,6 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token :=
...
@@ -55,7 +54,6 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token :=
match
s
with
match
s
with
|
""
=>
rev
(
cons_name
kn
k
)
|
""
=>
rev
(
cons_name
kn
k
)
|
String
"?"
s
=>
tokenize_go
s
(
TAnom
::
cons_name
kn
k
)
""
|
String
"?"
s
=>
tokenize_go
s
(
TAnom
::
cons_name
kn
k
)
""
|
String
"_"
s
=>
tokenize_go
s
(
TDrop
::
cons_name
kn
k
)
""
|
String
"$"
s
=>
tokenize_go
s
(
TFrame
::
cons_name
kn
k
)
""
|
String
"$"
s
=>
tokenize_go
s
(
TFrame
::
cons_name
kn
k
)
""
|
String
"["
s
=>
tokenize_go
s
(
TBracketL
::
cons_name
kn
k
)
""
|
String
"["
s
=>
tokenize_go
s
(
TBracketL
::
cons_name
kn
k
)
""
|
String
"]"
s
=>
tokenize_go
s
(
TBracketR
::
cons_name
kn
k
)
""
|
String
"]"
s
=>
tokenize_go
s
(
TBracketR
::
cons_name
kn
k
)
""
...
@@ -77,6 +75,7 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token :=
...
@@ -77,6 +75,7 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token :=
|
String
a
s
=>
|
String
a
s
=>
if
is_space
a
then
tokenize_go
s
(
cons_name
kn
k
)
""
if
is_space
a
then
tokenize_go
s
(
cons_name
kn
k
)
""
else
tokenize_go
s
k
(
String
a
kn
)
else
tokenize_go
s
k
(
String
a
kn
)
(* TODO: Complain about invalid characters, to future-proof this against making more characters special. *)
end
.
end
.
Definition
tokenize
(
s
:
string
)
:
list
token
:=
tokenize_go
s
[]
""
.
Definition
tokenize
(
s
:
string
)
:
list
token
:=
tokenize_go
s
[]
""
.
...
@@ -129,9 +128,9 @@ Fixpoint close_conj_list (k : stack)
...
@@ -129,9 +128,9 @@ Fixpoint close_conj_list (k : stack)
Fixpoint
parse_go
(
ts
:
list
token
)
(
k
:
stack
)
:
option
stack
:=
Fixpoint
parse_go
(
ts
:
list
token
)
(
k
:
stack
)
:
option
stack
:=
match
ts
with
match
ts
with
|
[]
=>
Some
k
|
[]
=>
Some
k
|
TName
"_"
::
ts
=>
parse_go
ts
(
SPat
IDrop
::
k
)
|
TName
s
::
ts
=>
parse_go
ts
(
SPat
(
IName
s
)
::
k
)
|
TName
s
::
ts
=>
parse_go
ts
(
SPat
(
IName
s
)
::
k
)
|
TAnom
::
ts
=>
parse_go
ts
(
SPat
IAnom
::
k
)
|
TAnom
::
ts
=>
parse_go
ts
(
SPat
IAnom
::
k
)
|
TDrop
::
ts
=>
parse_go
ts
(
SPat
IDrop
::
k
)
|
TFrame
::
ts
=>
parse_go
ts
(
SPat
IFrame
::
k
)
|
TFrame
::
ts
=>
parse_go
ts
(
SPat
IFrame
::
k
)
|
TBracketL
::
ts
=>
parse_go
ts
(
SList
::
k
)
|
TBracketL
::
ts
=>
parse_go
ts
(
SList
::
k
)
|
TBar
::
ts
=>
parse_go
ts
(
SBar
::
k
)
|
TBar
::
ts
=>
parse_go
ts
(
SBar
::
k
)
...
...
This diff is collapsed.
Click to expand it.
proofmode/spec_patterns.v
+
1
−
0
View file @
8239ab05
...
@@ -42,6 +42,7 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token :=
...
@@ -42,6 +42,7 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token :=
|
String
a
s
=>
|
String
a
s
=>
if
is_space
a
then
tokenize_go
s
(
cons_name
kn
k
)
""
if
is_space
a
then
tokenize_go
s
(
cons_name
kn
k
)
""
else
tokenize_go
s
k
(
String
a
kn
)
else
tokenize_go
s
k
(
String
a
kn
)
(* TODO: Complain about invalid characters, to future-proof this against making more characters special. *)
end
.
end
.
Definition
tokenize
(
s
:
string
)
:
list
token
:=
tokenize_go
s
[]
""
.
Definition
tokenize
(
s
:
string
)
:
list
token
:=
tokenize_go
s
[]
""
.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment