Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1215 lines
28 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1998
  6. //
  7. // File: parser.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. /*
  11. * Created by CSD YACC (IBM PC) from "parser.y" */
  12. #include <basetsd.h>
  13. #line 2 "parser.y"
  14. #include "bnparse.h"
  15. // disable warning C4102: unreferenced label
  16. #pragma warning (disable : 4102)
  17. # define tokenEOF 0
  18. # define tokenNil 258
  19. # define tokenError 259
  20. # define tokenIdent 260
  21. # define tokenString 261
  22. # define tokenInteger 262
  23. # define tokenReal 263
  24. # define tokenArray 264
  25. # define tokenContinuous 265
  26. # define tokenCreator 266
  27. # define tokenDefault 267
  28. # define tokenDiscrete 268
  29. # define tokenFormat 269
  30. # define tokenFunction 270
  31. # define tokenImport 271
  32. # define tokenIs 272
  33. # define tokenKeyword 273
  34. # define tokenLeak 274
  35. # define tokenNA 275
  36. # define tokenName 276
  37. # define tokenNamed 277
  38. # define tokenNetwork 278
  39. # define tokenNode 279
  40. # define tokenOf 280
  41. # define tokenParent 281
  42. # define tokenPosition 282
  43. # define tokenProbability 283
  44. # define tokenProperties 284
  45. # define tokenProperty 285
  46. # define tokenPropIdent 286
  47. # define tokenStandard 287
  48. # define tokenState 288
  49. # define tokenType 289
  50. # define tokenUser 290
  51. # define tokenVersion 291
  52. # define tokenWordChoice 292
  53. # define tokenWordReal 293
  54. # define tokenWordString 294
  55. # define tokenAs 295
  56. # define tokenLevel 296
  57. # define tokenDomain 297
  58. # define tokenDistribution 298
  59. # define tokenDecisionGraph 299
  60. # define tokenBranch 300
  61. # define tokenOn 301
  62. # define tokenLeaf 302
  63. # define tokenVertex 303
  64. # define tokenMultinoulli 304
  65. # define tokenMerge 305
  66. # define tokenWith 306
  67. # define tokenFor 307
  68. # define tokenRangeOp 308
  69. # define UNARY 309
  70. #define yyclearin yychar = -1
  71. #define yyerrok yyerrflag = 0
  72. #ifndef YYMAXDEPTH
  73. #define YYMAXDEPTH 150
  74. #endif
  75. YYSTYPE yylval, yyval;
  76. #ifndef YYFARDATA
  77. #define YYFARDATA /*nothing*/
  78. #endif
  79. #if ! defined YYSTATIC
  80. #define YYSTATIC /*nothing*/
  81. #endif
  82. #ifndef YYOPTTIME
  83. #define YYOPTTIME 0
  84. #endif
  85. #ifndef YYR_T
  86. #define YYR_T int
  87. #endif
  88. typedef YYR_T yyr_t;
  89. #ifndef YYEXIND_T
  90. #define YYEXIND_T unsigned int
  91. #endif
  92. typedef YYEXIND_T yyexind_t;
  93. #ifndef YYACT
  94. #define YYACT yyact
  95. #endif
  96. #ifndef YYPACT
  97. #define YYPACT yypact
  98. #endif
  99. #ifndef YYPGO
  100. #define YYPGO yypgo
  101. #endif
  102. #ifndef YYR1
  103. #define YYR1 yyr1
  104. #endif
  105. #ifndef YYR2
  106. #define YYR2 yyr2
  107. #endif
  108. #ifndef YYCHK
  109. #define YYCHK yychk
  110. #endif
  111. #ifndef YYDEF
  112. #define YYDEF yydef
  113. #endif
  114. #ifndef YYV
  115. #define YYV yyv
  116. #endif
  117. #ifndef YYS
  118. #define YYS yys
  119. #endif
  120. #ifndef YYLOCAL
  121. #define YYLOCAL
  122. #endif
  123. # define YYERRCODE 256
  124. #line 473 "parser.y"
  125. YYSTATIC short yyexca[] ={
  126. #if !(YYOPTTIME)
  127. -1, 1,
  128. #endif
  129. 0, -1,
  130. -2, 0,
  131. #if !(YYOPTTIME)
  132. -1, 76,
  133. #endif
  134. 125, 168,
  135. 44, 168,
  136. -2, 176,
  137. #if !(YYOPTTIME)
  138. -1, 260,
  139. #endif
  140. 125, 73,
  141. -2, 91,
  142. };
  143. # define YYNPROD 200
  144. #if YYOPTTIME
  145. YYSTATIC yyexind_t yyexcaind[] = {
  146. 0,
  147. 0,
  148. 0,
  149. 0,
  150. 0,
  151. 0,
  152. 0,
  153. 0,
  154. 0,
  155. 0,
  156. 0,
  157. 0,
  158. 0,
  159. 0,
  160. 0,
  161. 0,
  162. 0,
  163. 0,
  164. 0,
  165. 0,
  166. 0,
  167. 0,
  168. 0,
  169. 0,
  170. 0,
  171. 0,
  172. 0,
  173. 0,
  174. 0,
  175. 0,
  176. 0,
  177. 0,
  178. 0,
  179. 0,
  180. 0,
  181. 0,
  182. 0,
  183. 0,
  184. 0,
  185. 0,
  186. 0,
  187. 0,
  188. 0,
  189. 0,
  190. 0,
  191. 0,
  192. 0,
  193. 0,
  194. 0,
  195. 0,
  196. 0,
  197. 0,
  198. 0,
  199. 0,
  200. 0,
  201. 0,
  202. 0,
  203. 0,
  204. 0,
  205. 0,
  206. 0,
  207. 0,
  208. 0,
  209. 0,
  210. 0,
  211. 0,
  212. 0,
  213. 0,
  214. 0,
  215. 0,
  216. 0,
  217. 0,
  218. 0,
  219. 0,
  220. 0,
  221. 0,
  222. 4,
  223. 0,
  224. 0,
  225. 0,
  226. 0,
  227. 0,
  228. 0,
  229. 0,
  230. 0,
  231. 0,
  232. 0,
  233. 0,
  234. 0,
  235. 0,
  236. 0,
  237. 0,
  238. 0,
  239. 0,
  240. 0,
  241. 0,
  242. 0,
  243. 0,
  244. 0,
  245. 0,
  246. 0,
  247. 0,
  248. 0,
  249. 0,
  250. 0,
  251. 0,
  252. 0,
  253. 0,
  254. 0,
  255. 0,
  256. 0,
  257. 0,
  258. 0,
  259. 0,
  260. 0,
  261. 0,
  262. 0,
  263. 0,
  264. 0,
  265. 0,
  266. 0,
  267. 0,
  268. 0,
  269. 0,
  270. 0,
  271. 0,
  272. 0,
  273. 0,
  274. 0,
  275. 0,
  276. 0,
  277. 0,
  278. 0,
  279. 0,
  280. 0,
  281. 0,
  282. 0,
  283. 0,
  284. 0,
  285. 0,
  286. 0,
  287. 0,
  288. 0,
  289. 0,
  290. 0,
  291. 0,
  292. 0,
  293. 0,
  294. 0,
  295. 0,
  296. 0,
  297. 0,
  298. 0,
  299. 0,
  300. 0,
  301. 0,
  302. 0,
  303. 0,
  304. 0,
  305. 0,
  306. 0,
  307. 0,
  308. 0,
  309. 0,
  310. 0,
  311. 0,
  312. 0,
  313. 0,
  314. 0,
  315. 0,
  316. 0,
  317. 0,
  318. 0,
  319. 0,
  320. 0,
  321. 0,
  322. 0,
  323. 0,
  324. 0,
  325. 0,
  326. 0,
  327. 0,
  328. 0,
  329. 0,
  330. 0,
  331. 0,
  332. 0,
  333. 0,
  334. 0,
  335. 0,
  336. 0,
  337. 0,
  338. 0,
  339. 0,
  340. 0,
  341. 0,
  342. 0,
  343. 0,
  344. 0,
  345. 0,
  346. 0,
  347. 0,
  348. 0,
  349. 0,
  350. 0,
  351. 0,
  352. 0,
  353. 0,
  354. 0,
  355. 0,
  356. 0,
  357. 0,
  358. 0,
  359. 0,
  360. 0,
  361. 0,
  362. 0,
  363. 0,
  364. 0,
  365. 0,
  366. 0,
  367. 0,
  368. 0,
  369. 0,
  370. 0,
  371. 0,
  372. 0,
  373. 0,
  374. 0,
  375. 0,
  376. 0,
  377. 0,
  378. 0,
  379. 0,
  380. 0,
  381. 0,
  382. 0,
  383. 0,
  384. 0,
  385. 0,
  386. 0,
  387. 0,
  388. 0,
  389. 0,
  390. 0,
  391. 0,
  392. 0,
  393. 0,
  394. 0,
  395. 0,
  396. 0,
  397. 0,
  398. 0,
  399. 0,
  400. 0,
  401. 0,
  402. 0,
  403. 0,
  404. 0,
  405. 0,
  406. 10,
  407. };
  408. #endif
  409. # define YYLAST 451
  410. YYSTATIC short YYFARDATA YYACT[]={
  411. 303, 24, 25, 80, 79, 120, 121, 89, 127, 295,
  412. 128, 126, 158, 129, 160, 20, 31, 157, 239, 206,
  413. 84, 306, 226, 225, 104, 133, 168, 54, 198, 178,
  414. 221, 98, 197, 254, 16, 102, 98, 6, 17, 15,
  415. 190, 185, 180, 62, 179, 80, 79, 238, 180, 78,
  416. 179, 235, 18, 19, 171, 170, 169, 99, 96, 270,
  417. 255, 101, 99, 180, 90, 179, 234, 91, 93, 94,
  418. 77, 90, 213, 209, 91, 208, 304, 232, 103, 309,
  419. 130, 308, 224, 119, 24, 25, 80, 79, 24, 25,
  420. 174, 297, 298, 296, 184, 137, 135, 299, 282, 274,
  421. 122, 261, 251, 216, 87, 148, 46, 28, 138, 139,
  422. 140, 115, 207, 75, 175, 136, 191, 155, 86, 143,
  423. 144, 145, 82, 278, 189, 264, 134, 173, 125, 118,
  424. 277, 52, 50, 48, 45, 27, 214, 22, 319, 74,
  425. 77, 264, 230, 152, 330, 317, 315, 317, 316, 247,
  426. 318, 228, 318, 317, 315, 110, 316, 66, 318, 97,
  427. 290, 289, 181, 181, 314, 272, 236, 166, 61, 165,
  428. 311, 59, 164, 142, 95, 111, 286, 243, 242, 287,
  429. 242, 113, 233, 240, 69, 70, 241, 196, 112, 67,
  430. 265, 229, 188, 60, 181, 215, 181, 319, 313, 319,
  431. 293, 202, 203, 69, 70, 319, 312, 68, 256, 124,
  432. 117, 259, 146, 53, 77, 23, 181, 131, 292, 263,
  433. 132, 192, 194, 186, 222, 205, 51, 37, 100, 109,
  434. 33, 159, 83, 8, 81, 85, 49, 39, 218, 38,
  435. 40, 26, 73, 116, 47, 30, 250, 161, 153, 200,
  436. 141, 162, 181, 172, 65, 258, 64, 76, 149, 177,
  437. 176, 80, 79, 77, 181, 177, 176, 80, 79, 183,
  438. 63, 44, 253, 35, 182, 302, 301, 281, 92, 285,
  439. 182, 294, 80, 79, 193, 92, 271, 123, 284, 201,
  440. 283, 280, 210, 279, 269, 182, 305, 307, 80, 79,
  441. 199, 310, 268, 181, 273, 320, 219, 262, 147, 321,
  442. 322, 222, 291, 223, 267, 324, 325, 326, 327, 328,
  443. 329, 323, 300, 260, 249, 275, 237, 76, 150, 151,
  444. 212, 211, 187, 114, 72, 154, 29, 245, 227, 288,
  445. 244, 276, 163, 266, 257, 246, 248, 204, 108, 107,
  446. 105, 71, 36, 42, 88, 252, 41, 32, 156, 55,
  447. 43, 34, 21, 5, 14, 13, 12, 11, 10, 9,
  448. 195, 7, 4, 3, 2, 1, 57, 56, 106, 58,
  449. 167, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  450. 0, 0, 0, 0, 0, 0, 0, 0, 0, 217,
  451. 0, 220, 0, 0, 0, 0, 0, 0, 0, 0,
  452. 0, 0, 0, 0, 231, 0, 0, 0, 0, 0,
  453. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  454. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  455. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  456. 220 };
  457. YYSTATIC short YYFARDATA YYPACT[]={
  458. -1000,-1000,-241,-1000,-245, 14,-172,-245,-1000,-1000,
  459. -1000,-1000,-1000,-1000,-1000, 12,-153,-1000,-1000,-283,
  460. 190,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 187,
  461. -172,-172,-1000,-1000,-1000,-1000, 11,-154, 10, 9,
  462. 186, 8, 172, -98, -82,-1000,-1000,-1000,-259,-1000,
  463. -276,-156,-1000,-1000,-1000,-1000,-1000,-1000,-1000, 6,
  464. 6, 6,-1000, 115,-1000,-1000,-1000,-229,-224,-225,
  465. 6,-101, -13, 85,-1000, 6,-303,-302,-176,-1000,
  466. -1000, 84,-1000,-292,-182, 176,-1000,-270, 1,-165,
  467. -1000,-1000,-1000,-217,-166,-1000,-1000,-1000,-1000,-1000,
  468. 6, 6, 6,-1000,-1000, 114,-1000,-1000,-1000,-1000,
  469. -1000, 6, 6, 6, 171,-155,-1000,-1000,-259,-172,
  470. -172,-217,-1000,-1000,-1000,-276,-172,-289,-290,-289,
  471. -1000,-1000,-156,-172,-1000, 113, 110, 108,-238,-1000,
  472. -1, -1,-1000,-167,-227, 183,-1000, 148,-1000,-1000,
  473. -1000,-1000,-1000,-1000,-237, 181,-1000,-1000,-1000,-237,
  474. 182,-172,-1000,-1000,-1000,-1000,-1000, 143,-248,-1000,
  475. -1000,-252, -1,-1000, 5,-1000,-1000,-1000,-1000,-217,
  476. -217,-1000,-1000,-1000,-1000, -72, 30, 13,-157,-1000,
  477. -172,-1000,-259,-1000, 20,-289,-179,-271, 60,-1000,
  478. 98,-1000,-1000,-1000,-1000,-172,-185, 138,-196,-211,
  479. -1000,-1000, 107,-1000,-223,-280,-1000,-1000, 142,-1000,
  480. -303, 136,-1000, 181,-1000,-1000,-1000,-1000,-1000,-1000,
  481. 5,-1000, 56, 30,-1000,-1000,-1000,-1000, 6,-158,
  482. -1000,-259, 20,-1000,-1000,-172,-1000, 6, 170,-1000,
  483. -159, 179,-1000,-1000, 97,-1000,-1000,-1000,-1000,-1000,
  484. 19, 106,-1000,-161,-172,-1000, 7, -2,-1000,-162,
  485. -1000, 6,-1000, 135,-1000,-1000,-1000,-1000,-1000, 102,
  486. 101, 20, 178, 159,-169,-1000,-1000,-163,-172,-1000,
  487. -1000, 134, 36, 6, 126,-1000,-1000,-1000,-1000,-1000,
  488. 81, 157, 120, 111, 36,-1000,-1000,-1000, 36, 36,
  489. -1000,-169,-1000,-1000, 36, 36, 36, 36, 36, 36,
  490. 103,-1000,-1000,-1000, 111, 105, 105, 44, 44, 44,
  491. -1000 };
  492. YYSTATIC short YYFARDATA YYPGO[]={
  493. 0, 380, 9, 112, 208, 159, 60, 379, 378, 377,
  494. 21, 29, 376, 375, 374, 373, 372, 371, 233, 369,
  495. 368, 367, 366, 365, 364, 363, 362, 361, 360, 359,
  496. 7, 358, 117, 357, 356, 354, 353, 352, 351, 350,
  497. 349, 348, 157, 347, 344, 343, 341, 339, 33, 338,
  498. 337, 336, 334, 333, 332, 331, 330, 326, 324, 323,
  499. 314, 308, 307, 304, 302, 294, 293, 291, 290, 288,
  500. 281, 277, 30, 276, 275, 0, 273, 271, 270, 256,
  501. 254, 253, 127, 250, 249, 114, 245, 244, 242, 139,
  502. 113, 116, 238, 237, 236, 235, 118, 234, 122, 232,
  503. 124, 231 };
  504. YYSTATIC yyr_t YYFARDATA YYR1[]={
  505. 0, 14, 13, 15, 17, 17, 18, 18, 18, 18,
  506. 18, 18, 16, 25, 25, 27, 26, 28, 28, 29,
  507. 29, 29, 30, 30, 30, 31, 31, 32, 32, 9,
  508. 12, 7, 34, 35, 24, 33, 36, 33, 37, 20,
  509. 38, 38, 39, 39, 39, 39, 39, 8, 40, 43,
  510. 45, 43, 44, 44, 46, 47, 46, 48, 48, 48,
  511. 6, 4, 4, 50, 49, 41, 51, 52, 54, 21,
  512. 55, 55, 58, 60, 55, 53, 53, 53, 61, 61,
  513. 56, 62, 62, 63, 63, 57, 57, 59, 59, 64,
  514. 64, 65, 65, 65, 69, 68, 70, 70, 70, 2,
  515. 2, 2, 71, 66, 67, 73, 73, 74, 74, 72,
  516. 72, 3, 3, 3, 11, 11, 11, 11, 10, 10,
  517. 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
  518. 75, 76, 19, 77, 77, 78, 78, 78, 79, 79,
  519. 80, 80, 1, 1, 1, 1, 1, 5, 5, 81,
  520. 42, 42, 83, 42, 82, 82, 84, 84, 85, 85,
  521. 85, 86, 22, 87, 88, 88, 88, 89, 89, 90,
  522. 90, 90, 90, 90, 90, 90, 90, 91, 92, 92,
  523. 92, 23, 93, 95, 95, 95, 96, 96, 94, 97,
  524. 97, 97, 98, 98, 98, 98, 99, 101, 100, 100 };
  525. YYSTATIC yyr_t YYFARDATA YYR2[]={
  526. 0, 0, 2, 2, 1, 2, 1, 1, 1, 1,
  527. 1, 1, 2, 2, 1, 0, 4, 0, 2, 1,
  528. 1, 1, 1, 1, 1, 1, 1, 1, 0, 4,
  529. 4, 4, 0, 0, 6, 0, 0, 3, 0, 6,
  530. 0, 3, 1, 1, 1, 1, 1, 3, 4, 2,
  531. 0, 6, 0, 1, 0, 0, 4, 0, 1, 3,
  532. 1, 1, 1, 0, 4, 7, 0, 0, 0, 9,
  533. 2, 1, 0, 0, 6, 0, 2, 1, 1, 3,
  534. 4, 0, 3, 1, 3, 0, 4, 0, 2, 3,
  535. 3, 0, 4, 2, 0, 2, 0, 1, 3, 1,
  536. 1, 1, 0, 2, 4, 0, 1, 1, 3, 1,
  537. 3, 2, 2, 1, 2, 2, 1, 1, 1, 1,
  538. 3, 3, 3, 3, 3, 3, 1, 1, 1, 2,
  539. 2, 0, 5, 0, 3, 1, 1, 1, 2, 2,
  540. 6, 4, 3, 3, 1, 1, 3, 1, 1, 0,
  541. 5, 4, 0, 4, 3, 1, 1, 3, 1, 1,
  542. 1, 0, 4, 3, 0, 1, 3, 3, 1, 3,
  543. 3, 2, 2, 2, 2, 1, 1, 3, 0, 1,
  544. 3, 4, 4, 0, 1, 3, 3, 1, 3, 0,
  545. 1, 3, 4, 4, 4, 6, 2, 4, 0, 2 };
  546. YYSTATIC short YYFARDATA YYCHK[]={
  547. -1000, -13, -14, -15, -16, -25, 278, -17, -18, -19,
  548. -20, -21, -22, -23, -24, 284, 279, 283, 297, 298,
  549. 260, -26, 123, -4, 260, 261, -18, 123, 260, -51,
  550. -86, 299, -33, 40, -27, -76, -37, 40, -4, -93,
  551. -4, -34, -36, -28, -77, 123, 260, -87, 123, -94,
  552. 123, 40, 123, 41, 125, -29, -9, -12, -7, 269,
  553. 291, 266, 125, -78, -79, -80, -42, 271, 289, 285,
  554. 286, -38, -52, -88, -89, -90, -4, -10, 308, 263,
  555. 262, -97, -98, -99, 296, -95, -96, 260, -35, -30,
  556. 58, 61, 272, -30, -30, 59, 287, -5, 260, 286,
  557. -5, 286, 260, -30, 125, -39, -8, -40, -41, -42,
  558. 256, 276, 289, 282, -53, 124, 256, 125, 44, -30,
  559. 308, 308, -10, -4, 125, 44, 303, 300, 302, 305,
  560. 262, 41, 44, 295, 125, 261, -10, 261, -30, -30,
  561. -30, -83, 59, -30, -30, -30, 41, -61, 260, -89,
  562. -4, -4, -10, -98, -4, -32, -31, 306, 301,-101,
  563. 304, -32, -96, -4, 59, 59, 59, -1, 264, 294,
  564. 293, 292, -81, -82, 91, -85, 261, 260, -11, 45,
  565. 43, -10, 275, -82, 261, 268, 40, -54, 44,-100,
  566. 277, -91, 40,-100, 40, -4, 44, 280, 280, -82,
  567. -84, -85, -10, -10, -43, 297, 91, -3, 45, 43,
  568. 262, -55, -56, 59, 123, -30, 260, -4, -92, -90,
  569. -4, -72, -11, -32, 261, 294, 293, -49, 91, 93,
  570. 44, -4, 262, 44, 262, 262, 59, -57, 270, 298,
  571. 41, 44, 44, 41, -91, -50, -85, 93, -3, -58,
  572. -30, 260, -90, -11, -48, -6, -4, -44, -30, 41,
  573. -59, 260, -62, 40, 44, 93, -45, -60, -64, -65,
  574. 40, 267, 59, -63, 260, -6, -46, 123, 125, -66,
  575. -67, -71, 260, -68, -69, -30, 41, 44, -47, 59,
  576. 59, -72, 40, 41, -70, -2, 262, 260, 261, 260,
  577. -48, -73, -74, -75, 40, 260, -10, 261, 45, 43,
  578. -30, 44, 125, 41, 44, 43, 45, 42, 47, 94,
  579. -75, -75, -75, -2, -75, -75, -75, -75, -75, -75,
  580. 41 };
  581. YYSTATIC short YYFARDATA YYDEF[]={
  582. 1, -2, 0, 2, 0, 0, 14, 3, 4, 6,
  583. 7, 8, 9, 10, 11, 0, 0, 66, 161, 0,
  584. 35, 12, 15, 13, 61, 62, 5, 131, 38, 0,
  585. 0, 0, 32, 36, 17, 133, 0, 0, 0, 0,
  586. 0, 0, 0, 0, 0, 40, 67, 162, 164, 181,
  587. 189, 183, 33, 37, 16, 18, 19, 20, 21, 0,
  588. 0, 0, 132, 0, 135, 136, 137, 0, 0, 0,
  589. 0, 0, 75, 0, 165, 0, -2, 175, 0, 118,
  590. 119, 0, 190, 0, 0, 0, 184, 187, 0, 0,
  591. 22, 23, 24, 0, 0, 134, 138, 139, 147, 148,
  592. 0, 0, 0, 152, 39, 0, 42, 43, 44, 45,
  593. 46, 0, 0, 0, 0, 0, 77, 163, 0, 0,
  594. 174, 173, 171, 172, 188, 0, 0, 28, 0, 28,
  595. 196, 182, 0, 0, 34, 0, 0, 0, 0, 149,
  596. 0, 0, 41, 0, 0, 0, 68, 76, 78, 166,
  597. 167, 170, 169, 191, 198, 0, 27, 25, 26, 198,
  598. 0, 0, 185, 186, 29, 30, 31, 141, 0, 144,
  599. 145, 0, 0, 151, 0, 155, 158, 159, 160, 0,
  600. 0, 116, 117, 153, 47, 0, 0, 0, 0, 192,
  601. 0, 193, 178, 194, 0, 28, 0, 0, 0, 150,
  602. 0, 156, 114, 115, 48, 0, 0, 0, 0, 0,
  603. 113, 69, 0, 71, 85, 0, 79, 199, 0, 179,
  604. 176, 0, 109, 0, 140, 142, 143, 146, 63, 154,
  605. 0, 49, 0, 0, 111, 112, 70, 72, 0, 0,
  606. 177, 0, 0, 197, 195, 57, 157, 52, 0, 87,
  607. 0, 81, 180, 110, 0, 58, 60, 50, 53, 65,
  608. -2, 0, 80, 0, 0, 64, 54, 0, 88, 102,
  609. 94, 0, 86, 0, 83, 59, 51, 55, 74, 0,
  610. 0, 0, 0, 0, 96, 93, 82, 0, 57, 89,
  611. 90, 103, 105, 0, 95, 97, 99, 100, 101, 84,
  612. 0, 0, 106, 107, 0, 126, 127, 128, 0, 0,
  613. 92, 0, 56, 104, 0, 0, 0, 0, 0, 0,
  614. 0, 129, 130, 98, 108, 121, 122, 123, 124, 125,
  615. 120 };
  616. #ifdef YYRECOVER
  617. YYSTATIC short yyrecover[] = {
  618. -1000 };
  619. #endif
  620. /* SCCSWHAT( "@(#)yypars.c 3.1 88/11/16 22:00:49 " ) */
  621. #line 3 "yypars.c"
  622. # define YYFLAG -1000
  623. # define YYERROR goto yyerrlab
  624. # define YYACCEPT return 0
  625. # define YYABORT return 1
  626. #ifdef YYDEBUG /* RRR - 10/9/85 */
  627. #define yyprintf(a, b, c, d) printf(a, b, c, d)
  628. #else
  629. #define yyprintf(a, b, c, d)
  630. #endif
  631. #ifndef YYPRINT
  632. #define YYPRINT printf
  633. #endif
  634. /* parser for yacc output */
  635. #ifdef YYDUMP
  636. int yydump = 1; /* 1 for dumping */
  637. void yydumpinfo(void);
  638. #endif
  639. #ifdef YYDEBUG
  640. YYSTATIC int yydebug = 0; /* 1 for debugging */
  641. #endif
  642. #ifndef YYVGLOBAL
  643. YYSTATIC
  644. #endif
  645. YYSTYPE yyv[YYMAXDEPTH]; /* where the values are stored */
  646. YYSTATIC short yys[YYMAXDEPTH]; /* the parse stack */
  647. #if ! defined(YYRECURSIVE)
  648. YYSTATIC int yychar = -1; /* current input token number */
  649. YYSTATIC int yynerrs = 0; /* number of errors */
  650. YYSTATIC short yyerrflag = 0; /* error recovery flag */
  651. #endif
  652. #ifdef YYRECOVER
  653. /*
  654. ** yyscpy : copy f onto t and return a ptr to the null terminator at the
  655. ** end of t.
  656. */
  657. YYSTATIC
  658. char *yyscpy(register char* t, register char* f)
  659. {
  660. while (*t = *f++)
  661. t++;
  662. return t; /* ptr to the null char */
  663. }
  664. #endif
  665. #ifndef YYNEAR
  666. #define YYNEAR
  667. #endif
  668. #ifndef YYPASCAL
  669. #define YYPASCAL
  670. #endif
  671. #ifndef YYLOCAL
  672. #define YYLOCAL
  673. #endif
  674. #if ! defined YYPARSER
  675. #define YYPARSER yyparse
  676. #endif
  677. #if ! defined YYLEX
  678. #define YYLEX yylex
  679. #endif
  680. #if defined(YYRECURSIVE)
  681. YYSTATIC int yychar = -1; /* current input token number */
  682. YYSTATIC int yynerrs = 0; /* number of errors */
  683. YYSTATIC short yyerrflag = 0; /* error recovery flag */
  684. YYSTATIC short yyn;
  685. YYSTATIC short yystate = 0;
  686. YYSTATIC short *yyps= &yys[-1];
  687. YYSTATIC YYSTYPE *yypv= &yyv[-1];
  688. YYSTATIC short yyj;
  689. YYSTATIC short yym;
  690. #endif
  691. YYLOCAL YYNEAR YYPASCAL YYPARSER()
  692. {
  693. #if !defined(YYRECURSIVE)
  694. register short yyn;
  695. short yystate = 0;
  696. short* yyps = &yys[-1];
  697. YYSTYPE* yypv = &yyv[-1];
  698. short yyj, yym;
  699. #endif
  700. #ifdef YYDUMP
  701. yydumpinfo();
  702. #endif
  703. yystack: /* put a state and value onto the stack */
  704. yyprintf("state %d, char %d\n", yystate, yychar, 0);
  705. if (++yyps > &yys[YYMAXDEPTH])
  706. {
  707. yyerror("yacc stack overflow");
  708. YYABORT;
  709. }
  710. *yyps = yystate;
  711. ++yypv;
  712. *yypv = yyval;
  713. yynewstate:
  714. yyn = YYPACT[yystate];
  715. if (yyn <= YYFLAG) /* simple state, no lookahead */
  716. goto yydefault;
  717. if (yychar < 0) /* need a lookahead */
  718. yychar = YYLEX();
  719. if (((yyn += (short)yychar) < 0) || (yyn >= YYLAST))
  720. goto yydefault;
  721. if (YYCHK[ yyn = YYACT[yyn]] == yychar)
  722. {
  723. /* valid shift */
  724. yychar = -1;
  725. yyval = yylval;
  726. yystate = yyn;
  727. if (yyerrflag > 0)
  728. --yyerrflag;
  729. goto yystack;
  730. }
  731. yydefault:
  732. /* default state action */
  733. if ((yyn = YYDEF[yystate]) == -2)
  734. {
  735. register short* yyxi;
  736. if (yychar < 0)
  737. yychar = YYLEX();
  738. /*
  739. ** search exception table, we find a -1 followed by the current state.
  740. ** if we find one, we'll look through terminal,state pairs. if we find
  741. ** a terminal which matches the current one, we have a match.
  742. ** the exception table is when we have a reduce on a terminal.
  743. */
  744. #if YYOPTTIME
  745. for (yyxi = yyexca + yyexcaind[yystate]; *yyxi != yychar && *yyxi >= 0; yyxi += 2)
  746. ;
  747. #else
  748. for (yyxi = yyexca; *yyxi != -1 || yyxi[1] != yystate; yyxi += 2)
  749. ;
  750. while (*(yyxi += 2) >= 0)
  751. {
  752. if (*yyxi == yychar)
  753. break;
  754. }
  755. #endif
  756. if ((yyn = yyxi[1]) < 0)
  757. {
  758. YYACCEPT; // accept
  759. }
  760. }
  761. if (yyn == 0) /* error */
  762. {
  763. /* error ... attempt to resume parsing */
  764. switch (yyerrflag)
  765. {
  766. case 0: /* brand new error */
  767. #ifdef YYRECOVER
  768. {
  769. register int i,j;
  770. for (i = 0; yyrecover[i] != -1000 && yystate > yyrecover[i]; i += 3)
  771. ;
  772. if (yystate == yyrecover[i])
  773. {
  774. yyprintf("recovered, from state %d to state %d on token %d\n",
  775. yystate, yyrecover[i + 2], yyrecover[i + 1]);
  776. j = yyrecover[i + 1];
  777. if (j < 0)
  778. {
  779. /*
  780. ** here we have one of the injection set, so we're not quite
  781. ** sure that the next valid thing will be a shift. so we'll
  782. ** count it as an error and continue.
  783. ** actually we're not absolutely sure that the next token
  784. ** we were supposed to get is the one when j > 0. for example,
  785. ** for(+) {;} error recovery with yyerrflag always set, stops
  786. ** after inserting one ; before the +. at the point of the +,
  787. ** we're pretty sure the guy wants a 'for' loop. without
  788. ** setting the flag, when we're almost absolutely sure, we'll
  789. ** give him one, since the only thing we can shift on this
  790. ** error is after finding an expression followed by a +
  791. */
  792. yyerrflag++;
  793. j = -j;
  794. }
  795. if (yyerrflag <= 1)
  796. {
  797. /* only on first insertion */
  798. yyrecerr(yychar, j); /* what was, what should be first */
  799. }
  800. yyval = yyeval(j);
  801. yystate = yyrecover[i + 2];
  802. goto yystack;
  803. }
  804. }
  805. #endif
  806. yyerror("syntax error");
  807. yyerrlab:
  808. ++yynerrs;
  809. case 1:
  810. case 2: /* incompletely recovered error ... try again */
  811. yyerrflag = 3;
  812. /* find a state where "error" is a legal shift action */
  813. while (yyps >= yys)
  814. {
  815. yyn = YYPACT[*yyps] + YYERRCODE;
  816. if (yyn>= 0 && yyn < YYLAST && YYCHK[YYACT[yyn]] == YYERRCODE)
  817. {
  818. yystate = YYACT[yyn]; /* simulate a shift of "error" */
  819. goto yystack;
  820. }
  821. yyn = YYPACT[*yyps];
  822. /* the current yyps has no shift onn "error", pop stack */
  823. yyprintf("error recovery pops state %d, uncovers %d\n", *yyps, yyps[-1], 0);
  824. --yyps;
  825. --yypv;
  826. }
  827. /* there is no state on the stack with an error shift ... abort */
  828. yyabort:
  829. YYABORT;
  830. case 3: /* no shift yet; clobber input char */
  831. yyprintf("error recovery discards char %d\n", yychar, 0, 0);
  832. if (yychar == 0)
  833. goto yyabort; /* don't discard EOF, quit */
  834. yychar = -1;
  835. goto yynewstate; /* try again in the same state */
  836. }
  837. }
  838. /* reduction by production yyn */
  839. yyreduce:
  840. {
  841. register YYSTYPE *yypvt;
  842. yyprintf("reduce %d\n",yyn, 0, 0);
  843. yypvt = yypv;
  844. yyps -= YYR2[yyn];
  845. yypv -= YYR2[yyn];
  846. yyval = yypv[1];
  847. yym = yyn;
  848. yyn = (short)YYR1[yyn]; /* consult goto table to find next state */
  849. yyj = YYPGO[yyn] + *yyps + 1;
  850. if (yyj >= YYLAST || YYCHK[yystate = YYACT[yyj]] != -yyn)
  851. {
  852. yystate = YYACT[YYPGO[yyn]];
  853. }
  854. #ifdef YYDUMP
  855. yydumpinfo();
  856. #endif
  857. switch (yym)
  858. {
  859. case 1:
  860. #line 76 "parser.y"
  861. { yyclearin; } break;
  862. case 13:
  863. #line 97 "parser.y"
  864. { SetNetworkSymb(yypvt[-0].zsr); } break;
  865. case 15:
  866. #line 100 "parser.y"
  867. { _eBlk = EBLKNET; } break;
  868. case 16:
  869. #line 102 "parser.y"
  870. { _eBlk = EBLKNONE; } break;
  871. case 19:
  872. #line 109 "parser.y"
  873. { SetFormat(yypvt[-0].zsr); } break;
  874. case 20:
  875. #line 110 "parser.y"
  876. { SetVersion(yypvt[-0].real); } break;
  877. case 21:
  878. #line 111 "parser.y"
  879. { SetCreator(yypvt[-0].zsr); } break;
  880. case 29:
  881. #line 128 "parser.y"
  882. { yyval.zsr = yypvt[-1].zsr; } break;
  883. case 30:
  884. #line 131 "parser.y"
  885. { yyval.real = yypvt[-1].real; } break;
  886. case 31:
  887. #line 134 "parser.y"
  888. { yyval.zsr = yypvt[-1].zsr; } break;
  889. case 32:
  890. #line 138 "parser.y"
  891. { _eBlk = EBLKIGN; WarningSkip(yypvt[-1].zsr); } break;
  892. case 33:
  893. #line 140 "parser.y"
  894. { SkipUntil("}"); } break;
  895. case 34:
  896. #line 141 "parser.y"
  897. { _eBlk = EBLKNONE; } break;
  898. case 36:
  899. #line 145 "parser.y"
  900. { SkipUntil(")"); } break;
  901. case 38:
  902. #line 150 "parser.y"
  903. { _eBlk = EBLKNODE; StartNodeDecl(yypvt[-0].zsr); } break;
  904. case 39:
  905. #line 153 "parser.y"
  906. { CheckNodeInfo(); _eBlk = EBLKNONE; } break;
  907. case 47:
  908. #line 167 "parser.y"
  909. { SetNodeFullName(yypvt[-0].zsr); } break;
  910. case 49:
  911. #line 173 "parser.y"
  912. { SetNodeDomain(yypvt[-0].zsr); } break;
  913. case 50:
  914. #line 174 "parser.y"
  915. { SetNodeCstate(yypvt[-2].ui); } break;
  916. case 55:
  917. #line 182 "parser.y"
  918. { ClearCstr(); } break;
  919. case 56:
  920. #line 182 "parser.y"
  921. { SetStates(); } break;
  922. case 60:
  923. #line 190 "parser.y"
  924. { AddStr(yypvt[-0].zsr); } break;
  925. case 63:
  926. #line 196 "parser.y"
  927. { ClearCstr(); } break;
  928. case 65:
  929. #line 199 "parser.y"
  930. { SetNodePosition(yypvt[-3].integer, yypvt[-1].integer); } break;
  931. case 66:
  932. #line 203 "parser.y"
  933. { _eBlk = EBLKPROB; ClearNodeInfo(); } break;
  934. case 67:
  935. #line 205 "parser.y"
  936. { SetNodeSymb(yypvt[-0].zsr, false); } break;
  937. case 68:
  938. #line 207 "parser.y"
  939. { CheckParentList(); } break;
  940. case 69:
  941. #line 208 "parser.y"
  942. { _eBlk = EBLKNONE; } break;
  943. case 71:
  944. #line 212 "parser.y"
  945. { EmptyProbEntries(); } break;
  946. case 72:
  947. #line 215 "parser.y"
  948. { InitProbEntries(); } break;
  949. case 73:
  950. #line 217 "parser.y"
  951. { CheckProbEntries(); } break;
  952. case 78:
  953. #line 226 "parser.y"
  954. { AddSymb(yypvt[-0].zsr); } break;
  955. case 79:
  956. #line 227 "parser.y"
  957. { AddSymb(yypvt[-0].zsr); } break;
  958. case 86:
  959. #line 241 "parser.y"
  960. { CheckCIFunc(yypvt[-1].zsr); } break;
  961. case 91:
  962. #line 252 "parser.y"
  963. { _vui.clear(); CheckDPI(false); } break;
  964. case 92:
  965. #line 253 "parser.y"
  966. { CheckDPI(false); } break;
  967. case 93:
  968. #line 254 "parser.y"
  969. { CheckDPI(true); } break;
  970. case 94:
  971. #line 257 "parser.y"
  972. { _vui.clear(); } break;
  973. case 97:
  974. #line 261 "parser.y"
  975. { AddUi(yypvt[-0].ui); } break;
  976. case 98:
  977. #line 262 "parser.y"
  978. { AddUi(yypvt[-0].ui); } break;
  979. case 99:
  980. #line 265 "parser.y"
  981. { yyval.ui = UiDpi(yypvt[-0].ui); } break;
  982. case 100:
  983. #line 266 "parser.y"
  984. { yyval.ui = UiDpi(yypvt[-0].zsr); } break;
  985. case 101:
  986. #line 267 "parser.y"
  987. { yyval.ui = UiDpi(yypvt[-0].zsr); } break;
  988. case 102:
  989. #line 270 "parser.y"
  990. { _vreal.clear(); } break;
  991. case 103:
  992. #line 270 "parser.y"
  993. { CheckProbVector(); } break;
  994. case 104:
  995. #line 273 "parser.y"
  996. { CheckPDF(yypvt[-3].zsr); } break;
  997. case 109:
  998. #line 284 "parser.y"
  999. { AddReal(yypvt[-0].real); } break;
  1000. case 110:
  1001. #line 285 "parser.y"
  1002. { AddReal(yypvt[-0].real); } break;
  1003. case 111:
  1004. #line 289 "parser.y"
  1005. { yyval.integer = -INT(yypvt[-0].ui); } break;
  1006. case 112:
  1007. #line 290 "parser.y"
  1008. { yyval.integer = +INT(yypvt[-0].ui); } break;
  1009. case 113:
  1010. #line 291 "parser.y"
  1011. { yyval.integer = INT(yypvt[-0].ui); } break;
  1012. case 114:
  1013. #line 294 "parser.y"
  1014. { yyval.real = -yypvt[-0].real; } break;
  1015. case 115:
  1016. #line 295 "parser.y"
  1017. { yyval.real = yypvt[-0].real; } break;
  1018. case 117:
  1019. #line 297 "parser.y"
  1020. { yyval.real = -1; } break;
  1021. case 118:
  1022. #line 300 "parser.y"
  1023. { yyval.real = yypvt[-0].real; } break;
  1024. case 119:
  1025. #line 301 "parser.y"
  1026. { yyval.real = REAL(yypvt[-0].ui); } break;
  1027. case 126:
  1028. #line 310 "parser.y"
  1029. { CheckIdent(yypvt[-0].zsr); } break;
  1030. case 131:
  1031. #line 319 "parser.y"
  1032. { StartProperties(); } break;
  1033. case 132:
  1034. #line 321 "parser.y"
  1035. { EndProperties(); } break;
  1036. case 138:
  1037. #line 331 "parser.y"
  1038. { ImportPropStandard(); } break;
  1039. case 139:
  1040. #line 332 "parser.y"
  1041. { ImportProp(yypvt[-0].zsr); } break;
  1042. case 140:
  1043. #line 335 "parser.y"
  1044. { AddPropType(yypvt[-4].zsr, yypvt[-2].ui, yypvt[-0].zsr); } break;
  1045. case 141:
  1046. #line 336 "parser.y"
  1047. { AddPropType(yypvt[-2].zsr, yypvt[-0].ui, ZSREF()); } break;
  1048. case 142:
  1049. #line 339 "parser.y"
  1050. { yyval.ui = fPropString | fPropArray; } break;
  1051. case 143:
  1052. #line 340 "parser.y"
  1053. { yyval.ui = fPropArray; } break;
  1054. case 144:
  1055. #line 341 "parser.y"
  1056. { yyval.ui = fPropString; } break;
  1057. case 145:
  1058. #line 342 "parser.y"
  1059. { yyval.ui = 0; } break;
  1060. case 146:
  1061. #line 343 "parser.y"
  1062. { yyval.ui = fPropChoice; } break;
  1063. case 149:
  1064. #line 352 "parser.y"
  1065. { ClearVpv(); } break;
  1066. case 150:
  1067. #line 352 "parser.y"
  1068. { CheckProperty(yypvt[-3].zsr); } break;
  1069. case 152:
  1070. #line 354 "parser.y"
  1071. { ClearVpv(); } break;
  1072. case 153:
  1073. #line 354 "parser.y"
  1074. { CheckProperty(yypvt[-3].zsr); } break;
  1075. case 158:
  1076. #line 365 "parser.y"
  1077. { AddPropVar( yypvt[-0].zsr ); } break;
  1078. case 159:
  1079. #line 366 "parser.y"
  1080. { AddPropVar( yypvt[-0].zsr ); } break;
  1081. case 160:
  1082. #line 367 "parser.y"
  1083. { AddPropVar( yypvt[-0].real ); } break;
  1084. case 161:
  1085. #line 371 "parser.y"
  1086. { ClearDomain(); } break;
  1087. case 162:
  1088. #line 373 "parser.y"
  1089. { CheckDomain( yypvt[-1].zsr ); } break;
  1090. case 167:
  1091. #line 385 "parser.y"
  1092. { AddRange(yypvt[-0].zsr, false ); } break;
  1093. case 168:
  1094. #line 386 "parser.y"
  1095. { AddRange(yypvt[-0].zsr, true ); } break;
  1096. case 169:
  1097. #line 393 "parser.y"
  1098. { SetRanges( true, yypvt[-2].real, true, yypvt[-0].real ); } break;
  1099. case 170:
  1100. #line 395 "parser.y"
  1101. { SetRanges( yypvt[-2].zsr, yypvt[-0].zsr ); } break;
  1102. case 171:
  1103. #line 397 "parser.y"
  1104. { SetRanges( false, 0.0, true, yypvt[-0].real ); } break;
  1105. case 172:
  1106. #line 399 "parser.y"
  1107. { SetRanges( ZSREF(), yypvt[-0].zsr ); } break;
  1108. case 173:
  1109. #line 401 "parser.y"
  1110. { SetRanges( true, yypvt[-1].real, false, 0.0 ); } break;
  1111. case 174:
  1112. #line 403 "parser.y"
  1113. { SetRanges( yypvt[-1].zsr, ZSREF() ); } break;
  1114. case 175:
  1115. #line 405 "parser.y"
  1116. { SetRanges( true, yypvt[-0].real, true, yypvt[-0].real ); } break;
  1117. case 176:
  1118. #line 407 "parser.y"
  1119. { SetRanges( yypvt[-0].zsr, yypvt[-0].zsr ); } break;/* End of actions */
  1120. }
  1121. }
  1122. goto yystack; /* stack new state and value */
  1123. }
  1124. #ifdef YYDUMP
  1125. YYLOCAL
  1126. void YYNEAR YYPASCAL yydumpinfo(void)
  1127. {
  1128. short stackindex;
  1129. short valindex;
  1130. //dump yys
  1131. printf("short yys[%d] {\n", YYMAXDEPTH);
  1132. for (stackindex = 0; stackindex < YYMAXDEPTH; stackindex++){
  1133. if (stackindex)
  1134. printf(", %s", stackindex % 10 ? "\0" : "\n");
  1135. printf("%6d", yys[stackindex]);
  1136. }
  1137. printf("\n};\n");
  1138. //dump yyv
  1139. printf("YYSTYPE yyv[%d] {\n", YYMAXDEPTH);
  1140. for (valindex = 0; valindex < YYMAXDEPTH; valindex++){
  1141. if (valindex)
  1142. printf(", %s", valindex % 5 ? "\0" : "\n");
  1143. printf("%#*x", 3+sizeof(YYSTYPE), yyv[valindex]);
  1144. }
  1145. printf("\n};\n");
  1146. }
  1147. #endif