Fix missing 'ether' from NumberUnit. Extend StringLiteral syntax

This commit is contained in:
Nicolai 2016-07-20 17:07:26 +02:00
parent 9324393975
commit e1c69b11f4

View File

@ -16,7 +16,6 @@ ModifierDefinition = 'modifier' Identifier ParameterList? Block
FunctionDefinition = 'function' Identifier ParameterList
( Identifier | 'constant' | 'external' | 'public' | 'internal' | 'private' )*
( 'returns' (ParameterList | TypeParameterList) )? Block
EventDefinition = 'event' Identifier (ParameterList | TypeParameterList) ';'
EnumValue = Identifier
@ -63,11 +62,10 @@ PrimaryExpression = Identifier | BooleanLiteral | NumberLiteral | StringLiteral
BooleanLiteral = 'true' | 'false'
NumberLiteral = '0x'? [0-9]+ NumberUnit?
StringLiteral = '"' [a-zA-Z_0-9]* '"'
Identifier = [a-zA-Z_] [a-zA-Z_0-9]*
NumberUnit = 'wei' | 'szabo' | 'finney'
NumberUnit = 'wei' | 'szabo' | 'finney' | 'ether'
| 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'years'
StringLiteral = '"' (~('"' | '\\' | '\r' | '\n') | '\\' ('"' | '\\'))* '"';
Identifier = [a-zA-Z_] [a-zA-Z_0-9]*
ElementaryTypeName = 'address' | 'bool' | 'string' | 'var'
| 'int' | 'int8' | 'int16' | 'int24' | 'int32' | 'int40' | 'int48' | 'int56' | 'int64' | 'int72' | 'int80' | 'int88' | 'int96' | 'int104' | 'int112' | 'int120' | 'int128' | 'int136' | 'int144' | 'int152' | 'int160' | 'int168' | 'int176' | 'int184' | 'int192' | 'int200' | 'int208' | 'int216' | 'int224' | 'int232' | 'int240' | 'int248' | 'int256'