Permalink
Browse files

Nature and discipline declarations syntax

The VAMS-2.3 specification says that discipline and nature declarations
have a semi-colon after the identifier, but the disciplines.vams in
the appendix does not. Initial guess what that the disciplines.vams
is correct, but I've been told that the syntax is correct and the
disciplines.vams file is not.
  • Loading branch information...
1 parent 5b27317 commit a506a1897034016832c628411df88b06e81bc561 @steveicarus committed May 11, 2008
Showing with 13 additions and 11 deletions.
  1. +9 −9 disciplines.vams
  2. +4 −2 parse.y
View
@@ -4,15 +4,15 @@
`else
`define DISCIPLINES_VAMS 1
-discipline \logic
+discipline \logic ;
domain discrete;
enddiscipline
-discipline ddiscrete
+discipline ddiscrete;
domain discrete;
enddiscipline
-nature Current
+nature Current;
units = "A";
access = I;
idt_nature = Charge;
@@ -23,7 +23,7 @@ nature Current
`endif
endnature
-nature Charge
+nature Charge;
units = "coul";
access = Q;
ddt_nature = Current;
@@ -34,7 +34,7 @@ nature Charge
`endif
endnature
-nature Voltage
+nature Voltage;
units = "V";
access = V;
idt_nature = Flux;
@@ -45,7 +45,7 @@ nature Voltage
`endif
endnature
-nature Flux
+nature Flux;
units = "Wb";
access = Phi;
ddt_nature = Voltage;
@@ -56,16 +56,16 @@ nature Flux
`endif
endnature
-discipline electrical
+discipline electrical;
potential Voltage;
flow Current;
enddiscipline
-discipline voltage
+discipline voltage;
potential Voltage;
enddiscipline
-discipline current
+discipline current;
flow Current;
enddiscipline
View
@@ -673,7 +673,7 @@ description
;
discipline_declaration
- : K_discipline IDENTIFIER
+ : K_discipline IDENTIFIER ';'
{ pform_start_discipline($2); }
discipline_items K_enddiscipline
{ pform_end_discipline(@1); delete[] $2; }
@@ -694,7 +694,9 @@ discipline_item
;
nature_declaration
- : K_nature IDENTIFIER nature_items K_endnature
+ : K_nature IDENTIFIER ';'
+ nature_items
+ K_endnature
{ delete[] $2; }
;

0 comments on commit a506a18

Please sign in to comment.