Guest User

Untitled

a guest
Jun 24th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.14 KB | None | 0 0
  1. token = _
  2. / keyword
  3. / identifier
  4. / constant
  5. / string-literal
  6. / punctuator
  7.  
  8. preprocessing-token = _
  9. / header-name
  10. / identifier
  11. / pp-number
  12. / character-constant
  13. / string-literal
  14. / punctuator
  15. / <each non-white-space character that cannot be one of the above>
  16.  
  17. keyword = _
  18. / 'auto'
  19. / '∗'
  20. / 'if'
  21. / 'unsigned'
  22. / 'break'
  23. / 'inline'
  24. / 'void'
  25. / 'case'
  26. / 'int'
  27. / 'volatile'
  28. / 'char'
  29. / 'long'
  30. / 'while'
  31. / 'const'
  32. / 'register'
  33. / '_Alignas'
  34. / 'continue'
  35. / 'restrict'
  36. / '_Alignof'
  37. / 'default'
  38. / 'return'
  39. / '_Atomic'
  40. / 'do'
  41. / 'short'
  42. / '_Bool'
  43. / 'double'
  44. / 'signed'
  45. / '_Complex'
  46. / 'else'
  47. / 'sizeof'
  48. / '_Generic'
  49. / 'enum'
  50. / 'static'
  51. / '_Imaginary'
  52. / 'extern'
  53. / 'struct'
  54. / '_Noreturn'
  55. / 'float'
  56. / 'switch'
  57. / '_Static_assert'
  58. / 'for'
  59. / 'typedef'
  60. / '_Thread_local'
  61. / 'goto'
  62. / 'union'
  63.  
  64. identifier = _
  65. / identifier-nondigit
  66. / identifier identifier-nondigit
  67. / identifier digit
  68.  
  69. identifier-nondigit = _
  70. / nondigit
  71. / universal-character-name
  72. / <other implementation-defined characters>
  73.  
  74. nondigit = _
  75. / '_'
  76. / 'a'
  77. / 'b'
  78. / 'c'
  79. / 'd'
  80. / 'e'
  81. / 'f'
  82. / 'g'
  83. / 'h'
  84. / 'i'
  85. / 'j'
  86. / 'k'
  87. / 'l'
  88. / 'm'
  89. / 'n'
  90. / 'o'
  91. / 'p'
  92. / 'q'
  93. / 'r'
  94. / 's'
  95. / 't'
  96. / 'u'
  97. / 'v'
  98. / 'w'
  99. / 'x'
  100. / 'y'
  101. / 'z'
  102. / 'A'
  103. / 'B'
  104. / 'C'
  105. / 'D'
  106. / 'E'
  107. / 'F'
  108. / 'G'
  109. / 'H'
  110. / 'I'
  111. / 'J'
  112. / 'K'
  113. / 'L'
  114. / 'M'
  115. / 'N'
  116. / 'O'
  117. / 'P'
  118. / 'Q'
  119. / 'R'
  120. / 'S'
  121. / 'T'
  122. / 'U'
  123. / 'V'
  124. / 'W'
  125. / 'X'
  126. / 'Y'
  127. / 'Z'
  128.  
  129. digit = _
  130. / '0'
  131. / '1'
  132. / '2'
  133. / '3'
  134. / '4'
  135. / '5'
  136. / '6'
  137. / '7'
  138. / '8'
  139. / '9'
  140.  
  141. universal-character-name = _
  142. / '\u' hex-quad
  143. / '\U' hex-quad hex-quad
  144.  
  145. hex-quad = _
  146. / hexadecimal-digit hexadecimal-digit
  147. / hexadecimal-digit hexadecimal-digit
  148.  
  149. constant = _
  150. / integer-constant
  151. / floating-constant
  152. / enumeration-constant
  153. / character-constant
  154.  
  155. integer-constant =
  156. / decimal-constant integer-suffix?
  157. / octal-constant integer-suffix?
  158. / hexadecimal-constant integer-suffix?
  159.  
  160. decimal-constant = _
  161. / nonzero-digit
  162. / decimal-constant digit
  163.  
  164. octal-constant = _
  165. / '0'
  166. / octal-constant octal-digit
  167.  
  168. hexadecimal-constant = _
  169. / hexadecimal-prefix hexadecimal-digit
  170. / hexadecimal-constant hexadecimal-digit
  171.  
  172. hexadecimal-prefix = _
  173. / '0x'
  174. / '0X'
  175.  
  176. nonzero-digit = _
  177. / '1'
  178. / '2'
  179. / '3'
  180. / '4'
  181. / '5'
  182. / '6'
  183. / '7'
  184. / '8'
  185. / '9'
  186.  
  187. octal-digit = _
  188. / '0'
  189. / '1'
  190. / '2'
  191. / '3'
  192. / '4'
  193. / '5'
  194. / '6'
  195. / '7'
  196.  
  197. hexadecimal-digit = _
  198. / '0'
  199. / '1'
  200. / '2'
  201. / '3'
  202. / '4'
  203. / '5'
  204. / '6'
  205. / '7'
  206. / '8'
  207. / '9'
  208. / 'a'
  209. / 'b'
  210. / 'c'
  211. / 'd'
  212. / 'e'
  213. / 'f'
  214. / 'A'
  215. / 'B'
  216. / 'C'
  217. / 'D'
  218. / 'E'
  219. / 'F'
  220.  
  221. integer-suffix = _
  222. / unsigned-suffix long-suffix?
  223. / unsigned-suffix long-long-suffix
  224. / long-suffix unsigned-suffix?
  225. / long-long-suffix unsigned-suffix?
  226.  
  227. unsigned-suffix = _
  228. / 'u'
  229. / 'U'
  230.  
  231. long-suffix =
  232. / 'l'
  233. / 'L'
  234.  
  235. long-long-suffix = _
  236. / 'll'
  237. / 'LL'
  238.  
  239. floating-constant = _
  240. / decimal-floating-constant
  241. / hexadecimal-floating-constant
  242.  
  243. decimal-floating-constant = _
  244. / fractional-constant exponent-part? floating-suffix?
  245. / digit-sequence exponent-part floating-suffix?
  246.  
  247. hexadecimal-floating-constant = _
  248. / hexadecimal-prefix hexadecimal-fractional-constant binary-exponent-part floating-suffix?
  249. / hexadecimal-prefix hexadecimal-digit-sequence binary-exponent-part floating-suffix?
  250.  
  251. fractional-constant = _
  252. / digit-sequence? '.' digit-sequence
  253. / digit-sequence '.'
  254.  
  255. exponent-part = _
  256. / 'e' sign? digit-sequence
  257. / 'E' sign? digit-sequence
  258.  
  259. sign = _
  260. / '+'
  261. / '-'
  262.  
  263. digit-sequence = _
  264. / digit
  265. / digit-sequence digit
  266.  
  267. hexadecimal-fractional-constant = _
  268. / hexadecimal-digit-sequence? '.' hexadecimal-digit-sequence
  269. / hexadecimal-digit-sequence '.'
  270.  
  271. binary-exponent-part = _
  272. / 'p' sign? digit-sequence
  273. / 'P' sign? digit-sequence
  274.  
  275. hexadecimal-digit-sequence = _
  276. / hexadecimal-digit
  277. / hexadecimal-digit-sequence hexadecimal-digit
  278.  
  279. floating-suffix = _
  280. / 'f'
  281. / 'l'
  282. / 'F'
  283. / 'L'
  284.  
  285. enumeration-constant =
  286. identifier
  287.  
  288. character-constant = _
  289. / q<'> c-char-sequence q<'>
  290. / q<L'> c-char-sequence q<'>
  291. / q<u'> c-char-sequence q<'>
  292. / q<U'> c-char-sequence q<'>
  293.  
  294. c-char-sequence = _
  295. / c-char
  296. / c-char-sequence c-char
  297.  
  298. c-char = _
  299. / <any member of the source character set except
  300. the single-quote ', backslash \, or new-line
  301. character>
  302. / escape-sequence
  303.  
  304. escape-sequence = _
  305. / simple-escape-sequence
  306. / octal-escape-sequence
  307. / hexadecimal-escape-sequence
  308. / universal-character-name
  309.  
  310. simple-escape-sequence = _
  311. / q<\'>
  312. / q<\">
  313. / q<\?>
  314. / q<\\>
  315. / q<\a>
  316. / q<\b>
  317. / q<\f>
  318. / q<\n>
  319. / q<\r>
  320. / q<\t>
  321. / q<\v>
  322.  
  323. octal-escape-sequence = _
  324. / '\' octal-digit
  325. / '\' octal-digit octal-digit
  326. / '\' octal-digit octal-digit octal-digit
  327.  
  328. hexadecimal-escape-sequence = _
  329. / '\x' hexadecimal-digit
  330. / hexadecimal-escape-sequence hexadecimal-digit
  331.  
  332. string-literal =
  333. encoding-prefix? '"' s-char-sequence? '"'
  334.  
  335. encoding-prefix = _
  336. / 'u8'
  337. / 'u'
  338. / 'U'
  339. / 'L'
  340.  
  341. s-char-sequence = _
  342. / s-char
  343. / s-char-sequence s-char
  344.  
  345. s-char = _
  346. / <any member of the source character set except
  347. the double-quote ", backslash \, or new-line character>
  348. / escape-sequence
  349.  
  350. punctuator = _
  351. / '['
  352. / ']'
  353. / '('
  354. / ')'
  355. / '{'
  356. / '}'
  357. / '.'
  358. / '->'
  359. / '++'
  360. / '--'
  361. / '&'
  362. / '*'
  363. / '+'
  364. / '-'
  365. / '~'
  366. / '!'
  367. / '/'
  368. / '%'
  369. / '<<'
  370. / '>>'
  371. / '<'
  372. / '>'
  373. / '<='
  374. / '>='
  375. / '=='
  376. / '!='
  377. / '^'
  378. / '|'
  379. / '&&'
  380. / '||'
  381. / '?'
  382. / ':'
  383. / ';'
  384. / '...'
  385. / '='
  386. / '*='
  387. / '/='
  388. / '%='
  389. / '+='
  390. / '-='
  391. / '<<='
  392. / '>>='
  393. / '&='
  394. / '^='
  395. / '|='
  396. / ','
  397. / '#'
  398. / '##'
  399. / '<:'
  400. / ':>'
  401. / '<%'
  402. / '%>'
  403. / '%:'
  404. / '%:%:'
  405.  
  406. header-name = _
  407. / '<' h-char-sequence '>'
  408. / '"' q-char-sequence '"'
  409.  
  410. h-char-sequence = _
  411. / h-char
  412. / h-char-sequence h-char
  413.  
  414. h-char =
  415. <any member of the source character set except
  416. the new-line character and \>>
  417.  
  418. q-char-sequence = _
  419. / q-char
  420. / q-char-sequence q-char
  421.  
  422. q-char = _
  423. <any member of the source character set except
  424. the new-line character and ">
  425.  
  426. pp-number = _
  427. / digit
  428. / '.' digit
  429. / pp-number digit
  430. / pp-number identifier-nondigit
  431. / pp-number 'e' sign
  432. / pp-number 'E' sign
  433. / pp-number 'p' sign
  434. / pp-number 'P' sign
  435. / pp-number '.'
Add Comment
Please, Sign In to add comment