Java Doc for RubyYaccLexer.java in  » IDE-Netbeans » library » org » jruby » lexer » yacc » 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 » IDE Netbeans » library » org.jruby.lexer.yacc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jruby.lexer.yacc.RubyYaccLexer

RubyYaccLexer
public class RubyYaccLexer (Code)
This is a port of the MRI lexer to Java it is compatible to Ruby 1.8.1.

Inner Class :public static class HeredocContext

Field Summary
final static  intEOF
    
final static  intSTR_FUNC_ESCAPE
    
final static  intSTR_FUNC_EXPAND
    
final static  intSTR_FUNC_INDENT
    
final static  intSTR_FUNC_QWORDS
    
final static  intSTR_FUNC_REGEXP
    
final static  intSTR_FUNC_SYMBOL
    
public  HeredocContextheredocContext
    
 ObjectyaccValue
    

Constructor Summary
public  RubyYaccLexer()
    

Method Summary
public  booleanadvance()
     How the parser advances to the next token.
public  StackStategetCmdArgumentState()
    
public  StackStategetConditionState()
    
public  LexStategetLexState()
    
public  ISourcePositiongetPosition(ISourcePosition startPosition, boolean inclusive)
     Get position information for Token/Node that follows node represented by startPosition and current lexer location.
public  ISourcePositiongetPosition()
    
public  ISourcePositionFactorygetPositionFactory()
    
public  booleangetPreserveSpaces()
     Return whether or not the lexer should be "space preserving".
public  LexerSourcegetSource()
    
public  StrTermgetStrTerm()
    
public  StringBuffergetTokenBuffer()
    
public  booleanisCommandStart()
    
final static  booleanisHexChar(char c)
    
final static  booleanisOctChar(char c)
    
public  booleanisSetSpaceSeen()
    
protected  intreadComment(char c)
     Read a comment up to end of line.
public  voidreset()
    
public  voidresetStacks()
    
public  voidsetCommandStart(boolean commandStart)
    
public  voidsetLexState(LexState lex_state)
    
public  voidsetParserSupport(ParserSupport parserSupport)
     Parse must pass its support object for some check at bottom of yylex().
public  voidsetPreserveSpaces(boolean preserveSpaces)
     Set whether or not the lexer should be "space preserving" - in other words, whether the parser should consider whitespace sequences and code comments to be separate tokens to return to the client.
public  voidsetSource(LexerSource source)
     Allow the parser to set the source for its lexer.
public  voidsetSpaceSeen(boolean setSpaceSeen)
    
public  voidsetState(LexState state)
    
public  voidsetStrTerm(StrTerm strterm)
    
public  voidsetValue(Object yaccValue)
    
public  voidsetWarnings(IRubyWarnings warnings)
    
public  inttoken()
    
public  Objectvalue()
     Value of last token (if it is a token which has a value).

Field Detail
EOF
final static int EOF(Code)



STR_FUNC_ESCAPE
final static int STR_FUNC_ESCAPE(Code)



STR_FUNC_EXPAND
final static int STR_FUNC_EXPAND(Code)



STR_FUNC_INDENT
final static int STR_FUNC_INDENT(Code)



STR_FUNC_QWORDS
final static int STR_FUNC_QWORDS(Code)



STR_FUNC_REGEXP
final static int STR_FUNC_REGEXP(Code)



STR_FUNC_SYMBOL
final static int STR_FUNC_SYMBOL(Code)



heredocContext
public HeredocContext heredocContext(Code)



yaccValue
Object yaccValue(Code)




Constructor Detail
RubyYaccLexer
public RubyYaccLexer()(Code)




Method Detail
advance
public boolean advance() throws IOException(Code)
How the parser advances to the next token. true if not at end of file (EOF).



getCmdArgumentState
public StackState getCmdArgumentState()(Code)



getConditionState
public StackState getConditionState()(Code)



getLexState
public LexState getLexState()(Code)



getPosition
public ISourcePosition getPosition(ISourcePosition startPosition, boolean inclusive)(Code)
Get position information for Token/Node that follows node represented by startPosition and current lexer location.
Parameters:
  startPosition - previous node/token
Parameters:
  inclusive - include previous node into position information of current node a new position



getPosition
public ISourcePosition getPosition()(Code)



getPositionFactory
public ISourcePositionFactory getPositionFactory()(Code)



getPreserveSpaces
public boolean getPreserveSpaces()(Code)
Return whether or not the lexer should be "space preserving". For a description of what this means, see RubyYaccLexer.setPreserveSpaces . preserveSpaces True iff space and comment sequences will be returned astokens, and false otherwise.
See Also:   RubyYaccLexer.setPreserveSpaces



getSource
public LexerSource getSource()(Code)



getStrTerm
public StrTerm getStrTerm()(Code)



getTokenBuffer
public StringBuffer getTokenBuffer()(Code)



isCommandStart
public boolean isCommandStart()(Code)



isHexChar
final static boolean isHexChar(char c)(Code)

Parameters:
  c - the character to test true if character is a hex value (0-9a-f)



isOctChar
final static boolean isOctChar(char c)(Code)

Parameters:
  c - the character to test true if character is an octal value (0-7)



isSetSpaceSeen
public boolean isSetSpaceSeen()(Code)



readComment
protected int readComment(char c) throws IOException(Code)
Read a comment up to end of line. When found each comment will get stored away into the parser result so that any interested party can use them as they seem fit. One idea is that IDE authors can do distance based heuristics to associate these comments to the AST node they think they belong to.
Parameters:
  c - last character read from lexer source newline or eof value



reset
public void reset()(Code)



resetStacks
public void resetStacks()(Code)



setCommandStart
public void setCommandStart(boolean commandStart)(Code)



setLexState
public void setLexState(LexState lex_state)(Code)



setParserSupport
public void setParserSupport(ParserSupport parserSupport)(Code)
Parse must pass its support object for some check at bottom of yylex(). Ruby does it this way as well (i.e. a little parsing logic in the lexer).
Parameters:
  parserSupport -



setPreserveSpaces
public void setPreserveSpaces(boolean preserveSpaces)(Code)
Set whether or not the lexer should be "space preserving" - in other words, whether the parser should consider whitespace sequences and code comments to be separate tokens to return to the client. Parsers typically do not want to see any whitespace or comment tokens - but an IDE trying to tokenize a chunk of source code does want to identify these separately. The default, false, means the parser mode.
Parameters:
  preserveSpaces - If true, return space and comment sequences as tokens, if false, skip these
See Also:   RubyYaccLexer.getPreserveSpaces



setSource
public void setSource(LexerSource source)(Code)
Allow the parser to set the source for its lexer.
Parameters:
  source - where the lexer gets raw data



setSpaceSeen
public void setSpaceSeen(boolean setSpaceSeen)(Code)



setState
public void setState(LexState state)(Code)



setStrTerm
public void setStrTerm(StrTerm strterm)(Code)



setValue
public void setValue(Object yaccValue)(Code)



setWarnings
public void setWarnings(IRubyWarnings warnings)(Code)



token
public int token()(Code)
Last token read from the lexer at the end of a call to yylex() last token read



value
public Object value()(Code)
Value of last token (if it is a token which has a value). value of last value-laden token



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.