aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-11-16 17:43:47 +0800
committerGitHub <noreply@github.com>2017-11-16 17:43:47 +0800
commit58e452d14dd3d2caa1d3edb7ff181c32820174e4 (patch)
treea549e6e81c113787eae6097e0d3d79d5d68e9e9c
parent0c1fc594efaf9d5768cd6dbc273a555ecd4bdd78 (diff)
parent58a0f09f8ed6b4f74ca5757408f7e19f27703ff5 (diff)
downloaddexon-solidity-58e452d14dd3d2caa1d3edb7ff181c32820174e4.tar.gz
dexon-solidity-58e452d14dd3d2caa1d3edb7ff181c32820174e4.tar.zst
dexon-solidity-58e452d14dd3d2caa1d3edb7ff181c32820174e4.zip
Merge pull request #3173 from federicobond/improve-number-grammar
Improve rule for decimal numbers in grammar.txt
-rw-r--r--docs/grammar.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/grammar.txt b/docs/grammar.txt
index 72364b7c..94fc2e1c 100644
--- a/docs/grammar.txt
+++ b/docs/grammar.txt
@@ -127,7 +127,7 @@ StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"'
Identifier = [a-zA-Z_$] [a-zA-Z_$0-9]*
HexNumber = '0x' [0-9a-fA-F]+
-DecimalNumber = [0-9]+
+DecimalNumber = [0-9]+ ( '.' [0-9]* )? ( [eE] [0-9]+ )?
TupleExpression = '(' ( Expression ( ',' Expression )* )? ')'
| '[' ( Expression ( ',' Expression )* )? ']'
@@ -143,9 +143,9 @@ Uint = 'uint' | 'uint8' | 'uint16' | 'uint24' | 'uint32' | 'uint40' | 'uint48' |
Byte = 'byte' | 'bytes' | 'bytes1' | 'bytes2' | 'bytes3' | 'bytes4' | 'bytes5' | 'bytes6' | 'bytes7' | 'bytes8' | 'bytes9' | 'bytes10' | 'bytes11' | 'bytes12' | 'bytes13' | 'bytes14' | 'bytes15' | 'bytes16' | 'bytes17' | 'bytes18' | 'bytes19' | 'bytes20' | 'bytes21' | 'bytes22' | 'bytes23' | 'bytes24' | 'bytes25' | 'bytes26' | 'bytes27' | 'bytes28' | 'bytes29' | 'bytes30' | 'bytes31' | 'bytes32'
-Fixed = 'fixed' | ( 'fixed' DecimalNumber 'x' DecimalNumber )
+Fixed = 'fixed' | ( 'fixed' [0-9]+ 'x' [0-9]+ )
-Ufixed = 'ufixed' | ( 'ufixed' DecimalNumber 'x' DecimalNumber )
+Ufixed = 'ufixed' | ( 'ufixed' [0-9]+ 'x' [0-9]+ )
InlineAssemblyBlock = '{' AssemblyItem* '}'