summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
authorKathy Gray2013-11-01 17:03:40 +0000
committerKathy Gray2013-11-01 17:03:40 +0000
commitb3a69210b3e3d1b5ebc1d6687884ecfe3fd202f2 (patch)
treeaef92a73dfda5888cdb53d2b0af77298edd82863 /src/parser.mly
parent7fdb44465a2eb169946ec0e23b4056aafabe1b93 (diff)
Moved metatheory grammars into l2_rules.ott
Added val extern specification to language, parser, printer, and interpreter Added various def level type system support, expressions type system in place Except for assignment
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/parser.mly b/src/parser.mly
index a2257879..86da9a53 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -120,8 +120,8 @@ let star = "*"
/*Terminals with no content*/
-%token And As Bits By Case Clause Const Default Dec Effect Effects End Enumerate Else False
-%token Forall Foreach Function_ If_ In IN Inc Let_ Member Nat Order Pure Rec Register
+%token And As Bits By Case Clause Const Default Dec Effect Effects End Enumerate Else Extern
+%token False Forall Foreach Function_ If_ In IN Inc Let_ Member Nat Order Pure Rec Register
%token Scattered Struct Switch Then True Type TYPE Typedef Undefined Union With Val
/* Avoid shift/reduce conflict - see right_atomic_exp rule */
@@ -863,6 +863,10 @@ val_spec:
{ vloc (VS_val_spec(mk_typschm $2 $3 2 3,$4)) }
| Val atomic_typ id
{ vloc (VS_val_spec(mk_typschm (mk_typqn ()) $2 2 2,$3)) }
+ | Val Extern typquant atomic_typ id Eq String
+ { vloc (VS_extern_spec (mk_typschm $3 $4 3 4,$5,$7)) }
+ | Val Extern atomic_typ id Eq String
+ { vloc (VS_extern_spec (mk_typschm (mk_typqn ()) $3 3 3,$4, $6)) }
kinded_id:
| id