Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
8e8d44f4
Commit
8e8d44f4
authored
Oct 13, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow array struct fields
parent
a1cd6941
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
+12
-1
src/Language/SystemVerilog/Parser/Parse.y
+12
-1
No files found.
src/Language/SystemVerilog/Parser/Parse.y
View file @
8e8d44f4
...
@@ -496,7 +496,13 @@ StructItems :: { [(Type, Identifier)] }
...
@@ -496,7 +496,13 @@ StructItems :: { [(Type, Identifier)] }
: StructItem { $1 }
: StructItem { $1 }
| StructItems StructItem { $1 ++ $2 }
| StructItems StructItem { $1 ++ $2 }
StructItem :: { [(Type, Identifier)] }
StructItem :: { [(Type, Identifier)] }
: Type Identifiers ";" { map (\a -> ($1, a)) $2 }
: Type FieldDecls ";" { map (fieldDecl $1) $2 }
FieldDecls :: { [(Identifier, [Range])] }
: FieldDecl { [$1] }
| FieldDecls "," FieldDecl { $1 ++ [$3] }
FieldDecl :: { (Identifier, [Range]) }
: Identifier Dimensions { ($1, $2) }
Packing :: { Packing }
Packing :: { Packing }
: "packed" OptSigning { Packed $2 }
: "packed" OptSigning { Packed $2 }
...
@@ -1321,4 +1327,9 @@ makeParamDecls s t items =
...
@@ -1321,4 +1327,9 @@ makeParamDecls s t items =
(tf, rs) = typeRanges t
(tf, rs) = typeRanges t
mapper (x, e, a) = Param s (tf $ a ++ rs) x e
mapper (x, e, a) = Param s (tf $ a ++ rs) x e
fieldDecl :: Type -> (Identifier, [Range]) -> (Type, Identifier)
fieldDecl t (x, rs2) =
(tf $ rs2 ++ rs1, x)
where (tf, rs1) = typeRanges t
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment