Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
8a0401df
Commit
8a0401df
authored
Feb 21, 2011
by
Jean-Christophe Filliâtre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
labels for record fields; documentation
parent
62748d47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
doc/theory.bnf
doc/theory.bnf
+22
-0
src/parser/parser.pre.mly
src/parser/parser.pre.mly
+2
-2
No files found.
doc/theory.bnf
View file @
8a0401df
...
...
@@ -11,6 +11,28 @@
| "clone" imp-exp tqualid ("as" uident-opt)? subst? ;
| "namespace" "import"? uident-opt decl* "end" ;
\
type-decl ::= lident label* ("'" lident label*)* type-defn;
\
type-defn ::= ; abstract type
| "=" type ; alias type
| "=" "|"? type-case ("|" type-case)* ; algebraic type
| "=" "{|" record-field (";" record-field)* "|}" ; record type
\
type-case ::= uident label* type-param*
\
record-field ::= lident label* ":" type
\
logic-decl ::= lident label* type-param* ":" type ;
| lident label* type-param* ":" type "=" term ;
| lident label* type-param* ;
| lident label* type-param* "=" formula
\
type-param ::= "'" lident ;
| lqualid ;
| "(" lident+ ":" type ")" ;
| "(" type ("," type)* ")" ;
| "()"
\
imp-exp ::= ("import" | "export")?
\
uident-opt ::= uident | "_"
...
...
src/parser/parser.pre.mly
View file @
8a0401df
...
...
@@ -406,8 +406,8 @@ list1_record_field:
;
record_field
:
|
opt_mutable
lident
COLON
primitive_type
{
loc
()
,
$
1
,
$
2
,
$
4
}
|
opt_mutable
lident
labels
COLON
primitive_type
{
loc
()
,
$
1
,
add_lab
$
2
$
3
,
$
5
}
;
typecases
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment