Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

701 linhas
14 KiB

  1. Nonterminals useless in grammar
  2. iv3
  3. bv
  4. Terminals unused in grammar
  5. T_COLOR
  6. T_ERROR
  7. BOOLEAN
  8. Rules useless in grammar
  9. 32 iv3: '(' iv ')'
  10. 33 | '(' iv iv iv ')'
  11. 34 bv: BOOLEAN
  12. 35 | I_NUMBER
  13. 36 | F_NUMBER
  14. Rules useless in parser due to conflicts
  15. 21 iv: I_NUMBER
  16. 22 | '-' iv
  17. 23 | F_NUMBER
  18. 24 | '-' fv
  19. State 9 conflicts: 5 shift/reduce
  20. State 30 conflicts: 10 reduce/reduce
  21. State 31 conflicts: 10 reduce/reduce
  22. State 39 conflicts: 10 reduce/reduce
  23. State 40 conflicts: 10 reduce/reduce
  24. Grammar
  25. 0 $accept: sstp_description T_END
  26. 1 sstp_description: sstp_expression_list T_END
  27. 2 sstp_expression_list: sstp_expression
  28. 3 | sstp_expression sstp_expression_list
  29. 4 sstp_expression: sstp_command_list
  30. 5 sstp_command_list: sstp_command
  31. 6 | sstp_command_list sstp_command
  32. 7 sstp_command: light_command
  33. 8 | setup_command
  34. 9 | custom_command
  35. 10 light_command: T_ADDLIGHT
  36. 11 | T_ADDLIGHT fv
  37. 12 setup_command: T_OBJPOSITION v3
  38. 13 | T_OBJLOOKAT v3
  39. 14 | T_OBJCOLOR v4
  40. 15 | T_OBJCOLOR COLOR
  41. 16 custom_command: T_CUSTOMCMD svv sv
  42. 17 fv: F_NUMBER
  43. 18 | '-' fv
  44. 19 | I_NUMBER
  45. 20 | '-' iv
  46. 21 iv: I_NUMBER
  47. 22 | '-' iv
  48. 23 | F_NUMBER
  49. 24 | '-' fv
  50. 25 v3: '(' fv ')'
  51. 26 | '(' fv fv fv ')'
  52. 27 v4: '(' fv ')'
  53. 28 | '(' fv fv fv fv ')'
  54. 29 svv: STRING_VAR
  55. 30 sv: STRING
  56. 31 | STRING sv
  57. Terminals, with rules where they appear
  58. T_END (0) 0 1
  59. '(' (40) 25 26 27 28
  60. ')' (41) 25 26 27 28
  61. '-' (45) 18 20 22 24
  62. error (256)
  63. T_COLOR (258)
  64. T_ADDLIGHT (259) 10 11
  65. T_OBJPOSITION (260) 12
  66. T_OBJLOOKAT (261) 13
  67. T_OBJCOLOR (262) 14 15
  68. T_CUSTOMCMD (263) 16
  69. T_ERROR (264)
  70. F_NUMBER (265) 17 23
  71. I_NUMBER (266) 19 21
  72. STRING (267) 30 31
  73. STRING_VAR (268) 29
  74. BOOLEAN (269)
  75. COLOR (270) 15
  76. Nonterminals, with rules where they appear
  77. $accept (19)
  78. on left: 0
  79. sstp_description (20)
  80. on left: 1, on right: 0
  81. sstp_expression_list (21)
  82. on left: 2 3, on right: 1 3
  83. sstp_expression (22)
  84. on left: 4, on right: 2 3
  85. sstp_command_list (23)
  86. on left: 5 6, on right: 4 6
  87. sstp_command (24)
  88. on left: 7 8 9, on right: 5 6
  89. light_command (25)
  90. on left: 10 11, on right: 7
  91. setup_command (26)
  92. on left: 12 13 14 15, on right: 8
  93. custom_command (27)
  94. on left: 16, on right: 9
  95. fv (28)
  96. on left: 17 18 19 20, on right: 11 18 24 25 26 27 28
  97. iv (29)
  98. on left: 21 22 23 24, on right: 20 22
  99. v3 (30)
  100. on left: 25 26, on right: 12 13
  101. v4 (31)
  102. on left: 27 28, on right: 14
  103. svv (32)
  104. on left: 29, on right: 16
  105. sv (33)
  106. on left: 30 31, on right: 16 31
  107. state 0
  108. 0 $accept: . sstp_description T_END
  109. T_ADDLIGHT shift, and go to state 1
  110. T_OBJPOSITION shift, and go to state 2
  111. T_OBJLOOKAT shift, and go to state 3
  112. T_OBJCOLOR shift, and go to state 4
  113. T_CUSTOMCMD shift, and go to state 5
  114. sstp_description go to state 6
  115. sstp_expression_list go to state 7
  116. sstp_expression go to state 8
  117. sstp_command_list go to state 9
  118. sstp_command go to state 10
  119. light_command go to state 11
  120. setup_command go to state 12
  121. custom_command go to state 13
  122. state 1
  123. 10 light_command: T_ADDLIGHT .
  124. 11 | T_ADDLIGHT . fv
  125. F_NUMBER shift, and go to state 14
  126. I_NUMBER shift, and go to state 15
  127. '-' shift, and go to state 16
  128. $default reduce using rule 10 (light_command)
  129. fv go to state 17
  130. state 2
  131. 12 setup_command: T_OBJPOSITION . v3
  132. '(' shift, and go to state 18
  133. v3 go to state 19
  134. state 3
  135. 13 setup_command: T_OBJLOOKAT . v3
  136. '(' shift, and go to state 18
  137. v3 go to state 20
  138. state 4
  139. 14 setup_command: T_OBJCOLOR . v4
  140. 15 | T_OBJCOLOR . COLOR
  141. COLOR shift, and go to state 21
  142. '(' shift, and go to state 22
  143. v4 go to state 23
  144. state 5
  145. 16 custom_command: T_CUSTOMCMD . svv sv
  146. STRING_VAR shift, and go to state 24
  147. svv go to state 25
  148. state 6
  149. 0 $accept: sstp_description . T_END
  150. T_END shift, and go to state 26
  151. state 7
  152. 1 sstp_description: sstp_expression_list . T_END
  153. T_END shift, and go to state 27
  154. state 8
  155. 2 sstp_expression_list: sstp_expression .
  156. 3 | sstp_expression . sstp_expression_list
  157. T_ADDLIGHT shift, and go to state 1
  158. T_OBJPOSITION shift, and go to state 2
  159. T_OBJLOOKAT shift, and go to state 3
  160. T_OBJCOLOR shift, and go to state 4
  161. T_CUSTOMCMD shift, and go to state 5
  162. $default reduce using rule 2 (sstp_expression_list)
  163. sstp_expression_list go to state 28
  164. sstp_expression go to state 8
  165. sstp_command_list go to state 9
  166. sstp_command go to state 10
  167. light_command go to state 11
  168. setup_command go to state 12
  169. custom_command go to state 13
  170. state 9
  171. 4 sstp_expression: sstp_command_list .
  172. 6 sstp_command_list: sstp_command_list . sstp_command
  173. T_ADDLIGHT shift, and go to state 1
  174. T_OBJPOSITION shift, and go to state 2
  175. T_OBJLOOKAT shift, and go to state 3
  176. T_OBJCOLOR shift, and go to state 4
  177. T_CUSTOMCMD shift, and go to state 5
  178. T_ADDLIGHT [reduce using rule 4 (sstp_expression)]
  179. T_OBJPOSITION [reduce using rule 4 (sstp_expression)]
  180. T_OBJLOOKAT [reduce using rule 4 (sstp_expression)]
  181. T_OBJCOLOR [reduce using rule 4 (sstp_expression)]
  182. T_CUSTOMCMD [reduce using rule 4 (sstp_expression)]
  183. $default reduce using rule 4 (sstp_expression)
  184. sstp_command go to state 29
  185. light_command go to state 11
  186. setup_command go to state 12
  187. custom_command go to state 13
  188. state 10
  189. 5 sstp_command_list: sstp_command .
  190. $default reduce using rule 5 (sstp_command_list)
  191. state 11
  192. 7 sstp_command: light_command .
  193. $default reduce using rule 7 (sstp_command)
  194. state 12
  195. 8 sstp_command: setup_command .
  196. $default reduce using rule 8 (sstp_command)
  197. state 13
  198. 9 sstp_command: custom_command .
  199. $default reduce using rule 9 (sstp_command)
  200. state 14
  201. 17 fv: F_NUMBER .
  202. $default reduce using rule 17 (fv)
  203. state 15
  204. 19 fv: I_NUMBER .
  205. $default reduce using rule 19 (fv)
  206. state 16
  207. 18 fv: '-' . fv
  208. 20 | '-' . iv
  209. F_NUMBER shift, and go to state 30
  210. I_NUMBER shift, and go to state 31
  211. '-' shift, and go to state 32
  212. fv go to state 33
  213. iv go to state 34
  214. state 17
  215. 11 light_command: T_ADDLIGHT fv .
  216. $default reduce using rule 11 (light_command)
  217. state 18
  218. 25 v3: '(' . fv ')'
  219. 26 | '(' . fv fv fv ')'
  220. F_NUMBER shift, and go to state 14
  221. I_NUMBER shift, and go to state 15
  222. '-' shift, and go to state 16
  223. fv go to state 35
  224. state 19
  225. 12 setup_command: T_OBJPOSITION v3 .
  226. $default reduce using rule 12 (setup_command)
  227. state 20
  228. 13 setup_command: T_OBJLOOKAT v3 .
  229. $default reduce using rule 13 (setup_command)
  230. state 21
  231. 15 setup_command: T_OBJCOLOR COLOR .
  232. $default reduce using rule 15 (setup_command)
  233. state 22
  234. 27 v4: '(' . fv ')'
  235. 28 | '(' . fv fv fv fv ')'
  236. F_NUMBER shift, and go to state 14
  237. I_NUMBER shift, and go to state 15
  238. '-' shift, and go to state 16
  239. fv go to state 36
  240. state 23
  241. 14 setup_command: T_OBJCOLOR v4 .
  242. $default reduce using rule 14 (setup_command)
  243. state 24
  244. 29 svv: STRING_VAR .
  245. $default reduce using rule 29 (svv)
  246. state 25
  247. 16 custom_command: T_CUSTOMCMD svv . sv
  248. STRING shift, and go to state 37
  249. sv go to state 38
  250. state 26
  251. 0 $accept: sstp_description T_END .
  252. $default accept
  253. state 27
  254. 1 sstp_description: sstp_expression_list T_END .
  255. $default reduce using rule 1 (sstp_description)
  256. state 28
  257. 3 sstp_expression_list: sstp_expression sstp_expression_list .
  258. $default reduce using rule 3 (sstp_expression_list)
  259. state 29
  260. 6 sstp_command_list: sstp_command_list sstp_command .
  261. $default reduce using rule 6 (sstp_command_list)
  262. state 30
  263. 17 fv: F_NUMBER .
  264. 23 iv: F_NUMBER .
  265. T_END reduce using rule 17 (fv)
  266. T_END [reduce using rule 23 (iv)]
  267. T_ADDLIGHT reduce using rule 17 (fv)
  268. T_ADDLIGHT [reduce using rule 23 (iv)]
  269. T_OBJPOSITION reduce using rule 17 (fv)
  270. T_OBJPOSITION [reduce using rule 23 (iv)]
  271. T_OBJLOOKAT reduce using rule 17 (fv)
  272. T_OBJLOOKAT [reduce using rule 23 (iv)]
  273. T_OBJCOLOR reduce using rule 17 (fv)
  274. T_OBJCOLOR [reduce using rule 23 (iv)]
  275. T_CUSTOMCMD reduce using rule 17 (fv)
  276. T_CUSTOMCMD [reduce using rule 23 (iv)]
  277. F_NUMBER reduce using rule 17 (fv)
  278. F_NUMBER [reduce using rule 23 (iv)]
  279. I_NUMBER reduce using rule 17 (fv)
  280. I_NUMBER [reduce using rule 23 (iv)]
  281. '-' reduce using rule 17 (fv)
  282. '-' [reduce using rule 23 (iv)]
  283. ')' reduce using rule 17 (fv)
  284. ')' [reduce using rule 23 (iv)]
  285. $default reduce using rule 17 (fv)
  286. state 31
  287. 19 fv: I_NUMBER .
  288. 21 iv: I_NUMBER .
  289. T_END reduce using rule 19 (fv)
  290. T_END [reduce using rule 21 (iv)]
  291. T_ADDLIGHT reduce using rule 19 (fv)
  292. T_ADDLIGHT [reduce using rule 21 (iv)]
  293. T_OBJPOSITION reduce using rule 19 (fv)
  294. T_OBJPOSITION [reduce using rule 21 (iv)]
  295. T_OBJLOOKAT reduce using rule 19 (fv)
  296. T_OBJLOOKAT [reduce using rule 21 (iv)]
  297. T_OBJCOLOR reduce using rule 19 (fv)
  298. T_OBJCOLOR [reduce using rule 21 (iv)]
  299. T_CUSTOMCMD reduce using rule 19 (fv)
  300. T_CUSTOMCMD [reduce using rule 21 (iv)]
  301. F_NUMBER reduce using rule 19 (fv)
  302. F_NUMBER [reduce using rule 21 (iv)]
  303. I_NUMBER reduce using rule 19 (fv)
  304. I_NUMBER [reduce using rule 21 (iv)]
  305. '-' reduce using rule 19 (fv)
  306. '-' [reduce using rule 21 (iv)]
  307. ')' reduce using rule 19 (fv)
  308. ')' [reduce using rule 21 (iv)]
  309. $default reduce using rule 19 (fv)
  310. state 32
  311. 18 fv: '-' . fv
  312. 20 | '-' . iv
  313. 22 iv: '-' . iv
  314. 24 | '-' . fv
  315. F_NUMBER shift, and go to state 30
  316. I_NUMBER shift, and go to state 31
  317. '-' shift, and go to state 32
  318. fv go to state 39
  319. iv go to state 40
  320. state 33
  321. 18 fv: '-' fv .
  322. $default reduce using rule 18 (fv)
  323. state 34
  324. 20 fv: '-' iv .
  325. $default reduce using rule 20 (fv)
  326. state 35
  327. 25 v3: '(' fv . ')'
  328. 26 | '(' fv . fv fv ')'
  329. F_NUMBER shift, and go to state 14
  330. I_NUMBER shift, and go to state 15
  331. '-' shift, and go to state 16
  332. ')' shift, and go to state 41
  333. fv go to state 42
  334. state 36
  335. 27 v4: '(' fv . ')'
  336. 28 | '(' fv . fv fv fv ')'
  337. F_NUMBER shift, and go to state 14
  338. I_NUMBER shift, and go to state 15
  339. '-' shift, and go to state 16
  340. ')' shift, and go to state 43
  341. fv go to state 44
  342. state 37
  343. 30 sv: STRING .
  344. 31 | STRING . sv
  345. STRING shift, and go to state 37
  346. $default reduce using rule 30 (sv)
  347. sv go to state 45
  348. state 38
  349. 16 custom_command: T_CUSTOMCMD svv sv .
  350. $default reduce using rule 16 (custom_command)
  351. state 39
  352. 18 fv: '-' fv .
  353. 24 iv: '-' fv .
  354. T_END reduce using rule 18 (fv)
  355. T_END [reduce using rule 24 (iv)]
  356. T_ADDLIGHT reduce using rule 18 (fv)
  357. T_ADDLIGHT [reduce using rule 24 (iv)]
  358. T_OBJPOSITION reduce using rule 18 (fv)
  359. T_OBJPOSITION [reduce using rule 24 (iv)]
  360. T_OBJLOOKAT reduce using rule 18 (fv)
  361. T_OBJLOOKAT [reduce using rule 24 (iv)]
  362. T_OBJCOLOR reduce using rule 18 (fv)
  363. T_OBJCOLOR [reduce using rule 24 (iv)]
  364. T_CUSTOMCMD reduce using rule 18 (fv)
  365. T_CUSTOMCMD [reduce using rule 24 (iv)]
  366. F_NUMBER reduce using rule 18 (fv)
  367. F_NUMBER [reduce using rule 24 (iv)]
  368. I_NUMBER reduce using rule 18 (fv)
  369. I_NUMBER [reduce using rule 24 (iv)]
  370. '-' reduce using rule 18 (fv)
  371. '-' [reduce using rule 24 (iv)]
  372. ')' reduce using rule 18 (fv)
  373. ')' [reduce using rule 24 (iv)]
  374. $default reduce using rule 18 (fv)
  375. state 40
  376. 20 fv: '-' iv .
  377. 22 iv: '-' iv .
  378. T_END reduce using rule 20 (fv)
  379. T_END [reduce using rule 22 (iv)]
  380. T_ADDLIGHT reduce using rule 20 (fv)
  381. T_ADDLIGHT [reduce using rule 22 (iv)]
  382. T_OBJPOSITION reduce using rule 20 (fv)
  383. T_OBJPOSITION [reduce using rule 22 (iv)]
  384. T_OBJLOOKAT reduce using rule 20 (fv)
  385. T_OBJLOOKAT [reduce using rule 22 (iv)]
  386. T_OBJCOLOR reduce using rule 20 (fv)
  387. T_OBJCOLOR [reduce using rule 22 (iv)]
  388. T_CUSTOMCMD reduce using rule 20 (fv)
  389. T_CUSTOMCMD [reduce using rule 22 (iv)]
  390. F_NUMBER reduce using rule 20 (fv)
  391. F_NUMBER [reduce using rule 22 (iv)]
  392. I_NUMBER reduce using rule 20 (fv)
  393. I_NUMBER [reduce using rule 22 (iv)]
  394. '-' reduce using rule 20 (fv)
  395. '-' [reduce using rule 22 (iv)]
  396. ')' reduce using rule 20 (fv)
  397. ')' [reduce using rule 22 (iv)]
  398. $default reduce using rule 20 (fv)
  399. state 41
  400. 25 v3: '(' fv ')' .
  401. $default reduce using rule 25 (v3)
  402. state 42
  403. 26 v3: '(' fv fv . fv ')'
  404. F_NUMBER shift, and go to state 14
  405. I_NUMBER shift, and go to state 15
  406. '-' shift, and go to state 16
  407. fv go to state 46
  408. state 43
  409. 27 v4: '(' fv ')' .
  410. $default reduce using rule 27 (v4)
  411. state 44
  412. 28 v4: '(' fv fv . fv fv ')'
  413. F_NUMBER shift, and go to state 14
  414. I_NUMBER shift, and go to state 15
  415. '-' shift, and go to state 16
  416. fv go to state 47
  417. state 45
  418. 31 sv: STRING sv .
  419. $default reduce using rule 31 (sv)
  420. state 46
  421. 26 v3: '(' fv fv fv . ')'
  422. ')' shift, and go to state 48
  423. state 47
  424. 28 v4: '(' fv fv fv . fv ')'
  425. F_NUMBER shift, and go to state 14
  426. I_NUMBER shift, and go to state 15
  427. '-' shift, and go to state 16
  428. fv go to state 49
  429. state 48
  430. 26 v3: '(' fv fv fv ')' .
  431. $default reduce using rule 26 (v3)
  432. state 49
  433. 28 v4: '(' fv fv fv fv . ')'
  434. ')' shift, and go to state 50
  435. state 50
  436. 28 v4: '(' fv fv fv fv ')' .
  437. $default reduce using rule 28 (v4)