Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.50 KB | None | 0 0
  1. Scanning steps:
  2.  
  3. 1. input line recognition
  4.  
  5. LineTerminator
  6. ASCII_CR ASCII_LF
  7. ASCII_CR
  8. ASCII_LF
  9.  
  10. InputCharacter
  11. Any ASCII character except ASCII_CR and ASCII_LF
  12.  
  13. 2. lexical non-terminal input processing
  14.  
  15. Input
  16. InputElements(opt) Sub(opt)
  17.  
  18. InputElements
  19. InputElement
  20. InputElements InputElement
  21.  
  22. InputElement
  23. WhiteSpace
  24. Comment
  25. Token
  26.  
  27. Sub
  28. ASCII_SUB
  29.  
  30. 2a) whitespace
  31.  
  32. WhiteSpace
  33. ASCII_SP
  34. ASCII_HT
  35. ASCII_FF
  36. LineTerminator
  37.  
  38. 2b) comments
  39.  
  40. Comment
  41. TraditionalComment
  42. EndOfLineComment
  43.  
  44. TraditionalComment
  45. / * NotStar CommentTail
  46.  
  47. EndOfLineComment
  48. / / CharactersInLine(opt) LineTerminator
  49.  
  50. CommentTail
  51. * CommentTailStar
  52. NotStar CommentTail
  53.  
  54. CommentTailStar
  55. /
  56. * CommentTailStar
  57. NotStarNotSlash CommentTail
  58.  
  59. NotStar
  60. InputCharacter except *
  61.  
  62. NotStarNotSlash
  63. InputCharacter except * and /
  64. LineTerminator
  65.  
  66. CharactersInLine
  67. InputCharacter
  68. CharactersInLine InputCharacter
  69.  
  70. 3. lexical terminal input processing (tokenization)
  71.  
  72. Token
  73. Identifier
  74. Keyword
  75. Literal
  76. Separator
  77. Operator
  78.  
  79. 3a) identifiers
  80.  
  81. Identifier
  82. IdentifierChars except Keyword, BooleanLiteral, and NullLiteral
  83.  
  84. IdentifierChars
  85. JavaLetter
  86. IdentifierChars JavaLetterOrDigit
  87.  
  88. JavaLetter
  89. a-z, A-Z, _, $
  90.  
  91. JavaLetterOrDigit
  92. a-z, A-Z, _, $, 0-9
  93.  
  94. 3b) keywords
  95.  
  96. Keyword
  97. abstract
  98. boolean
  99. break
  100. byte
  101. case
  102. catch
  103. char
  104. class
  105. const
  106. continue
  107. default
  108. do
  109. double
  110. else
  111. extends
  112. final
  113. finally
  114. float
  115. for
  116. goto
  117. if
  118. implements
  119. import
  120. instanceof
  121. int
  122. interface
  123. long
  124. native
  125. new
  126. package
  127. private
  128. protected
  129. public
  130. return
  131. short
  132. static
  133. strictfp
  134. super
  135. switch
  136. synchronized
  137. this
  138. throw
  139. throws
  140. transient
  141. try
  142. void
  143. volatile
  144. while
  145.  
  146. 3c) literals
  147.  
  148. Literals
  149. IntegerLiteral
  150. FloatingPointLiteral
  151. BooleanLiteral
  152. CharacterLiteral
  153. StringLiteral
  154. NullLiteral
  155.  
  156. 3ci) integer literals
  157.  
  158. IntegerLiteral
  159. DecimalIntegerLiteral
  160. HexIntegerLiteral
  161. OctalIntegerLiteral
  162.  
  163. DecimalIntegerLiteral
  164. DecimalNumeral IntegerTypeSuffix(opt)
  165.  
  166. HexIntegerLiteral
  167. HexNumeral IntegerTypeSuffix(opt)
  168.  
  169. OctalIntegerLiteral
  170. OctalNumeral IntegerTypeSuffix(opt)
  171.  
  172. IntegerTypeSuffix
  173. l
  174. L
  175.  
  176. DecimalNumeral
  177. 0
  178. NonZeroDigit Digits(opt)
  179.  
  180. Digits
  181. Digit
  182. Digits Digit
  183.  
  184. Digit
  185. 0
  186. NonZeroDigit
  187.  
  188. NonZeroDigit
  189. 1-9
  190.  
  191. HexNumeral
  192. 0 x HexDigits
  193. 0 X HexDigits
  194.  
  195. HexDigits
  196. HexDigit
  197. HexDigit HexDigits
  198.  
  199. HexDigit
  200. 0-9, a-f, A-F
  201.  
  202. OctalNumeral
  203. 0 OctalDigits
  204.  
  205. OctalDigits
  206. OctalDigit
  207. OctalDigit OctalDigits
  208.  
  209. OctalDigit
  210. 0-7
  211.  
  212. 3cii) floating point literals
  213.  
  214. FloatingPointLiteral
  215. Digits . Digits(opt) ExponentPart(opt) FloatTypeSuffix(opt)
  216. . Digits ExponentPart(opt) FloatTypeSuffix(opt)
  217. Digits ExponentPart FloatTypeSuffix(opt)
  218. Digits ExponentPart(opt) FloatTypeSuffix
  219.  
  220. ExponentPart
  221. ExponentIndicator SignedInteger
  222.  
  223. ExponentIndicator
  224. e
  225. E
  226.  
  227. SignedInteger
  228. Sign(opt) Digits
  229.  
  230. Sign
  231. +
  232. -
  233.  
  234. FloatTypeSuffix
  235. f
  236. F
  237. d
  238. D
  239.  
  240. 3ciii) boolean literals
  241.  
  242. BooleanLiteral
  243. true
  244. false
  245.  
  246. 3civ) character literals
  247.  
  248. CharacterLiteral
  249. ' SingleCharacter '
  250. ' EscapeSequence '
  251.  
  252. SingleCharacter
  253. InputCharacter except ' and \
  254.  
  255. EscapeSequence
  256. \ b
  257. \ t
  258. \ n
  259. \ f
  260. \ r
  261. \ "
  262. \ '
  263. \ \
  264. OctalEscape
  265.  
  266. TODO: verify that we need the following octal escape definitions
  267.  
  268. OctalEscape
  269. \ OctalDigit
  270. \ OctalDigit OctalDigit
  271. \ ZeroToThree OctalDigit OctalDigit
  272.  
  273. OctalDigit
  274. 0-7
  275.  
  276. ZeroToThree
  277. 0-3
  278.  
  279. 3cv) string literals
  280.  
  281. StringLiteral
  282. " StringCharacters(opt) "
  283.  
  284. StringCharacters
  285. StringCharacter
  286. StringCHaracters StringCharacter
  287.  
  288. StringCharacter
  289. InputCharacter except " and \
  290. EscapeSequence
  291.  
  292. 3cvi) null literal
  293.  
  294. NullLiteral
  295. null
  296.  
  297. 3d) separators
  298.  
  299. Separator
  300. (
  301. )
  302. {
  303. }
  304. [
  305. ]
  306. ;
  307. ,
  308. .
  309.  
  310. 3e) operators
  311.  
  312. Operator
  313. =
  314. >
  315. <
  316. !
  317. ~
  318. ?
  319. :
  320. ==
  321. <=
  322. >=
  323. !=
  324. &&
  325. ||
  326. ++
  327. --
  328. +
  329. -
  330. *
  331. /
  332. &
  333. |
  334. ^
  335. %
  336. <<
  337. >>
  338. >>>
  339. +=
  340. -=
  341. *=
  342. /=
  343. &=
  344. |=
  345. ^=
  346. %=
  347. <<=
  348. >>=
  349. >>>=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement