aboutsummaryrefslogtreecommitdiffhomepage
path: root/vernac/g_vernac.mlg
diff options
context:
space:
mode:
authorGravatar Vincent Laporte <Vincent.Laporte@gmail.com>2018-06-25 16:09:11 +0000
committerGravatar Vincent Laporte <Vincent.Laporte@gmail.com>2018-07-03 16:10:16 +0000
commitd3127693d4a2125088aa512f593d782843482f2a (patch)
treef96a8b0d0efd46ab223dc0d360ea7a48302dea0b /vernac/g_vernac.mlg
parent0a0e956929e28fd6f1c43f39d7b92aeeaf0f01e2 (diff)
[vernac] use plain strings as attribute names
The concrete syntax is still restricted to identifiers.
Diffstat (limited to 'vernac/g_vernac.mlg')
-rw-r--r--vernac/g_vernac.mlg14
1 files changed, 7 insertions, 7 deletions
diff --git a/vernac/g_vernac.mlg b/vernac/g_vernac.mlg
index 23b6898c3..3afe3391b 100644
--- a/vernac/g_vernac.mlg
+++ b/vernac/g_vernac.mlg
@@ -96,7 +96,7 @@ GRAMMAR EXTEND Gram
]
;
attribute:
- [ [ k = ident ; v = attribute_value -> (k, v) ]
+ [ [ k = ident ; v = attribute_value -> (Names.Id.to_string k, v) ]
]
;
attribute_value:
@@ -106,23 +106,23 @@ GRAMMAR EXTEND Gram
]
;
vernac:
- [ [ IDENT "Local"; v = vernac_poly -> { let (f, v) = v in ((Names.Id.of_string "local", VernacFlagEmpty) :: f, v) }
- | IDENT "Global"; v = vernac_poly -> { let (f, v) = v in ((Names.Id.of_string "global", VernacFlagEmpty) :: f, v) }
+ [ [ IDENT "Local"; v = vernac_poly -> { let (f, v) = v in (("local", VernacFlagEmpty) :: f, v) }
+ | IDENT "Global"; v = vernac_poly -> { let (f, v) = v in (("global", VernacFlagEmpty) :: f, v) }
| v = vernac_poly -> { v } ]
]
;
vernac_poly:
- [ [ IDENT "Polymorphic"; v = vernac_aux -> { let (f, v) = v in ((Names.Id.of_string "polymorphic", VernacFlagEmpty) :: f, v) }
- | IDENT "Monomorphic"; v = vernac_aux -> { let (f, v) = v in ((Names.Id.of_string "monomorphic", VernacFlagEmpty) :: f, v) }
+ [ [ IDENT "Polymorphic"; v = vernac_aux -> { let (f, v) = v in (("polymorphic", VernacFlagEmpty) :: f, v) }
+ | IDENT "Monomorphic"; v = vernac_aux -> { let (f, v) = v in (("monomorphic", VernacFlagEmpty) :: f, v) }
| v = vernac_aux -> { v } ]
]
;
vernac_aux:
(* Better to parse "." here: in case of failure (e.g. in coerce_to_var), *)
(* "." is still in the stream and discard_to_dot works correctly *)
- [ [ IDENT "Program"; g = gallina; "." -> { ([Names.Id.of_string "program", VernacFlagEmpty], g) }
- | IDENT "Program"; g = gallina_ext; "." -> { ([Names.Id.of_string "program", VernacFlagEmpty], g) }
+ [ [ IDENT "Program"; g = gallina; "." -> { (["program", VernacFlagEmpty], g) }
+ | IDENT "Program"; g = gallina_ext; "." -> { (["program", VernacFlagEmpty], g) }
| g = gallina; "." -> { ([], g) }
| g = gallina_ext; "." -> { ([], g) }
| c = command; "." -> { ([], c) }