Author: mathk
Date: Fri Mar 21 15:56:46 2014
New Revision: 10607

URL: http://svn.gna.org/viewcvs/etoile?rev=10607&view=rev
Log:
Split PKActionExpression file

Added:
    
trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/Expressions/PKActionExpression.st
Modified:
    trunk/Etoile/Languages/ParserKit/GNUmakefile
    trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/LKInfo.plist
    trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/ParserKit.st

Modified: trunk/Etoile/Languages/ParserKit/GNUmakefile
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Languages/ParserKit/GNUmakefile?rev=10607&r1=10606&r2=10607&view=diff
==============================================================================
--- trunk/Etoile/Languages/ParserKit/GNUmakefile        (original)
+++ trunk/Etoile/Languages/ParserKit/GNUmakefile        Fri Mar 21 15:56:46 2014
@@ -29,6 +29,7 @@
        PKDelayInvocation.st\
        PKInputStream.st\
        PKEnvironmentStack.st\
+       Expressions/PKActionExpression.st\
        Expressions/PKParseExpression.st\
        Expressions/PKDotExpression.st\
        Expressions/PKAlphabeticExpression.st\

Added: 
trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/Expressions/PKActionExpression.st
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/Expressions/PKActionExpression.st?rev=10607&view=auto
==============================================================================
--- 
trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/Expressions/PKActionExpression.st
       (added)
+++ 
trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/Expressions/PKActionExpression.st
       Fri Mar 21 15:56:46 2014
@@ -0,0 +1,24 @@
+"
+Action expression attache a hook to the matching expression.
+"
+PKComposeExpression subclass: PKActionExpression [
+       | action |
+       
+       initWithExp: aExp action: anAction [
+               super initWithExp: aExp.
+               action := anAction
+       ]
+
+       parseInput: list withCurrentParser: parser delegate: delegate [
+               | match |
+               
+               match := exp parseInput: list withCurrentParser: parser 
delegate: delegate.
+               match isSuccess  ifTrue: [
+                       match attachAction: (action invocationInEnvironment: 
list environment originalMatch: match)
+               ].
+               
+               ^match
+       ]
+       description [ ^exp description, ' -> ', action description ]
+]
+

Modified: 
trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/LKInfo.plist
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/LKInfo.plist?rev=10607&r1=10606&r2=10607&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/ParserKit.st
URL: 
http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/ParserKit.st?rev=10607&r1=10606&r2=10607&view=diff
==============================================================================
--- trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/ParserKit.st    
(original)
+++ trunk/Etoile/Languages/ParserKit/ParserKit.bundle/Resources/ParserKit.st    
Fri Mar 21 15:56:46 2014
@@ -255,26 +255,6 @@
 
 ============================================================================
 "
-PKComposeExpression subclass: PKActionExpression [
-       | action |
-       
-       initWithExp: aExp action: anAction [
-               super initWithExp: aExp.
-               action := anAction
-       ]
-
-       parseInput: list withCurrentParser: parser delegate: delegate [
-               | match |
-               
-               match := exp parseInput: list withCurrentParser: parser 
delegate: delegate.
-               match isSuccess  ifTrue: [
-                       match attachAction: (action invocationInEnvironment: 
list environment originalMatch: match)
-               ].
-               
-               ^match
-       ]
-       description [ ^exp description, ' -> ', action description ]
-]
 
 " Restricted expressions are a quick hack to work around the fact that our 
   delegate based action syntax does not allow us to replace the parse match 
with


_______________________________________________
Etoile-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-cvs

Reply via email to