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


java.lang.Object
   xtc.tree.Visitor
      xtc.parser.MetaDataSetter

MetaDataSetter
public class MetaDataSetter extends Visitor (Code)
Visitor to fill in the production meta-data. Note that this visitor requires that a grammar's Properties.GENERIC and Properties.RECURSIVE have been appropriately set. Also note that this visitor does not create meta-data records; they must be created with the MetaDataCreator meta-data creator before applying this visitor. Further note that this visitor does not determine usage and self counts, as they need to be (repeatedly) determined during DeadProductionEliminator deadproduction elimination . Finally, note that this visitor assumes that the entire grammar is contained in a single module.
author:
   Robert Grimm
version:
   $Revision: 1.56 $


Field Summary
final public static  PatternIMPORT
     The regular expression for matching import declarations.
final protected  Analyzeranalyzer
     The analyzer utility.
final protected  ASTast
     The type operations.
protected  List<Type>boundRepetitions
     The structure of bound repetitions.
protected  booleancreatesNodeValue
     Flag for whether the current production may create a node value.
protected  booleanhasParseTree
     Flag for whether the grammar has the Constants.ATT_PARSE_TREE parseTree attribute.
protected  booleanisBound
     Flag for whether the next element is bound.
protected  booleanisFirstElement
     Flag for whether the current element is the first element of a sequence.
protected  booleanisLastInPredicate
     Flag for whether the current element is the last element in a predicate.
protected  booleanisNotFollowedBy
     Flag for whether we are analyzing a not-followed-by predicate.
protected  booleanisOptional
     Flag for whether the current sequence is optional.
protected  booleanisPredicate
     Flag for whether we are analyzing a predicate.
protected  booleanisRepeated
     Flag for whether the current sequence is repeated.
protected  booleanisTopLevel
     Flag for whether the current element is the top-level element of a production.
protected  intoptionLevel
     The current nesting level for options.
protected  List<Type>options
     The structure of options.
protected  intrepetitionLevel
     The current nesting level for repetitions.
protected  List<Boolean>repetitions
     The structure of repetitions.
protected  booleanrequiresBaseIndex
     Flag for whether a production requires a base index variable.
protected  booleanrequiresChar
     Flag for whether a production requires a character variable.
protected  booleanrequiresIndex
     Flag for whether a production requires an index variable.
protected  booleanrequiresLocatable
     Flag for whether the grammar requires xtc.tree.Locatable .
protected  booleanrequiresPredIndex
     Flag for whether a production requires a predicate index variable.
protected  booleanrequiresPredMatch
     Flag for whether a production requires a predicate matched variable.
protected  booleanrequiresPredResult
     Flag for whether a production requires a predicate result variable.
protected  booleanrequiresResult
     Flag for whether a production requires a result variable.
final protected  Runtimeruntime
     The runtime.
protected  booleanwithLocation
     Flag for whether the grammar has the Constants.ATT_WITH_LOCATION withLocation attribute.

Constructor Summary
public  MetaDataSetter(Runtime runtime, Analyzer analyzer, AST ast)
     Create a new meta-data setter.

Method Summary
protected  booleanhasDirectLocation()
     Determine whether the current production can annotate a node with its location relative to CodeGenerator.VALUE .
protected  voidimportType(String name)
     Import the specified fully qualified type.
protected  booleanisNotFollowedBy()
     Determine whether we are processing a not-followed-by predicate.
public  voidvisit(Module m)
     Analyze the specified grammar.
public  voidvisit(Production p)
     Analyze the specified production.
public  voidvisit(OrderedChoice c)
     Analyze the specified ordered choice.
public  voidvisit(Repetition r)
     Analyze the specified repetition.
public  voidvisit(Option o)
     Analyze the specified option.
public  voidvisit(Sequence s)
     Analyze the specified sequence.
public  voidvisit(FollowedBy p)
     Analyze the specified followed-by predicate.
public  voidvisit(NotFollowedBy p)
     Analyze the specified not-followed-by predicate.
public  voidvisit(SemanticPredicate p)
     Analyze the specified semantic predicate.
public  voidvisit(VoidedElement v)
     Analyze the specified voided element.
public  voidvisit(Binding b)
     Analyze the specified binding.
public  voidvisit(StringMatch m)
     Analyze the specified string match.
public  voidvisit(NonTerminal nt)
     Analyze the specified nonterminal.
public  voidvisit(AnyChar a)
     Analyze the specified any character element.
public  voidvisit(StringLiteral l)
     Analyze the specified string literal.
public  voidvisit(CharCase c)
     Analyze the specified character case.
public  voidvisit(CharSwitch s)
     Analyzer the specified character switch.
public  voidvisit(Terminal t)
     Analyze the specified terminal.
public  voidvisit(Action a)
     Analyze the specified action.
public  voidvisit(ParserAction pa)
     Analyze the specified parser action.
public  voidvisit(TokenValue v)
     Analyze the specified token value.
public  voidvisit(ActionBaseValue v)
     Analyze the specified action base value.
public  voidvisit(GenericValue v)
     Analyze the specified generic value.
public  voidvisit(GenericActionValue v)
     Analyze the specified generic action value.
public  voidvisit(Element e)
     Analyze the specified element.

Field Detail
IMPORT
final public static Pattern IMPORT(Code)
The regular expression for matching import declarations.



analyzer
final protected Analyzer analyzer(Code)
The analyzer utility.



ast
final protected AST ast(Code)
The type operations.



boundRepetitions
protected List<Type> boundRepetitions(Code)
The structure of bound repetitions.



