Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanning steps:
- 1. input line recognition
- LineTerminator
- ASCII_CR ASCII_LF
- ASCII_CR
- ASCII_LF
- InputCharacter
- Any ASCII character except ASCII_CR and ASCII_LF
- 2. lexical non-terminal input processing
- Input
- InputElements(opt) Sub(opt)
- InputElements
- InputElement
- InputElements InputElement
- InputElement
- WhiteSpace
- Comment
- Token
- Sub
- ASCII_SUB
- 2a) whitespace
- WhiteSpace
- ASCII_SP
- ASCII_HT
- ASCII_FF
- LineTerminator
- 2b) comments
- Comment
- TraditionalComment
- EndOfLineComment
- TraditionalComment
- / * NotStar CommentTail
- EndOfLineComment
- / / CharactersInLine(opt) LineTerminator
- CommentTail
- * CommentTailStar
- NotStar CommentTail
- CommentTailStar
- /
- * CommentTailStar
- NotStarNotSlash CommentTail
- NotStar
- InputCharacter except *
- NotStarNotSlash
- InputCharacter except * and /
- LineTerminator
- CharactersInLine
- InputCharacter
- CharactersInLine InputCharacter
- 3. lexical terminal input processing (tokenization)
- Token
- Identifier
- Keyword
- Literal
- Separator
- Operator
- 3a) identifiers
- Identifier
- IdentifierChars except Keyword, BooleanLiteral, and NullLiteral
- IdentifierChars
- JavaLetter
- IdentifierChars JavaLetterOrDigit
- JavaLetter
- a-z, A-Z, _, $
- JavaLetterOrDigit
- a-z, A-Z, _, $, 0-9
- 3b) keywords
- Keyword
- abstract
- boolean
- break
- byte
- case
- catch
- char
- class
- const
- continue
- default
- do
- double
- else
- extends
- final
- finally
- float
- for
- goto
- if
- implements
- import
- instanceof
- int
- interface
- long
- native
- new
- package
- private
- protected
- public
- return
- short
- static
- strictfp
- super
- switch
- synchronized
- this
- throw
- throws
- transient
- try
- void
- volatile
- while
- 3c) literals
- Literals
- IntegerLiteral
- FloatingPointLiteral
- BooleanLiteral
- CharacterLiteral
- StringLiteral
- NullLiteral
- 3ci) integer literals
- IntegerLiteral
- DecimalIntegerLiteral
- HexIntegerLiteral
- OctalIntegerLiteral
- DecimalIntegerLiteral
- DecimalNumeral IntegerTypeSuffix(opt)
- HexIntegerLiteral
- HexNumeral IntegerTypeSuffix(opt)
- OctalIntegerLiteral
- OctalNumeral IntegerTypeSuffix(opt)
- IntegerTypeSuffix
- l
- L
- DecimalNumeral
- 0
- NonZeroDigit Digits(opt)
- Digits
- Digit
- Digits Digit
- Digit
- 0
- NonZeroDigit
- NonZeroDigit
- 1-9
- HexNumeral
- 0 x HexDigits
- 0 X HexDigits
- HexDigits
- HexDigit
- HexDigit HexDigits
- HexDigit
- 0-9, a-f, A-F
- OctalNumeral
- 0 OctalDigits
- OctalDigits
- OctalDigit
- OctalDigit OctalDigits
- OctalDigit
- 0-7
- 3cii) floating point literals
- FloatingPointLiteral
- Digits . Digits(opt) ExponentPart(opt) FloatTypeSuffix(opt)
- . Digits ExponentPart(opt) FloatTypeSuffix(opt)
- Digits ExponentPart FloatTypeSuffix(opt)
- Digits ExponentPart(opt) FloatTypeSuffix
- ExponentPart
- ExponentIndicator SignedInteger
- ExponentIndicator
- e
- E
- SignedInteger
- Sign(opt) Digits
- Sign
- +
- -
- FloatTypeSuffix
- f
- F
- d
- D
- 3ciii) boolean literals
- BooleanLiteral
- true
- false
- 3civ) character literals
- CharacterLiteral
- ' SingleCharacter '
- ' EscapeSequence '
- SingleCharacter
- InputCharacter except ' and \
- EscapeSequence
- \ b
- \ t
- \ n
- \ f
- \ r
- \ "
- \ '
- \ \
- OctalEscape
- TODO: verify that we need the following octal escape definitions
- OctalEscape
- \ OctalDigit
- \ OctalDigit OctalDigit
- \ ZeroToThree OctalDigit OctalDigit
- OctalDigit
- 0-7
- ZeroToThree
- 0-3
- 3cv) string literals
- StringLiteral
- " StringCharacters(opt) "
- StringCharacters
- StringCharacter
- StringCHaracters StringCharacter
- StringCharacter
- InputCharacter except " and \
- EscapeSequence
- 3cvi) null literal
- NullLiteral
- null
- 3d) separators
- Separator
- (
- )
- {
- }
- [
- ]
- ;
- ,
- .
- 3e) operators
- Operator
- =
- >
- <
- !
- ~
- ?
- :
- ==
- <=
- >=
- !=
- &&
- ||
- ++
- --
- +
- -
- *
- /
- &
- |
- ^
- %
- <<
- >>
- >>>
- +=
- -=
- *=
- /=
- &=
- |=
- ^=
- %=
- <<=
- >>=
- >>>=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement