Java Doc for LexerCore.java in  » 6.0-JDK-Modules » j2me » gov » nist » core » 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 » 6.0 JDK Modules » j2me » gov.nist.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gov.nist.core.StringTokenizer
      gov.nist.core.LexerCore

All known Subclasses:   gov.nist.javax.sdp.parser.Lexer,  gov.nist.siplite.parser.Lexer,
LexerCore
abstract public class LexerCore extends StringTokenizer (Code)
A lexical analyzer that is used by all parsers in this implementation.


Field Summary
final public static  intALPHA
     ALPHA (alphabetic) token.
final public static  intAND
     AND (ampersand) token.
final public static  intAT
     AT sign token.
final public static  intBACKSLASH
     BACKSLASH (escaping) token.
final public static  intBACK_QUOTE
     BACK_QUOTE token.
final public static  intBAR
     Veritcal BAR token.
final public static  intCOLON
     COLON token.
final public static  intDIGIT
     DIGIT (numeric) token.
final public static  intDOLLAR
     DOLLAR token.
final public static  intDOT
     DOT (period) token.
final public static  intDOUBLEQUOTE
     DOUBLEQUOTE token.
final public static  intEND
     END token.
final public static  intEQUALS
     EQUALS (equals sign) token.
final public static  intEXCLAMATION
     EXCLAMATION token.
final public static  intGREATER_THAN
     GREATER_THAN token.
final public static  intHAT
     HAT (carot) token.
final public static  intHT
     HT (Horizontal tab) token.
final public static  intID
     ID token.
final public static  intLESS_THAN
     LESS_THAN token.
final public static  intLPAREN
     LPAREN (left paren) token.
final public static  intL_CURLY
     L_CURLY (left curly bracket) token.
final public static  intL_SQUARE_BRACKET
     L_SQUARE_BRACKET (left square bracket) token.
final public static  intMINUS
     MINUS token.
final public static  intNULL
     NULL token.
final public static  intPERCENT
     PERCENT token.
final public static  intPLUS
     PLUS token.
final public static  intPOUND
     POUND token.
final public static  intQUESTION
     QUESTION mark token.
final public static  intQUOTE
     Single QUOTE token.
final public static  intRPAREN
     RPAREN (right paren) token.
final public static  intR_CURLY
     R_CURLY (right curly bracket) token.
final public static  intR_SQUARE_BRACKET
     R_SQUARE_BRACKET (right square bracket) token.
final public static  intSEMICOLON
     SEMICOLON token.
final public static  intSLASH
     Forward SLASH token.
final public static  intSP
     SPACE token.
final public static  intSTAR
     STAR (asterisk) token.
final public static  intSTART
     START token.
final public static  intTILDE
     TILDE token.
final public static  intUNDERSCORE
     UNDERSCPRE token.
final public static  intWHITESPACE
     WHITESPACE token.
protected  HashtablecurrentLexer
     Current elements of current lexing operation.
protected  StringcurrentLexerName
     Name of the current Lexer.
protected  TokencurrentMatch
     Current matched token.
protected static  HashtableglobalSymbolTable
     Global symbol table for intermediate elements.
protected static  HashtablelexerTables
     Lexical rules tables.

Constructor Summary
protected  LexerCore()
     Default constructor.
public  LexerCore(String lexerName)
     Constructs a new lexer by name.
public  LexerCore(String lexerName, String buffer)
     Initialize the lexer with a buffer.

Method Summary
public  voidSPorHT()
     Checks for space or horiizontal tab.
protected  voidaddKeyword(String name, int value)
     Adds a new keyword and value pair.
protected  HashtableaddLexer(String lexerName)
     Adds a new Lexer.
public  StringbyteStringNoComma()
     Gets a token up to the next comma or end of line. The end of line or terminating comma are not consumed.
public  StringbyteStringNoSemicolon()
     Gets a token up to the next semicolon or end of line. The end of line or terminating semicolon are not consumed.
public static  StringcharAsString(char ch)
     Converts a character to a string.
