Java Doc for Analyzer.java in  » Parser » Rats-Parser-Generators » xtc » typical » 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 » Parser » Rats Parser Generators » xtc.typical 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   xtc.typical.Analyzer

All known Subclasses:   xtc.lang.TypedLambdaAnalyzer,  xtc.lang.c.CAnalyzer,  xtc.typical.TypicalAnalyzer,
Analyzer
abstract public class Analyzer (Code)
The base class of all Typical-generated type checkers.
author:
   Laune Harris, Anh Le
version:
   $Revision: 1.145 $

Inner Class :public static interface Match extends Function.F0<T>
Inner Class :public static interface NodeMatch extends Function.F1<Boolean, Node>
Inner Class :public static interface Require extends Function.F0<T>
Inner Class :public static interface Let extends Function.F0<T>
Inner Class :public static interface Guard extends Function.F0<T>

Field Summary
final protected  StringENTERSCOPE
     The property to check if enter a scope.
final protected  StringEXITSCOPE
     The property of check if exit a scope.
final protected  StringMAGICNUMBER
     The property to store the times of not entering a new scope because the new scope is also the current scope.
protected  Function.F1<?, Node>analyzer
     The analyzer.
final protected  Function.F1<Node, NodeMatch>ancestor
     The ancestor function.
final protected  Function.F3<Void, Node, Object, Function.F1<?, Node>>define3
     A Typical function to define a node, without error messages.
final protected  Function.F5<Void, Node, Object, String, String, Function.F1<?, Node>>define5
     A Typical function to define a node, with an error message.
final protected  Function.F1<String, String>freshName
     The Typical function to get a new name.
final protected  SymbolTablegamma
     The symbol table.
protected  Hashtable<Object, Object>hashTable
    
final protected  Function.F2<Boolean, Node, Function.F1<?, Node>>isDefined
    
final protected  Function.F2<Boolean, Node, Function.F1<?, Node>>isDefinedLocally
    
final protected  Function.F3<Void, String, String, Object>load
     The Typical load function to load predefined values and data types.
final protected  Function.F2<Object, Node, Function.F1<?, Node>>lookup2
     A Typical function to lookup a node, without error messages.
final protected  Function.F4<Object, Node, String, String, Function.F1<?, Node>>lookup4
     A Typical function to lookup a node, with an error message.
final protected  Function.F2<Object, Node, Function.F1<?, Node>>lookupLocally2
     A Typical function to lookup a node locally, without error messages.
final protected  Function.F4<Object, Node, String, String, Function.F1<?, Node>>lookupLocally4
     A Typical function to lookup a node locally, with an error message.
final protected  ArrayList<Node>matching_nodes
     The visited node path.
final protected  Function.F1<Boolean, Object>notBottom
     The Typical function to check if a value if bottom.
final protected  Function.F1<Node, NodeMatch>parent
     The parent function.
final protected  ArrayList<String>processScopeNodes
     The list of names of the nodes that trigger scope changes.
final protected  Function.F3<Void, Node, Object, Function.F1<?, Node>>redefine
     A Typical function to redefine a node.
protected  Noderoot
     The tree root.
final protected  Runtimeruntime
     The runtime.
final protected  Function.F1<Boolean, String>show_symbols
     The Typical function to print a symbol.

Constructor Summary
public  Analyzer(Runtime runt)
     Create a new TypeChecker base.

Method Summary
final public static  Tcast(Object arg)
     Cast an object to type T.
Parameters:
  arg - The object to cast.
protected  voidcheckEnterScope(Node n)
     Check a node and enter a scope.
protected  voidcheckExitScope(Node n)
     Check a node and exit scope.
final protected static  voiddiscard(Object o)
     Ignore the specified value.
public static  Booleanequal(Object o1, Object o2)
     Test for equality between two objects.
Parameters:
  o1 - The first object.
Parameters:
  o2 - The second object.
protected  Objecterror(String s, Node n)
     Print a error message.
Parameters:
  s - The msg.
Parameters:
  n - The location.
public  NodegetASTRoot()
     Returns the (possibly annotated and modified) AST root.
abstract protected  voidgetScopeNodes()
     Get the names of the nodes that trigger scope changes.
protected static  Booleannot_equal(Object o1, Object o2)
     Test for equality between two objects.
Parameters:
  o1 - The first object.
Parameters:
  o2 - The second object.
protected  voidprintAST(Node n)
     Utility function to print a nicely formatted ast for debugging.
protected  voidprocessScope(Node n, Function.F1<?, Node> getScope)
     Process scope.
public  SymbolTablerun(Node n)
     Run this typechecker on the tree rooted at n.
Parameters:
  n - The tree root.
protected  voidshowMessage(String tag, String msg, Object o)
     Print a error message.
final public static  StringtoString(Object o)
     Convert the specified object to a string.
Parameters:
  o - The object.
protected  Objectwarning(String s, Node n)
     Print a warning message.
Parameters:
  s - The msg.
Parameters:
  n - The location.

Field Detail
ENTERSCOPE
final protected String ENTERSCOPE(Code)
The property to check if enter a scope.



EXITSCOPE
final protected String EXITSCOPE(Code)
The property of check if exit a scope.



