Source Code Cross Referenced for ExpWalker.java in  » Scripting » Nice » gnu » expr » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Scripting » Nice » gnu.expr 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package gnu.expr;
002:
003:        /** Class for doing a tree-walk over an Expression tree. */
004:
005:        public class ExpWalker {
006:            protected Expression walkExpression(Expression exp) {
007:                exp.walkChildren(this );
008:                return exp;
009:            }
010:
011:            protected Expression walkApplyExp(ApplyExp exp) {
012:                return walkExpression(exp);
013:            }
014:
015:            protected Expression walkIfExp(IfExp exp) {
016:                return walkExpression(exp);
017:            }
018:
019:            protected Expression walkScopeExp(ScopeExp exp) {
020:                return walkExpression(exp);
021:            }
022:
023:            protected Expression walkLetExp(LetExp exp) {
024:                return walkScopeExp(exp);
025:            }
026:
027:            protected Expression walkLambdaExp(LambdaExp exp) {
028:                return walkScopeExp(exp);
029:            }
030:
031:            protected Expression walkClassExp(ClassExp exp) {
032:                return walkLambdaExp(exp);
033:            }
034:
035:            protected Expression walkObjectExp(ObjectExp exp) {
036:                return walkClassExp(exp);
037:            }
038:
039:            protected Expression walkModuleExp(ModuleExp exp) {
040:                return walkLambdaExp(exp);
041:            }
042:
043:            protected Expression walkSetExp(SetExp exp) {
044:                return walkExpression(exp);
045:            }
046:
047:            protected Expression walkIncrementExp(IncrementExp exp) {
048:                return walkExpression(exp);
049:            }
050:
051:            //protected Expression walkSwitchExp (SwitchExp exp) { return walkExpression(exp); }
052:            protected Expression walkTryExp(TryExp exp) {
053:                return walkExpression(exp);
054:            }
055:
056:            protected Expression walkBeginExp(BeginExp exp) {
057:                return walkExpression(exp);
058:            }
059:
060:            protected Expression walkQuoteExp(QuoteExp exp) {
061:                return walkExpression(exp);
062:            }
063:
064:            protected Expression walkReferenceExp(ReferenceExp exp) {
065:                return walkExpression(exp);
066:            }
067:
068:            protected Expression walkThisExp(ThisExp exp) {
069:                return walkReferenceExp(exp);
070:            }
071:
072:            protected Expression walkSynchronizedExp(SynchronizedExp exp) {
073:                return walkExpression(exp);
074:            }
075:
076:            protected Expression walkBlockExp(BlockExp exp) {
077:                return walkExpression(exp);
078:            }
079:
080:            protected Expression walkExitExp(ExitExp exp) {
081:                return walkExpression(exp);
082:            }
083:
084:            protected Expression walkFluidLetExp(FluidLetExp exp) {
085:                return walkLetExp(exp);
086:            }
087:
088:            LambdaExp currentLambda = null;
089:
090:            /** If exitValue is set to non-null, the walk stops. */
091:            Object exitValue = null;
092:
093:            public final LambdaExp getCurrentLambda() {
094:                return currentLambda;
095:            }
096:
097:            public Expression[] walkExps(Expression[] exps) {
098:                return walkExps(exps, exps.length);
099:            }
100:
101:            public Expression[] walkExps(Expression[] exps, int n) {
102:                for (int i = 0; i < n && exitValue == null; i++)
103:                    exps[i] = (Expression) exps[i].walk(this );
104:                return exps;
105:            }
106:
107:            public void walkDefaultArgs(LambdaExp exp) {
108:                if (exp.defaultArgs != null)
109:                    exp.defaultArgs = walkExps(exp.defaultArgs);
110:            }
111:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.