public  StringcharAsString(int nchars)
     Lookahead in the inputBuffer for n chars and return as a string. Do not consume the input.
public  Stringcomment()
     Gets a comment string. Consumes all characters between left and right parens.
public  ParseExceptioncreateParseException()
     Creates a parse exception.
public  StringgetBuffer()
     Gets the buffer.
public  StringgetNextId()
     Gets the next id.
public  TokengetNextToken()
     Gets the next token.
public  intgetPtr()
     Gets the read pointer.
public  StringgetRest()
     Gets the rest of the string buffer.
public  StringgetString(char c)
     Gets the sub-String until the requested character is encountered.
public  StringlookupToken(int value)
     Looks up a requested token.
public  intmarkInputPosition()
     Mark the position for backtracking.
public  Tokenmatch(int tok)
     Match the given token or throw an exception, if no such token can be matched.
public  Stringnumber()
     Gets and consumes the next number.
public  StringpeekNextId()
     Peeks at the next id, but doesn't move the buffer pointer forward.
public  TokenpeekNextToken()
     Looks ahead for one token.
public  VectorpeekNextToken(int ntokens)
     Peeks at the next token.
public  StringquotedString()
     Gets a quoted string.
public  voidrewindInputPosition(int position)
     Rewinds the input pointer to the marked position.
abstract public  voidselectLexer(String lexerName)
     Selects a specific lexer by name.
public  booleanstartsId()
     Checks for staring IDs.
public  Stringttoken()
     Gets the next textual token.
public  StringttokenAllowSpace()
    

Field Detail
ALPHA
final public static int ALPHA(Code)
ALPHA (alphabetic) token.



AND
final public static int AND(Code)
AND (ampersand) token.



AT
final public static int AT(Code)
AT sign token.



BACKSLASH
final public static int BACKSLASH(Code)
BACKSLASH (escaping) token.



BACK_QUOTE
final public static int BACK_QUOTE(Code)
BACK_QUOTE token.



BAR
final public static int BAR(Code)
Veritcal BAR token.



COLON
final public static int COLON(Code)
COLON token.



DIGIT
final public static int DIGIT(Code)
DIGIT (numeric) token.



DOLLAR
final public static int DOLLAR(Code)
DOLLAR token.



DOT
final public static int DOT(Code)
DOT (period) token.



DOUBLEQUOTE
final public static int DOUBLEQUOTE(Code)
DOUBLEQUOTE token.



END
final public static int END(Code)
END token.



EQUALS
final public static int EQUALS(Code)
EQUALS (equals sign) token.



EXCLAMATION
final public static int EXCLAMATION(Code)
EXCLAMATION token.



GREATER_THAN
final public static int GREATER_THAN(Code)
GREATER_THAN token.



HAT
final public static int HAT(Code)
HAT (carot) token.



HT
final public static int HT(Code)
HT (Horizontal tab) token.



ID
final public static int ID(Code)
ID token.



LESS_THAN
final public static int LESS_THAN(Code)
LESS_THAN token.



LPAREN
final public static int LPAREN(Code)
LPAREN (left paren) token.



L_CURLY
final public static int L_CURLY(Code)
L_CURLY (left curly bracket) token.



L_SQUARE_BRACKET
final public static int L_SQUARE_BRACKET(Code)
L_SQUARE_BRACKET (left square bracket) token.



MINUS
final public static int MINUS(Code)
MINUS token.



NULL
final public static int NULL(Code)
NULL token.



PERCENT
final public static int PERCENT(Code)
PERCENT token.



PLUS
final public static int PLUS(Code)
PLUS token.



POUND
final public static int POUND(Code)
POUND token.



QUESTION
final public static int QUESTION(Code)
QUESTION mark token.



QUOTE
final public static int QUOTE(Code)
Single QUOTE token.



RPAREN
final public static int RPAREN(Code)
RPAREN (right paren) token.



R_CURLY
final public static int R_CURLY(Code)
R_CURLY (right curly bracket) token.



