-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keyword detection: addressing examples 2 and 3 of issue #4712.
A contiguous sequence of characters must be fully inside or fully outside a keyword: no break of a keyword in the middle of a sequence of contiguous characters.
- Loading branch information
Showing
5 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Module Example1. | ||
|
||
Notation "x =_s y" := (x = y) (at level 50). | ||
Fail Check id=_sid. | ||
|
||
End Example1. | ||
|
||
Module Example2. | ||
(* see https://coq.zulipchat.com/#narrow/stream/237664-math-comp-users/topic/Surprising.20parsing.20of.20the.20.E2.80.9C*l.E2.80.9D.20notation *) | ||
|
||
Notation "*l" := Nat.add. | ||
Check forall (T lT: Type) (x: T*lT), x = x. (* Expected to be "(x : T * lT)" *) | ||
|
||
End Example2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
File "./output/bug_4712_part2.v", line 8, characters 21-22: | ||
Error: Syntax Error: Lexer: Undefined token | ||
|
||
|
||
coqc exited with code 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Module Example2. | ||
|
||
Notation "'foobar'" := 1. | ||
Definition a := foobar. | ||
Definition A := 2. | ||
Fail Definition b := foobarA. (* Good, as expected *) | ||
Notation "'\foobar'" := (fun x => 1 + x). | ||
Fail Definition b := \foobarA. | ||
|
||
End Example2. |