Java Doc for SemanticContext.java in  » Parser » antlr-3.0.1 » org » antlr » analysis » 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 » antlr 3.0.1 » org.antlr.analysis 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.antlr.analysis.SemanticContext

SemanticContext
abstract public class SemanticContext (Code)
A binary tree structure used to record the semantic context in which an NFA configuration is valid. It's either a single predicate or a tree representing an operation tree such as: p1&&p2 or p1||p2. For NFA o-p1->o-p2->o, create tree AND(p1,p2). For NFA (1)-p1->(2) | ^ | | (3)-p2---- we will have to combine p1 and p2 into DFA state as we will be adding NFA configurations for state 2 with two predicates p1,p2. So, set context for combined NFA config for state 2: OR(p1,p2). I have scoped the AND, NOT, OR, and Predicate subclasses of SemanticContext within the scope of this outer class. July 7, 2006: TJP altered OR to be set of operands. the Binary tree made it really hard to reduce complicated || sequences to their minimum. Got huge repeated || conditions.

Inner Class :public static class Predicate extends SemanticContext
Inner Class :public static class TruePredicate extends Predicate
Inner Class :public static class AND extends SemanticContext
Inner Class :public static class OR extends SemanticContext
Inner Class :public static class NOT extends SemanticContext

Field Summary
final public static  SemanticContextEMPTY_SEMANTIC_CONTEXT
     Create a default value for the semantic context shared among all NFAConfigurations that do not have an actual semantic context.


Method Summary
public static  SemanticContextand(SemanticContext a, SemanticContext b)
    
abstract public  StringTemplategenExpr(CodeGenerator generator, StringTemplateGroup templates, DFA dfa)
     Generate an expression that will evaluate the semantic context, given a set of output templates.
abstract public  SemanticContextgetGatedPredicateContext()
     Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced.
abstract public  booleanisSyntacticPredicate()
    
public static  SemanticContextnot(SemanticContext a)
    
public static  SemanticContextor(SemanticContext a, SemanticContext b)
    
public  voidtrackUseOfSyntacticPredicates(Grammar g)
    

Field Detail
EMPTY_SEMANTIC_CONTEXT
final public static SemanticContext EMPTY_SEMANTIC_CONTEXT(Code)
Create a default value for the semantic context shared among all NFAConfigurations that do not have an actual semantic context. This prevents lots of if!=null type checks all over; it represents just an empty set of predicates.





Method Detail
and
public static SemanticContext and(SemanticContext a, SemanticContext b)(Code)



genExpr
abstract public StringTemplate genExpr(CodeGenerator generator, StringTemplateGroup templates, DFA dfa)(Code)
Generate an expression that will evaluate the semantic context, given a set of output templates.



getGatedPredicateContext
abstract public SemanticContext getGatedPredicateContext()(Code)
Given a semantic context expression tree, return a tree with all nongated predicates set to true and then reduced. So p&&(q||r) would return p&&r if q is nongated but p and r are gated.



isSyntacticPredicate
abstract public boolean isSyntacticPredicate()(Code)



not
public static SemanticContext not(SemanticContext a)(Code)



or
public static SemanticContext or(SemanticContext a, SemanticContext b)(Code)



trackUseOfSyntacticPredicates
public void trackUseOfSyntacticPredicates(Grammar g)(Code)
Notify the indicated grammar of any syn preds used within this context



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.