In progress: [Issue 27] Negative numbers not supported for default values https://code.google.com/p/protobuf-dt/issues/detail?id=27 In progress: [Issue 28] Add support for deprecated message fields https://code.google.com/p/protobuf-dt/issues/detail?id=28 Added initial work in the grammar.
diff --git a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext index fd6b46b..5b36a68 100644 --- a/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext +++ b/com.google.eclipse.protobuf/src/com/google/eclipse/protobuf/Protobuf.xtext
@@ -58,7 +58,7 @@ Property: modifier=Modifier type=AbstractTypeReference name=ID '=' index=INT (('[' 'default' '=' default=ValueRef - ']') | ('[' 'packed' '=' packed=BooleanRef ']'))? ';'; + ']') | ('[' 'packed' '=' packed=BooleanRef ']') | ('[' 'deprecated' '=' deprecated=BooleanRef ']') )? ';'; enum Modifier: required @@ -142,6 +142,6 @@ MessageReference: type=[Message | QualifiedName]; -terminal INT returns ecore::EInt: ('0'..'9')+; -terminal FLOAT returns ecore::EFloat: ('0'..'9')* ('.' ('0'..'9')+)?; +terminal INT returns ecore::EInt: ('-')? ('0'..'9')+; +terminal FLOAT returns ecore::EFloat: ('-')? ('0'..'9')* ('.' ('0'..'9')+)?; \ No newline at end of file