Class Lex
Represents Lexical Analyzer Object
Defined in: lex03.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Lex(src)
Lexical Analyzer Object
|
Method Attributes | Method Name and Description |
---|---|
ch(ch)
Given Character
|
|
digit()
Analyze Digit
|
|
lower()
Analyze Lower Case Character
|
|
sp()
Analyze Space
|
|
sq()
Analyze Single Quote
|
|
text(text, ignoreCase)
Analyze Text
|
|
upper()
Analyze Upper Case Character
|
Class Detail
Lex(src)
Lexical Analyzer Object
- Parameters:
- {String} src
- source string to analyze
- Since:
- 0.1
Method Detail
{String}
ch(ch)
Given Character
- Parameters:
- {Char} ch
- given character
- Since:
- 0.2
- Returns:
- {String} character if matched, null if not matched
{String}
digit()
Analyze Digit
- Since:
- 0.2
- Returns:
- {String} digit if matched, null if not matched
{String}
lower()
Analyze Lower Case Character
- Since:
- 0.2
- Returns:
- {String} character if matched, null if not matched
{String}
sp()
Analyze Space
- Since:
- 0.2
- Returns:
- {String} space if matched, null if not matched
{String}
sq()
Analyze Single Quote
- Since:
- 0.2
- Returns:
- {String} single quote if matched, null if not matched
{String}
text(text, ignoreCase)
Analyze Text
- Parameters:
- {Boolean} text
- given text
- {Boolean} ignoreCase
- true if ignore case
- Since:
- 0.3
- Returns:
- {String} text if matched, null if not matched
{String}
upper()
Analyze Upper Case Character
- Since:
- 0.2
- Returns:
- {String} character if matched, null if not matched