createsNodeValue
protected boolean createsNodeValue(Code)
Flag for whether the current production may create a node value.



hasParseTree
protected boolean hasParseTree(Code)
Flag for whether the grammar has the Constants.ATT_PARSE_TREE parseTree attribute.



isBound
protected boolean isBound(Code)
Flag for whether the next element is bound.



isFirstElement
protected boolean isFirstElement(Code)
Flag for whether the current element is the first element of a sequence.



isLastInPredicate
protected boolean isLastInPredicate(Code)
Flag for whether the current element is the last element in a predicate.



isNotFollowedBy
protected boolean isNotFollowedBy(Code)
Flag for whether we are analyzing a not-followed-by predicate.



isOptional
protected boolean isOptional(Code)
Flag for whether the current sequence is optional.



isPredicate
protected boolean isPredicate(Code)
Flag for whether we are analyzing a predicate.



isRepeated
protected boolean isRepeated(Code)
Flag for whether the current sequence is repeated.



isTopLevel
protected boolean isTopLevel(Code)
Flag for whether the current element is the top-level element of a production.



optionLevel
protected int optionLevel(Code)
The current nesting level for options.



options
protected List<Type> options(Code)
The structure of options.



repetitionLevel
protected int repetitionLevel(Code)
The current nesting level for repetitions.



repetitions
protected List<Boolean> repetitions(Code)
The structure of repetitions.



requiresBaseIndex
protected boolean requiresBaseIndex(Code)
Flag for whether a production requires a base index variable.



requiresChar
protected boolean requiresChar(Code)
Flag for whether a production requires a character variable.



requiresIndex
protected boolean requiresIndex(Code)
Flag for whether a production requires an index variable.



requiresLocatable
protected boolean requiresLocatable(Code)
Flag for whether the grammar requires xtc.tree.Locatable .



requiresPredIndex
protected boolean requiresPredIndex(Code)
Flag for whether a production requires a predicate index variable.



requiresPredMatch
protected boolean requiresPredMatch(Code)
Flag for whether a production requires a predicate matched variable.



requiresPredResult
protected boolean requiresPredResult(Code)
Flag for whether a production requires a predicate result variable.



requiresResult
protected boolean requiresResult(Code)
Flag for whether a production requires a result variable.



runtime
final protected Runtime runtime(Code)
The runtime.



withLocation
protected boolean withLocation(Code)
Flag for whether the grammar has the Constants.ATT_WITH_LOCATION withLocation attribute.




Constructor Detail
MetaDataSetter
public MetaDataSetter(Runtime runtime, Analyzer analyzer, AST ast)(Code)
Create a new meta-data setter.
Parameters:
  runtime - The runtime.
Parameters:
  analyzer - The analyzer utility.
Parameters:
  ast - The type operations.




Method Detail
hasDirectLocation
protected boolean hasDirectLocation()(Code)
Determine whether the current production can annotate a node with its location relative to CodeGenerator.VALUE . true if the location annotation can beoptimized.



importType
protected void importType(String name)(Code)
Import the specified fully qualified type.
Parameters:
  name - The type name.



isNotFollowedBy
protected boolean isNotFollowedBy()(Code)
Determine whether we are processing a not-followed-by predicate. true if we are processing a not-followed-bypredicate.



visit
public void visit(Module m)(Code)
Analyze the specified grammar.



visit
public void visit(Production p)(Code)
Analyze the specified production.



visit
public void visit(OrderedChoice c)(Code)
Analyze the specified ordered choice.



visit
public void visit(Repetition r)(Code)
Analyze the specified repetition.



visit
public void visit(Option o)(Code)
Analyze the specified option.



visit
public void visit(Sequence s)(Code)
Analyze the specified sequence.



visit
public void visit(FollowedBy p)(Code)
Analyze the specified followed-by predicate.



visit
public void visit(NotFollowedBy p)(Code)
Analyze the specified not-followed-by predicate.



visit
public void visit(SemanticPredicate p)(Code)
Analyze the specified semantic predicate.



visit
public void visit(VoidedElement v)(Code)
Analyze the specified voided element.



visit
public void visit(Binding b)(Code)
Analyze the specified binding.



visit
public void visit(StringMatch m)(Code)
Analyze the specified string match.



visit
public void visit(NonTerminal nt)(Code)
Analyze the specified nonterminal.



visit
public void visit(AnyChar a)(Code)
Analyze the specified any character element.



visit
public void visit(StringLiteral l)(Code)
Analyze the specified string literal.



visit
public void visit(CharCase c)(Code)
Analyze the specified character case.



visit
public void visit(CharSwitch s)(Code)
Analyzer the specified character switch.



visit
public void visit(Terminal t)(Code)
Analyze the specified terminal.



visit
public void visit(Action a)(Code)
Analyze the specified action.



visit
public void visit(ParserAction pa)(Code)
Analyze the specified parser action.



visit
public void visit(TokenValue v)(Code)
Analyze the specified token value.



visit
public void visit(ActionBaseValue v)(Code)
Analyze the specified action base value.



visit
public void visit(GenericValue v)(Code)
Analyze the specified generic value.



visit
public void visit(GenericActionValue v)(Code)
Analyze the specified generic action value. Note that generic recursion values are also generic action values.



visit
public void visit(Element e)(Code)
Analyze the specified element. This method provides the default implementation for parse tree nodes, null literals, node markers, and value elements (besides token values, action base values, and generic values).



Methods inherited from xtc.tree.Visitor
public Object dispatch(Node node)(Code)(Java Doc)

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.