@@ -130,37 +130,37 @@ grammar Tstart_(I) : (start, idctxt) =
130130
131131;; Imports
132132
133- grammar Timport_(I)/plain : (name, externtype, idctxt) =
134- | "(" "item" nm_2:Tname (xt,I'):Texterntype_(I) ")" => (nm_2, xt, I')
135-
136- grammar Timports_(I)/plain : (import*, idctxt) =
137- | "(" "import" nm_1:Tname (nm_2,xt,I')*:Timport_(I)* ")" => ($concat_(import, IMPORT nm_1 nm_2 xt), I')
133+ grammar Timport_(I)/plain : (import, idctxt) =
134+ | "(" "import" nm_1:Tname nm_2:Tname (xt,I'):Texterntype_(I) ")" => (IMPORT nm_1 nm_2 xt, I')
138135 | ...
139136
140- grammar Timports_(I)/abbrev-tag : (import*, idctxt) = ...
137+ grammar Timports_(I)/abbrev : (import*, idctxt) =
138+ | "(" "import" nm_1:Tname ("(" "item" nm_2:Tname Texterntype_(I) ")")* ")" ==
139+ ("(" "import" nm_1:Tname nm_2:Tname Texterntype_(I) ")")*
140+
141+ grammar Timport_(I)/abbrev-tag : (import, idctxt) = ...
141142 | "(" "tag" Tid? "(" "import" Tname^2 ")" Ttagtype_(I) ")" ==
142- "(" "import" Tname "(" "item" Tname "(" " tag" Tid? Ttagtype_(I) ")" ")" ")"
143+ "(" "import" Tname^2 "(" "tag" Tid? Ttagtype_(I) ")" ")"
143144 | ...
144145
145- grammar Timports_ (I)/abbrev-global : (import* , idctxt) = ...
146+ grammar Timport_ (I)/abbrev-global : (import, idctxt) = ...
146147 | "(" "global" Tid? "(" "import" Tname^2 ")" Tglobaltype_(I) ")" ==
147- "(" "import" Tname "(" "item" Tname "(" " global" Tid? Tglobaltype_(I) ")" ")" ")"
148+ "(" "import" Tname^2 "(" "global" Tid? Tglobaltype_(I) ")" ")"
148149 | ...
149150
150- grammar Timports_ (I)/abbrev-mem : (import* , idctxt) = ...
151+ grammar Timport_ (I)/abbrev-mem : (import, idctxt) = ...
151152 | "(" "memory" Tid? "(" "import" Tname^2 ")" Tmemtype_(I) ")" ==
152- "(" "import" Tname "(" "item" Tname "(" " memory" Tid? Tmemtype_(I) ")" ")" ")"
153+ "(" "import" Tname^2 "(" "memory" Tid? Tmemtype_(I) ")" ")"
153154 | ...
154155
155- grammar Timports_ (I)/abbrev-table : (import* , idctxt) = ...
156+ grammar Timport_ (I)/abbrev-table : (import, idctxt) = ...
156157 | "(" "table" Tid? "(" "import" Tname^2 ")" Ttabletype_(I) ")" ==
157- "(" "import" Tname "(" "item" Tname "(" " table" Tid? Ttabletype_(I) ")" ")" ")"
158+ "(" "import" Tname^2 "(" "table" Tid? Ttabletype_(I) ")" ")"
158159 | ...
159160
160- grammar Timports_ (I)/abbrev-func : (import* , idctxt) = ...
161+ grammar Timport_ (I)/abbrev-func : (import, idctxt) = ...
161162 | "(" "func" Tid? "(" "import" Tname^2 ")" Ttypeuse_(I) ")" ==
162- "(" "import" Tname "(" "item" Tname "(" "func" Tid? Ttypeuse_(I) ")" ")" ")"
163-
163+ "(" "import" Tname^2 "(" "func" Tid? Ttypeuse_(I) ")" ")"
164164
165165;; Exports
166166
@@ -256,7 +256,7 @@ grammar Telemtable_(I)/abbrev : () hint(show Ttable_(%)) =
256256;; Modules
257257
258258syntax decl hint(name "declaration") =
259- type | import* | tag | global | mem | table | func | data | elem | start | export
259+ type | import | tag | global | mem | table | func | data | elem | start | export
260260
261261def $typesd(decl*) : type* hint(show $types(%)) hint(macro "typesd")
262262def $importsd(decl*) : import* hint(show $imports(%)) hint(macro "importsd")
@@ -323,7 +323,7 @@ def $ordered(decl_1* import decl_2*) =
323323
324324
325325grammar Tdecl_(I) : (decl, idctxt) =
326- | Ttype_(I) | Timports_ (I) | Ttag_(I) | Tglobal_(I) | Tmem_(I) | Ttable_(I)
326+ | Ttype_(I) | Timport_ (I) | Ttag_(I) | Tglobal_(I) | Tmem_(I) | Ttable_(I)
327327 | Tfunc_(I) | Tdata_(I) | Telem_(I) | Tstart_(I) | Texport_(I)
328328
329329
0 commit comments