Commit 1a170f41 by Zachary Snow

allow for stray semicolons in module items; allow for multiple struct field…

allow for stray semicolons in module items; allow for multiple struct field declarations on one line
parent 5dc049b9
...@@ -287,10 +287,10 @@ EnumItems :: { [(Identifier, Maybe Expr)] } ...@@ -287,10 +287,10 @@ EnumItems :: { [(Identifier, Maybe Expr)] }
: VariablePortIdentifiers { $1 } : VariablePortIdentifiers { $1 }
StructItems :: { [(Type, Identifier)] } StructItems :: { [(Type, Identifier)] }
: StructItem { [$1] } : StructItem { $1 }
| StructItems StructItem { $1 ++ [$2] } | StructItems StructItem { $1 ++ $2 }
StructItem :: { (Type, Identifier) } StructItem :: { [(Type, Identifier)] }
: Type Identifier ";" { ($1, $2) } : Type Identifiers ";" { map (\a -> ($1, a)) $2 }
Packing :: { Packing } Packing :: { Packing }
: "packed" Signing { Packed $2 } : "packed" Signing { Packed $2 }
...@@ -395,6 +395,7 @@ Direction :: { Direction } ...@@ -395,6 +395,7 @@ Direction :: { Direction }
ModuleItems :: { [ModuleItem] } ModuleItems :: { [ModuleItem] }
: {- empty -} { [] } : {- empty -} { [] }
| ModuleItems ModuleItem { $1 ++ $2 } | ModuleItems ModuleItem { $1 ++ $2 }
| ModuleItems ";" { $1 }
ModuleItem :: { [ModuleItem] } ModuleItem :: { [ModuleItem] }
-- This item covers module instantiations and all declarations -- This item covers module instantiations and all declarations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment