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.
This commit is contained in:
Stephen Williams 2008-05-11 12:13:58 -07:00
parent 5b273178f5
commit a506a18970
2 changed files with 13 additions and 11 deletions

View File

@ -4,15 +4,15 @@
`else `else
`define DISCIPLINES_VAMS 1 `define DISCIPLINES_VAMS 1
discipline \logic discipline \logic ;
domain discrete; domain discrete;
enddiscipline enddiscipline
discipline ddiscrete discipline ddiscrete;
domain discrete; domain discrete;
enddiscipline enddiscipline
nature Current nature Current;
units = "A"; units = "A";
access = I; access = I;
idt_nature = Charge; idt_nature = Charge;
@ -23,7 +23,7 @@ nature Current
`endif `endif
endnature endnature
nature Charge nature Charge;
units = "coul"; units = "coul";
access = Q; access = Q;
ddt_nature = Current; ddt_nature = Current;
@ -34,7 +34,7 @@ nature Charge
`endif `endif
endnature endnature
nature Voltage nature Voltage;
units = "V"; units = "V";
access = V; access = V;
idt_nature = Flux; idt_nature = Flux;
@ -45,7 +45,7 @@ nature Voltage
`endif `endif
endnature endnature
nature Flux nature Flux;
units = "Wb"; units = "Wb";
access = Phi; access = Phi;
ddt_nature = Voltage; ddt_nature = Voltage;
@ -56,16 +56,16 @@ nature Flux
`endif `endif
endnature endnature
discipline electrical discipline electrical;
potential Voltage; potential Voltage;
flow Current; flow Current;
enddiscipline enddiscipline
discipline voltage discipline voltage;
potential Voltage; potential Voltage;
enddiscipline enddiscipline
discipline current discipline current;
flow Current; flow Current;
enddiscipline enddiscipline

View File

@ -673,7 +673,7 @@ description
; ;
discipline_declaration discipline_declaration
: K_discipline IDENTIFIER : K_discipline IDENTIFIER ';'
{ pform_start_discipline($2); } { pform_start_discipline($2); }
discipline_items K_enddiscipline discipline_items K_enddiscipline
{ pform_end_discipline(@1); delete[] $2; } { pform_end_discipline(@1); delete[] $2; }
@ -694,7 +694,9 @@ discipline_item
; ;
nature_declaration nature_declaration
: K_nature IDENTIFIER nature_items K_endnature : K_nature IDENTIFIER ';'
nature_items
K_endnature
{ delete[] $2; } { delete[] $2; }
; ;