MAGICNUMBER
final protected String MAGICNUMBER(Code)
The property to store the times of not entering a new scope because the new scope is also the current scope.



analyzer
protected Function.F1<?, Node> analyzer(Code)
The analyzer.



ancestor
final protected Function.F1<Node, NodeMatch> ancestor(Code)
The ancestor function.



define3
final protected Function.F3<Void, Node, Object, Function.F1<?, Node>> define3(Code)
A Typical function to define a node, without error messages.



define5
final protected Function.F5<Void, Node, Object, String, String, Function.F1<?, Node>> define5(Code)
A Typical function to define a node, with an error message.



freshName
final protected Function.F1<String, String> freshName(Code)
The Typical function to get a new name.



gamma
final protected SymbolTable gamma(Code)
The symbol table.



hashTable
protected Hashtable<Object, Object> hashTable(Code)
The hash table



isDefined
final protected Function.F2<Boolean, Node, Function.F1<?, Node>> isDefined(Code)
A typical function for checking if a node has been defined



isDefinedLocally
final protected Function.F2<Boolean, Node, Function.F1<?, Node>> isDefinedLocally(Code)
A typical function for checking if a node has been locally defined



load
final protected Function.F3<Void, String, String, Object> load(Code)
The Typical load function to load predefined values and data types.



lookup2
final protected Function.F2<Object, Node, Function.F1<?, Node>> lookup2(Code)
A Typical function to lookup a node, without error messages.



lookup4
final protected Function.F4<Object, Node, String, String, Function.F1<?, Node>> lookup4(Code)
A Typical function to lookup a node, with an error message.



lookupLocally2
final protected Function.F2<Object, Node, Function.F1<?, Node>> lookupLocally2(Code)
A Typical function to lookup a node locally, without error messages.



lookupLocally4
final protected Function.F4<Object, Node, String, String, Function.F1<?, Node>> lookupLocally4(Code)
A Typical function to lookup a node locally, with an error message.



matching_nodes
final protected ArrayList<Node> matching_nodes(Code)
The visited node path.



notBottom
final protected Function.F1<Boolean, Object> notBottom(Code)
The Typical function to check if a value if bottom. Return true if not bottom, otherwise bottom (It will be removed once guard is done)



parent
final protected Function.F1<Node, NodeMatch> parent(Code)
The parent function.



processScopeNodes
final protected ArrayList<String> processScopeNodes(Code)
The list of names of the nodes that trigger scope changes.



redefine
final protected Function.F3<Void, Node, Object, Function.F1<?, Node>> redefine(Code)
A Typical function to redefine a node.



root
protected Node root(Code)
The tree root.



runtime
final protected Runtime runtime(Code)
The runtime.



show_symbols
final protected Function.F1<Boolean, String> show_symbols(Code)
The Typical function to print a symbol.




Constructor Detail
Analyzer
public Analyzer(Runtime runt)(Code)
Create a new TypeChecker base.
Parameters:
  runt - The runtime.




Method Detail
cast
final public static T cast(Object arg)(Code)
Cast an object to type T.
Parameters:
  arg - The object to cast. The object cast to T



checkEnterScope
protected void checkEnterScope(Node n)(Code)
Check a node and enter a scope.
Parameters:
  n - The node to check.



checkExitScope
protected void checkExitScope(Node n)(Code)
Check a node and exit scope.
Parameters:
  n - The node to check.



discard
final protected static void discard(Object o)(Code)
Ignore the specified value.
Parameters:
  o - The value to ignore.



equal
public static Boolean equal(Object o1, Object o2)(Code)
Test for equality between two objects.
Parameters:
  o1 - The first object.
Parameters:
  o2 - The second object. true if both are equal, false otherwise.



error
protected Object error(String s, Node n)(Code)
Print a error message.
Parameters:
  s - The msg.
Parameters:
  n - The location. null



getASTRoot
public Node getASTRoot()(Code)
Returns the (possibly annotated and modified) AST root. The root of the ast.



getScopeNodes
abstract protected void getScopeNodes()(Code)
Get the names of the nodes that trigger scope changes.



not_equal
protected static Boolean not_equal(Object o1, Object o2)(Code)
Test for equality between two objects.
Parameters:
  o1 - The first object.
Parameters:
  o2 - The second object. true if the o1 and o2 not equal, false otherwise.



printAST
protected void printAST(Node n)(Code)
Utility function to print a nicely formatted ast for debugging.
Parameters:
  n - The ast root.



processScope
protected void processScope(Node n, Function.F1<?, Node> getScope)(Code)
Process scope.
Parameters:
  n - The node to process.
Parameters:
  getScope - The generated getScope function.



run
public SymbolTable run(Node n)(Code)
Run this typechecker on the tree rooted at n.
Parameters:
  n - The tree root. The Symbol table of the ast.



showMessage
protected void showMessage(String tag, String msg, Object o)(Code)
Print a error message.
Parameters:
  tag - The message class.
Parameters:
  msg - The message.
Parameters:
  o - The node generating the message.



toString
final public static String toString(Object o)(Code)
Convert the specified object to a string.
Parameters:
  o - The object. The corresponding string.



warning
protected Object warning(String s, Node n)(Code)
Print a warning message.
Parameters:
  s - The msg.
Parameters:
  n - The location. null



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.