Paste: PEG bug

Author: slava
Mode: factor
Date: Thu, 29 Apr 2010 05:53:26
Plain Text |
diff --git a/extra/smalltalk/parser/parser.factor b/extra/smalltalk/parser/parser.factor
index c7cafe9..1294c58 100644
--- a/extra/smalltalk/parser/parser.factor
+++ b/extra/smalltalk/parser/parser.factor
@@ -145,12 +145,14 @@ UnaryMessageSend = (UnaryMessageSend | Operand):lhs
               (OptionalWhiteSpace ";" Message:m => [[ m ]])*:t
               => [[ lhs t h prefix >array <ast-cascade> ]]
 
-BinaryMessageSend = (BinaryMessageSend | UnaryMessageSend | Operand):lhs
+BinaryMessageSendLHS = (BinaryMessageSend | UnaryMessageSend | Operand)
+
+BinaryMessageSend = BinaryMessageSendLHS:lhs
               BinaryMessage:h
               (OptionalWhiteSpace ";" Message:m => [[ m ]])*:t
               => [[ lhs t h prefix >array <ast-cascade> ]]
 
-KeywordMessageSend = (BinaryMessageSend | UnaryMessageSend | Operand):lhs
+KeywordMessageSend = BinaryMessageSendLHS:lhs
               KeywordMessage:h
               (OptionalWhiteSpace ";" Message:m => [[ m ]])*:t
               => [[ lhs t h prefix >array <ast-cascade> ]]

New Annotation

Summary:
Author:
Mode:
Body: