diff options
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' |