R_SQUARE_BRACKET
final public static int R_SQUARE_BRACKET(Code)
R_SQUARE_BRACKET (right square bracket) token.



SEMICOLON
final public static int SEMICOLON(Code)
SEMICOLON token.



SLASH
final public static int SLASH(Code)
Forward SLASH token.



SP
final public static int SP(Code)
SPACE token.



STAR
final public static int STAR(Code)
STAR (asterisk) token.



START
final public static int START(Code)
START token.



TILDE
final public static int TILDE(Code)
TILDE token.



UNDERSCORE
final public static int UNDERSCORE(Code)
UNDERSCPRE token.



WHITESPACE
final public static int WHITESPACE(Code)
WHITESPACE token.



currentLexer
protected Hashtable currentLexer(Code)
Current elements of current lexing operation.



currentLexerName
protected String currentLexerName(Code)
Name of the current Lexer.



currentMatch
protected Token currentMatch(Code)
Current matched token.



globalSymbolTable
protected static Hashtable globalSymbolTable(Code)
Global symbol table for intermediate elements.



lexerTables
protected static Hashtable lexerTables(Code)
Lexical rules tables.




Constructor Detail
LexerCore
protected LexerCore()(Code)
Default constructor. Allocates a new hashtable and labels the Lexer as "charLexer".



LexerCore
public LexerCore(String lexerName)(Code)
Constructs a new lexer by name.
Parameters:
  lexerName - the name for the lexer



LexerCore
public LexerCore(String lexerName, String buffer)(Code)
Initialize the lexer with a buffer.
Parameters:
  lexerName - the requested lexer
Parameters:
  buffer - initial buffer to process




Method Detail
SPorHT
public void SPorHT()(Code)
Checks for space or horiizontal tab. The tokens are consumed if present. All parsing errors are ignored.(if any)



addKeyword
protected void addKeyword(String name, int value)(Code)
Adds a new keyword and value pair.
Parameters:
  name - the name of the keyword
Parameters:
  value - the content of the keyword



addLexer
protected Hashtable addLexer(String lexerName)(Code)
Adds a new Lexer. If the named lexer does not exist anew hashtable is allocated.
Parameters:
  lexerName - the lexer name the current lexer Hashtable



byteStringNoComma
public String byteStringNoComma()(Code)
Gets a token up to the next comma or end of line. The end of line or terminating comma are not consumed. If a parsing exception occurs, the consumed characters are returned. the next token without embedded commas



byteStringNoSemicolon
public String byteStringNoSemicolon()(Code)
Gets a token up to the next semicolon or end of line. The end of line or terminating semicolon are not consumed. If a parsing exception occurs, the consumed characters are returned. the next token without embedded semicolons



charAsString
public static String charAsString(char ch)(Code)
Converts a character to a string.
Parameters:
  ch - the character to enclose a string containing the single character



charAsString
public String charAsString(int nchars)(Code)
Lookahead in the inputBuffer for n chars and return as a string. Do not consume the input. In the event of a parsing error return the characters that could be consumed.
Parameters:
  nchars - the number of characters to look ahead a string containing the designated characters



comment
public String comment() throws ParseException(Code)
Gets a comment string. Consumes all characters between left and right parens. Back slashed escaped characters are preserved. the comment string, both starting and ending parens areconsumed.
exception:
  ParseException - if any parsing errors occur, or if thecomment is not properly closed



createParseException
public ParseException createParseException()(Code)
Creates a parse exception. an exception with the current buffer and offsetin the exception contents



getBuffer
public String getBuffer()(Code)
Gets the buffer. the parsing buffer



getNextId
public String getNextId()(Code)
Gets the next id. textual ID of the next token



getNextToken
public Token getNextToken()(Code)
Gets the next token. the next token



getPtr
public int getPtr()(Code)
Gets the read pointer. offset in the buffer



getRest
public String getRest()(Code)
Gets the rest of the string buffer. the remaining text in the buffer, or null if thebuffer has been consumed.



