diff options
| author | Adam Izraelevitz | 2015-10-19 13:56:32 -0700 |
|---|---|---|
| committer | Adam Izraelevitz | 2015-10-19 13:56:32 -0700 |
| commit | f258c8394ebe7136e0eee7e1e342b5b593d1cc5d (patch) | |
| tree | 5d000281afd7f217bee0c5c2030f3a17e079a3f0 /src/main/antlr4 | |
| parent | 154c7d86a104264a3e3355d105f8e60926a10626 (diff) | |
| parent | 80c055ce93c9d5988c6158c4a91c01633f8ebf22 (diff) | |
Merge pull request #47 from jackkoenig/master
Updated Scala FIRRTL with Testing and Infer-Types Pass
Diffstat (limited to 'src/main/antlr4')
| -rw-r--r-- | src/main/antlr4/FIRRTL.g4 | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main/antlr4/FIRRTL.g4 b/src/main/antlr4/FIRRTL.g4 index 08697bb1..96172895 100644 --- a/src/main/antlr4/FIRRTL.g4 +++ b/src/main/antlr4/FIRRTL.g4 @@ -1,7 +1,3 @@ -// Jack Koenig -// UC Berkeley ASPIRE Lab -// July 9, 2015 - grammar FIRRTL; /*------------------------------------------------------------------ @@ -33,8 +29,8 @@ portKind ; type - : 'UInt' '<' width '>' - | 'SInt' '<' width '>' + : 'UInt' ('<' width '>')? + | 'SInt' ('<' width '>')? | 'Clock' | '{' field* '}' // Bundle | type '[' IntLit ']' // Vector @@ -93,8 +89,8 @@ dir // TODO implement // What is exp? exp - : 'UInt' '<' width '>' '(' (IntLit) ')' // FIXME what does "ints" mean? - | 'SInt' '<' width '>' '(' (IntLit) ')' // FIXME same + : 'UInt' ('<' width '>')? '(' (IntLit) ')' // FIXME what does "ints" mean? + | 'SInt' ('<' width '>')? '(' (IntLit) ')' // FIXME same | id // Ref | exp '.' id // FIXME Does this work for no space? | exp '[' IntLit ']' @@ -129,6 +125,8 @@ primop | 'geq' | 'eq' | 'neq' + | 'eqv' + | 'neqv' | 'mux' | 'pad' | 'asUInt' |
