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


java.lang.Object
   net.sourceforge.chaperon.process.ParserAutomaton

ParserAutomaton
public class ParserAutomaton implements Serializable(Code)
This class represents a parser automaton, which holds all states and transition, which are used by the the parser processor.
author:
   Stephan Michels
version:
   CVS $Id: ParserAutomaton.java,v 1.9 2003/12/09 19:55:53 benedikta Exp $



Constructor Summary
public  ParserAutomaton(int tsymbolcount, int ntsymbolcount, int productioncount, int errorcount, int statecount)
    

Method Summary
public  intgetErrorCount()
     Return the count of errors.
public  StringgetErrorMessage(int index)
     Returns the message for an error.
Parameters:
  index - Index of the error.
public  intgetErrorTransition(int state, int tsymbol)
    
public  intgetErrorTransition(int state)
     Return index of the error.
Parameters:
  state - Index of state.
public  StringgetNonterminal(int index)
     Returns the name of a nonterminal symbol.
Parameters:
  index - Index of the symbol.
public  intgetNonterminalCount()
     Returns the count of nonterminal symbols.
public  intgetProductionCount()
     Return the count of productions.
public  intgetProductionLength(int index)
     Return the length of a production.
Parameters:
  index - Index of a production.
public  intgetProductionSymbol(int index)
     Return the symbol of a production.
Parameters:
  index - Index of the production.
public  intgetReduceProduction(int state, int tsymbol)
     Return for a given reduce action the production, which should be reduced.
public  intgetReduceProduction(int state)
     Return the production, which should be reduced.
Parameters:
  state - Index of the state.
public  intgetShiftTransition(int state, int tsymbol)
     Returns the transition for a given state and terminal symbol.
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol.
public  intgetStateCount()
     Returns the count of states.
public  StringgetTerminal(int index)
     Returns the name of a terminal symbol.
Parameters:
  index - Index of the symbol.
public  intgetTerminalCount()
     Returns the count of terminal symbols.
public  intgetTransition(int state, int ntsymbol)
     Returns the transition for a given state and nonterminal symbol.
Parameters:
  state - Index of the state.
Parameters:
  ntsymbol - Index of the nonterminal symbol.
public  booleanisAcceptAction(int state)
     If is a accept action.
public  booleanisErrorAction(int state, int tsymbol)
    
public  booleanisErrorAction(int state)
     If is a error action.
public  booleanisReduceAction(int state, int tsymbol)
    
public  booleanisReduceAction(int state)
     If is a reduce action.
Parameters:
  state - Index of the state.
public  booleanisShiftAction(int state, int tsymbol)
    
public  voidsetAcceptAction(int state, int production)
    
public  voidsetErrorAction(int state, int tsymbol, int nextstate)
    
public  voidsetErrorAction(int state, int nextstate)
    
public  voidsetErrorMessage(int index, String message)
     Sets the message for an error.
public  voidsetNonterminal(int index, String symbol)
     Sets the name of a nonterminal symbol.
public  voidsetProductionLength(int index, int length)
     Set the length of a production.
public  voidsetProductionSymbol(int index, int symbol)
    
public  voidsetReduceAction(int state, int tsymbol, int production)
    
public  voidsetReduceAction(int state, int production)
     Set a reduce action for a given state and for the end of the file.
public  voidsetShiftAction(int state, int tsymbol, int nextstate)
    
public  voidsetTerminal(int index, String symbol)
     Sets the name of a terminal symbol.
public  voidsetTransition(int state, int ntsymbol, int nextstate)
     Sets transition for a given state and nonterminal symbol.
public  StringtoString()
     Return a string representation of the automaton.


Constructor Detail
ParserAutomaton
public ParserAutomaton(int tsymbolcount, int ntsymbolcount, int productioncount, int errorcount, int statecount)(Code)
Constructs a empty parser automaton
Parameters:
  tsymbolcount - Count of terminal symbols.
Parameters:
  ntsymbolcount - Count of nonterminal symbols.
Parameters:
  productioncount - Count of productions.
Parameters:
  errorcount - Count of error types.
Parameters:
  statecount - Count of states.




Method Detail
getErrorCount
public int getErrorCount()(Code)
Return the count of errors. Count of errors.



getErrorMessage
public String getErrorMessage(int index)(Code)
Returns the message for an error.
Parameters:
  index - Index of the error. Message of the error.



getErrorTransition
public int getErrorTransition(int state, int tsymbol)(Code)
Return for a given error action the error message
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol Index of the state, to continue processing



getErrorTransition
public int getErrorTransition(int state)(Code)
Return index of the error.
Parameters:
  state - Index of state. Index of error.



getNonterminal
public String getNonterminal(int index)(Code)
Returns the name of a nonterminal symbol.
Parameters:
  index - Index of the symbol. Name of the symbol.



getNonterminalCount
public int getNonterminalCount()(Code)
Returns the count of nonterminal symbols. Count of nonterminal symbols.



