Fixed: [Issue 154] Allow more than one semicolon at the end of a message
field.
diff --git a/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/bugs/Issue154_AllowMultipleSemicolons_Test.java b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/bugs/Issue154_AllowMultipleSemicolons_Test.java
new file mode 100644
index 0000000..26f74f5
--- /dev/null
+++ b/com.google.eclipse.protobuf.test/src/com/google/eclipse/protobuf/bugs/Issue154_AllowMultipleSemicolons_Test.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011 Google Inc.
+ *
+ * All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse
+ * Public License v1.0 which accompanies this distribution, and is available at
+ *
+ * http://www.eclipse.org/legal/epl-v10.html
+ */
+package com.google.eclipse.protobuf.bugs;
+
+import static com.google.eclipse.protobuf.junit.core.Setups.unitTestSetup;
+import static com.google.eclipse.protobuf.junit.core.XtextRule.createWith;
+import static org.junit.Assert.assertNotNull;
+
+import com.google.eclipse.protobuf.junit.core.XtextRule;
+
+import org.junit.*;
+
+/**
+ * Tests fix for <a href="http://code.google.com/p/protobuf-dt/issues/detail?id=154">Issue 154</a>.
+ *
+ * @author alruiz@google.com (Alex Ruiz)
+ */
+public class Issue154_AllowMultipleSemicolons_Test {
+
+ @Rule public XtextRule xtext = createWith(unitTestSetup());
+
+ // syntax = "proto2";
+ //
+ // message Foo {
+ // optional double bar = 1 [deprecated = true];;
+ // }
+ @Test public void should_allow_multiple_semicolons_at_the_end_of_property() {
+ assertNotNull(xtext.root());
+ }
+}
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 69ec1ee..e90bb84 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
@@ -72,7 +72,7 @@
Property:
modifier=Modifier type=AbstractTypeRef name=Name '=' index=(LONG | HEX)
- ('[' fieldOptions+=FieldOption (',' fieldOptions+=FieldOption)* ']')? ';';
+ ('[' fieldOptions+=FieldOption (',' fieldOptions+=FieldOption)* ']')? (';')+;
enum Modifier:
required