getString
public String getString(char c) throws ParseException(Code)
Gets the sub-String until the requested character is encountered.
Parameters:
  c - the character to match the string up til the separator caharacter
exception:
  ParseException - if a parsing error occurs



lookupToken
public String lookupToken(int value)(Code)
Looks up a requested token.
Parameters:
  value - the token to find the value of the token



markInputPosition
public int markInputPosition()(Code)
Mark the position for backtracking. the current pointer in the parsed content



match
public Token match(int tok) throws ParseException(Code)
Match the given token or throw an exception, if no such token can be matched.
Parameters:
  tok - the token to be checked the matched token
exception:
  ParseException - if an error occurs during parsing



number
public String number() throws ParseException(Code)
Gets and consumes the next number. Only digits are included in the returned string. the parsed number as a string
exception:
  ParseException - if any parsing errors occur



peekNextId
public String peekNextId()(Code)
Peeks at the next id, but doesn't move the buffer pointer forward. the textual ID of the next token



peekNextToken
public Token peekNextToken() throws ParseException(Code)
Looks ahead for one token. the next token
exception:
  ParseException - if an error occurs during parsing



peekNextToken
public Vector peekNextToken(int ntokens) throws ParseException(Code)
Peeks at the next token.
Parameters:
  ntokens - the number of tokens to look ahead a list of next tokens
exception:
  ParseException - if an error occurs during parsing



quotedString
public String quotedString() throws ParseException(Code)
Gets a quoted string. Read all the characters between double quotes into the next textual token. Preserve all back slash escaped characters. the contents of the quoted string, bothstarting and ending double quote charactersare consumed.
exception:
  ParseException - if any parsing errors occur



rewindInputPosition
public void rewindInputPosition(int position)(Code)
Rewinds the input pointer to the marked position.
Parameters:
  position - the desired parsing location



selectLexer
abstract public void selectLexer(String lexerName)(Code)
Selects a specific lexer by name.
Parameters:
  lexerName - the requested lexer



startsId
public boolean startsId()(Code)
Checks for staring IDs. true if next char is alphanumeric orbegins with appropriate punctuation characters.



ttoken
public String ttoken()(Code)
Gets the next textual token. the next token as a string



ttokenAllowSpace
public String ttokenAllowSpace()(Code)
Gets the next textual token including embedded white space the next text token as a string with embedded space andtab characters



Fields inherited from gov.nist.core.StringTokenizer
protected String buffer(Code)(Java Doc)
char delimiter(Code)(Java Doc)
protected int ptr(Code)(Java Doc)
protected int savedPtr(Code)(Java Doc)

Methods inherited from gov.nist.core.StringTokenizer
public void consume()(Code)(Java Doc)
public void consume(int k)(Code)(Java Doc)
public static String convertNewLines(String s)(Code)(Java Doc)
public String getLine()(Code)(Java Doc)
public Vector getLines()(Code)(Java Doc)
public char getNextChar() throws ParseException(Code)(Java Doc)
public String getNextToken(char delim) throws ParseException(Code)(Java Doc)
public static String getSDPFieldName(String line)(Code)(Java Doc)
public boolean hasMoreChars()(Code)(Java Doc)
public static boolean isAlpha(char ch)(Code)(Java Doc)
public static boolean isDigit(char ch)(Code)(Java Doc)
public static boolean isDigitString(String str)(Code)(Java Doc)
public static boolean isEscaped(String name, int index)(Code)(Java Doc)
public static boolean isHexDigit(char ch)(Code)(Java Doc)
public static boolean isQuotedPair(String name, int offset)(Code)(Java Doc)
public static boolean isValidChar(char ch)(Code)(Java Doc)
public char lookAhead() throws ParseException(Code)(Java Doc)
public char lookAhead(int k) throws ParseException(Code)(Java Doc)
public String nextToken()(Code)(Java Doc)
public String peekLine()(Code)(Java Doc)

Methods inherited from java.lang.Object
public boolean equals(Object obj)(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.