getProductionCount
public int getProductionCount()(Code)
Return the count of productions. Count of productions.



getProductionLength
public int getProductionLength(int index)(Code)
Return the length of a production.
Parameters:
  index - Index of a production. Length of the production.



getProductionSymbol
public int getProductionSymbol(int index)(Code)
Return the symbol of a production.
Parameters:
  index - Index of the production. Index of the nonterminal symbol



getReduceProduction
public int getReduceProduction(int state, int tsymbol)(Code)
Return for a given reduce action the production, which should be reduced.
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol Index of the production, which should be reduced



getReduceProduction
public int getReduceProduction(int state)(Code)
Return the production, which should be reduced.
Parameters:
  state - Index of the state. Index of the production.



getShiftTransition
public int getShiftTransition(int state, int tsymbol)(Code)
Returns the transition for a given state and terminal symbol.
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol. Index of destination state



getStateCount
public int getStateCount()(Code)
Returns the count of states. Count of states.



getTerminal
public String getTerminal(int index)(Code)
Returns the name of a terminal symbol.
Parameters:
  index - Index of the symbol. Name of the symbol.



getTerminalCount
public int getTerminalCount()(Code)
Returns the count of terminal symbols. Count of terminal symbols.



getTransition
public int getTransition(int state, int ntsymbol)(Code)
Returns the transition for a given state and nonterminal symbol.
Parameters:
  state - Index of the state.
Parameters:
  ntsymbol - Index of the nonterminal symbol. Index of destination state.



isAcceptAction
public boolean isAcceptAction(int state)(Code)
If is a accept action.
Parameters:
  state - Index of the state True, if is a accept action



isErrorAction
public boolean isErrorAction(int state, int tsymbol)(Code)
If is an error action
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol True, if it is a error action



isErrorAction
public boolean isErrorAction(int state)(Code)
If is a error action.
Parameters:
  state - Index of the state True, if is an error action



isReduceAction
public boolean isReduceAction(int state, int tsymbol)(Code)
If is a reduce action
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol True, if is a reduce action



isReduceAction
public boolean isReduceAction(int state)(Code)
If is a reduce action.
Parameters:
  state - Index of the state. True, if is a reduce action.



isShiftAction
public boolean isShiftAction(int state, int tsymbol)(Code)
If is a shift action
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol True, if is a shift action



setAcceptAction
public void setAcceptAction(int state, int production)(Code)
Sets a accept action for a given state and terminal symbol
Parameters:
  state - Index of the state
Parameters:
  production - Index of the production, which should be reduced



setErrorAction
public void setErrorAction(int state, int tsymbol, int nextstate)(Code)
Sets a error action for a given state and terminal symbol
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol
Parameters:
  nextstate - Destination state



setErrorAction
public void setErrorAction(int state, int nextstate)(Code)
Sets a error action for a given state and terminal symbol
Parameters:
  state - Index of the state
Parameters:
  nextstate - Destination state



setErrorMessage
public void setErrorMessage(int index, String message)(Code)
Sets the message for an error.
Parameters:
  index - Index of the error.
Parameters:
  message - Message of the error.



setNonterminal
public void setNonterminal(int index, String symbol)(Code)
Sets the name of a nonterminal symbol.
Parameters:
  index - Index of the symbol.
Parameters:
  symbol - Name of the symbol.



setProductionLength
public void setProductionLength(int index, int length)(Code)
Set the length of a production.
Parameters:
  index - Index of the production.
Parameters:
  length - Length of the production.



setProductionSymbol
public void setProductionSymbol(int index, int symbol)(Code)
Sets the symbol for a production
Parameters:
  index - Index of the production
Parameters:
  symbolindex - Index of the nonterminal symbol



setReduceAction
public void setReduceAction(int state, int tsymbol, int production)(Code)
Sets a reduce action for a given state and terminal symbol
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol
Parameters:
  production - Index of the production, which should be reduced



setReduceAction
public void setReduceAction(int state, int production)(Code)
Set a reduce action for a given state and for the end of the file.
Parameters:
  state - Index of state.
Parameters:
  production - Production, which shoudl be reduced.



setShiftAction
public void setShiftAction(int state, int tsymbol, int nextstate)(Code)
Sets a shift action for a given state and terminal symbol
Parameters:
  state - Index of the state
Parameters:
  tsymbol - Index of the terminal symbol
Parameters:
  nextstate - Destination state



setTerminal
public void setTerminal(int index, String symbol)(Code)
Sets the name of a terminal symbol.
Parameters:
  index - Index of the symbol.
Parameters:
  symbol - Name of the symbol.



setTransition
public void setTransition(int state, int ntsymbol, int nextstate)(Code)
Sets transition for a given state and nonterminal symbol.
Parameters:
  state - Index of the state.
Parameters:
  ntsymbol - Index of the nonterminal symbol.
Parameters:
  nextstate - Index of destination state.



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



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.