Java Doc for Grammar.java in  » Parser » chaperon-3.0 » net » sourceforge » chaperon » model » grammar » 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 » chaperon 3.0 » net.sourceforge.chaperon.model.grammar 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sourceforge.chaperon.model.grammar.Grammar

Grammar
public class Grammar implements Serializable,Cloneable(Code)
This class represents a model for a grammar. The content of the grammar includes the productions, start symbol, associativities and priorities.
author:
   Stephan Michels
version:
   CVS $Id: Grammar.java,v 1.16 2003/12/09 19:55:52 benedikta Exp $



Constructor Summary
public  Grammar()
     Creates an empty grammar.

Method Summary
public  intaddProduction(Production production)
     Add a production to this grammar.
Parameters:
  production - Production, which should be added.
public  voidaddProduction(Production[] list)
     Add a list of productions to this grammar.
public  Objectclone()
     Creates a clone of this grammar.
public  booleancontains(Production production)
     If the grammar contains a production.
Parameters:
  production - The production, which the grammar should contain.
public  booleancontains(Symbol ntsymbol)
     If the grammar contains a production with this nonterminal symbol.
Parameters:
  ntsymbol - Nonterminal symbol.
public  AssociativitygetAssociativity(Terminal terminal)
     Return the associativity of a terminal symbol.
Parameters:
  terminal - Terminal symbol.
public  AssociativitygetAssociativity(Production production)
     Return the associativity of a production in this grammar.
Parameters:
  production - Production.
public  StringgetLocation()
     Returns the location from the input source.
public  intgetPriority(Terminal terminal)
     Returns the priority of a terminal symbol.
Parameters:
  terminal - Terminal symbol.
public  intgetPriority(Production production)
     Return the priority of a production in this grammar.
Parameters:
  production - Production.
public  ProductiongetProduction(int index)
     Return a production giving by an index.
Parameters:
  index - Index of the Production.
public  Production[]getProduction()
     Returns the production, which this grammar contains, as an array.
public  intgetProductionCount()
     Returns the count of productions in this grammar.
public  IntegerListgetProductionList(Symbol ntsymbol)
     Returns all production for given nonterminal symbol as a list of indices.
public  Production[]getProductions(Symbol ntsymbol)
    
public  NonterminalgetStartSymbol()
     Return the start symbol.
public  SymbolSetgetSymbols()
     Return all used symbol in this grammar.
public  intindexOf(Production production)
     Return the index of a production.
Parameters:
  production - The production.
public  intindexOf(Symbol ntsymbol)
     Return the index of the next production, which found by a nonterminal symbol.
public  voidremoveAllProduction()
     Removes all productions from this grammar.
public  voidremoveProduction(int index)
     Removes a production by an index from this grammar.
public  voidsetAssociativity(Terminal terminal, Associativity assoc)
     Set the associativity of a terminal symbol.
public  voidsetLocation(String location)
     Set the location from the input source.
public  voidsetPriority(Terminal terminal, int priority)
     Set a priority of a terminal symbol.
public  voidsetProduction(int index, Production production)
     Replace a production by an index in this grammar.
public  voidsetProduction(Production[] productionArray)
     Replace the productions of this grammar by an array of productions.
public  voidsetStartSymbol(Nonterminal startsymbol)
     Set the start symbol for this grammar.
public  StringtoString()
     Return a string representation of the grammar.
public  Violationsvalidate()
     Validated the grammar.


Constructor Detail
Grammar
public Grammar()(Code)
Creates an empty grammar.




Method Detail
addProduction
public int addProduction(Production production)(Code)
Add a production to this grammar.
Parameters:
  production - Production, which should be added. Index of the production in this grammar.



addProduction
public void addProduction(Production[] list)(Code)
Add a list of productions to this grammar.
Parameters:
  list - Array of productions.



clone
public Object clone()(Code)
Creates a clone of this grammar. Clone of this grammar.
throws:
  CloneNotSupportedException - If an exception occurs during the cloning.



