Commit 6cc4654a by Zachary Snow

support for real numbers

parent 39f6bbb3
...@@ -27,12 +27,17 @@ $decimalDigit = [0-9] ...@@ -27,12 +27,17 @@ $decimalDigit = [0-9]
@unsignedNumber = $decimalDigit ("_" | $decimalDigit)* @unsignedNumber = $decimalDigit ("_" | $decimalDigit)*
@sign = [\-\+]
@fixedPointNumber = @unsignedNumber "." @unsignedNumber
@floatingPointNumber = @unsignedNumber ("." @unsignedNumber)? [eE] @sign? @unsignedNumber
@size = @unsignedNumber " "? @size = @unsignedNumber " "?
@decimalNumber = @size? @decimalBase " "? @unsignedNumber @decimalNumber = @size? @decimalBase " "? @unsignedNumber
@binaryNumber = @size? @binaryBase " "? @binaryValue @binaryNumber = @size? @binaryBase " "? @binaryValue
@octalNumber = @size? @octalBase " "? @octalValue @octalNumber = @size? @octalBase " "? @octalValue
@hexNumber = @size? @hexBase " "? @hexValue @hexNumber = @size? @hexBase " "? @hexValue
@realNumber = @fixedPointNumber | @floatingPointNumber
@unbasedUnsizedLiteral = "'" ( 0 | 1 | x | X | z | Z ) @unbasedUnsizedLiteral = "'" ( 0 | 1 | x | X | z | Z )
...@@ -43,6 +48,7 @@ $decimalDigit = [0-9] ...@@ -43,6 +48,7 @@ $decimalDigit = [0-9]
| @binaryNumber | @binaryNumber
| @hexNumber | @hexNumber
| @unbasedUnsizedLiteral | @unbasedUnsizedLiteral
| @realNumber
-- Strings -- Strings
......
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