contains
public boolean contains(Production production)(Code)
If the grammar contains a production.
Parameters:
  production - The production, which the grammar should contain. True, if the grammar contains the production.



contains
public boolean contains(Symbol ntsymbol)(Code)
If the grammar contains a production with this nonterminal symbol.
Parameters:
  ntsymbol - Nonterminal symbol. True, if the grammar contains a production with the symbol.



getAssociativity
public Associativity getAssociativity(Terminal terminal)(Code)
Return the associativity of a terminal symbol.
Parameters:
  terminal - Terminal symbol. Associativity of the symbol.



getAssociativity
public Associativity getAssociativity(Production production)(Code)
Return the associativity of a production in this grammar.
Parameters:
  production - Production. Associativity of the production.



getLocation
public String getLocation()(Code)
Returns the location from the input source. Location in the input source.



getPriority
public int getPriority(Terminal terminal)(Code)
Returns the priority of a terminal symbol.
Parameters:
  terminal - Terminal symbol. Priority of the symbol.



getPriority
public int getPriority(Production production)(Code)
Return the priority of a production in this grammar.
Parameters:
  production - Production. Priority of the production.



getProduction
public Production getProduction(int index)(Code)
Return a production giving by an index.
Parameters:
  index - Index of the Production. The production.



getProduction
public Production[] getProduction()(Code)
Returns the production, which this grammar contains, as an array. Array if productions.



getProductionCount
public int getProductionCount()(Code)
Returns the count of productions in this grammar. Count of productions.



getProductionList
public IntegerList getProductionList(Symbol ntsymbol)(Code)
Returns all production for given nonterminal symbol as a list of indices.
Parameters:
  ntsymbol - Nonterminal symbol List of indices from the productions



getProductions
public Production[] getProductions(Symbol ntsymbol)(Code)



getStartSymbol
public Nonterminal getStartSymbol()(Code)
Return the start symbol. Start symbol.



getSymbols
public SymbolSet getSymbols()(Code)
Return all used symbol in this grammar. Set of symbols, which were used.



indexOf
public int indexOf(Production production)(Code)
Return the index of a production.
Parameters:
  production - The production. Index of the Production.



indexOf
public int indexOf(Symbol ntsymbol)(Code)
Return the index of the next production, which found by a nonterminal symbol.
Parameters:
  ntsymbol - Nonterminal symbol Index of the production.



removeAllProduction
public void removeAllProduction()(Code)
Removes all productions from this grammar.



removeProduction
public void removeProduction(int index)(Code)
Removes a production by an index from this grammar.
Parameters:
  index - Index of the production, which should be removed.



setAssociativity
public void setAssociativity(Terminal terminal, Associativity assoc)(Code)
Set the associativity of a terminal symbol.
Parameters:
  terminal - Terminal symbol.
Parameters:
  assoc - Associativity of the symbol.



setLocation
public void setLocation(String location)(Code)
Set the location from the input source.
Parameters:
  location - Location in the input source.



setPriority
public void setPriority(Terminal terminal, int priority)(Code)
Set a priority of a terminal symbol.
Parameters:
  terminal - Terminal symbol.
Parameters:
  priority - Priority of the symbol.



setProduction
public void setProduction(int index, Production production)(Code)
Replace a production by an index in this grammar.
Parameters:
  index - The index, at which the productionshould be replaced.
Parameters:
  production - The production.



setProduction
public void setProduction(Production[] productionArray)(Code)
Replace the productions of this grammar by an array of productions.
Parameters:
  productionArray - Array of productions.



setStartSymbol
public void setStartSymbol(Nonterminal startsymbol)(Code)
Set the start symbol for this grammar.
Parameters:
  startsymbol - Start symbol.



toString
public String toString()(Code)
Return a string representation of the grammar. String representation.



validate
public Violations validate()(Code)
Validated the grammar. Return a list of violations, if this object isn't valid.



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.