1. /* Generated By:JJTree&JavaCC: Do not edit this line. Parser.java */
  2. package org.apache.commons.jexl.parser;
  3. import java.io.Reader;
  4. public class Parser/*@bgen(jjtree)*/implements ParserTreeConstants, ParserConstants {/*@bgen(jjtree)*/
  5. protected JJTParserState jjtree = new JJTParserState();public SimpleNode parse(Reader reader)
  6. throws Exception
  7. {
  8. ReInit(reader);
  9. /*
  10. * lets do the 'Unique Init' in here to be
  11. * safe - it's a pain to remember
  12. */
  13. SimpleNode tree = JexlScript();
  14. return tree;
  15. }
  16. /*
  17. * Program structuring syntax follows.
  18. */
  19. final public SimpleNode JexlScript() throws ParseException {
  20. /*@bgen(jjtree) JexlScript */
  21. ASTJexlScript jjtn000 = new ASTJexlScript(this, JJTJEXLSCRIPT);
  22. boolean jjtc000 = true;
  23. jjtree.openNodeScope(jjtn000);String name;
  24. try {
  25. label_1:
  26. while (true) {
  27. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  28. case INTEGER_LITERAL:
  29. case FLOAT_LITERAL:
  30. case 9:
  31. case 11:
  32. case 12:
  33. case 14:
  34. case 36:
  35. case 42:
  36. case 43:
  37. case 44:
  38. case 45:
  39. case 46:
  40. case 47:
  41. case 48:
  42. case 49:
  43. case 51:
  44. case 52:
  45. case IDENTIFIER:
  46. case STRING_LITERAL:
  47. ;
  48. break;
  49. default:
  50. jj_la1[0] = jj_gen;
  51. break label_1;
  52. }
  53. Statement();
  54. }
  55. jj_consume_token(0);
  56. jjtree.closeNodeScope(jjtn000, true);
  57. jjtc000 = false;
  58. {if (true) return jjtn000;}
  59. } catch (Throwable jjte000) {
  60. if (jjtc000) {
  61. jjtree.clearNodeScope(jjtn000);
  62. jjtc000 = false;
  63. } else {
  64. jjtree.popNode();
  65. }
  66. if (jjte000 instanceof RuntimeException) {
  67. {if (true) throw (RuntimeException)jjte000;}
  68. }
  69. if (jjte000 instanceof ParseException) {
  70. {if (true) throw (ParseException)jjte000;}
  71. }
  72. {if (true) throw (Error)jjte000;}
  73. } finally {
  74. if (jjtc000) {
  75. jjtree.closeNodeScope(jjtn000, true);
  76. }
  77. }
  78. throw new Error("Missing return statement in function");
  79. }
  80. final public void Block() throws ParseException {
  81. /*@bgen(jjtree) Block */
  82. ASTBlock jjtn000 = new ASTBlock(this, JJTBLOCK);
  83. boolean jjtc000 = true;
  84. jjtree.openNodeScope(jjtn000);
  85. try {
  86. jj_consume_token(9);
  87. label_2:
  88. while (true) {
  89. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  90. case INTEGER_LITERAL:
  91. case FLOAT_LITERAL:
  92. case 9:
  93. case 11:
  94. case 12:
  95. case 14:
  96. case 36:
  97. case 42:
  98. case 43:
  99. case 44:
  100. case 45:
  101. case 46:
  102. case 47:
  103. case 48:
  104. case 49:
  105. case 51:
  106. case 52:
  107. case IDENTIFIER:
  108. case STRING_LITERAL:
  109. ;
  110. break;
  111. default:
  112. jj_la1[1] = jj_gen;
  113. break label_2;
  114. }
  115. Statement();
  116. }
  117. jj_consume_token(10);
  118. } catch (Throwable jjte000) {
  119. if (jjtc000) {
  120. jjtree.clearNodeScope(jjtn000);
  121. jjtc000 = false;
  122. } else {
  123. jjtree.popNode();
  124. }
  125. if (jjte000 instanceof RuntimeException) {
  126. {if (true) throw (RuntimeException)jjte000;}
  127. }
  128. if (jjte000 instanceof ParseException) {
  129. {if (true) throw (ParseException)jjte000;}
  130. }
  131. {if (true) throw (Error)jjte000;}
  132. } finally {
  133. if (jjtc000) {
  134. jjtree.closeNodeScope(jjtn000, true);
  135. }
  136. }
  137. }
  138. final public void EmptyFunction() throws ParseException {
  139. /*@bgen(jjtree) EmptyFunction */
  140. ASTEmptyFunction jjtn000 = new ASTEmptyFunction(this, JJTEMPTYFUNCTION);
  141. boolean jjtc000 = true;
  142. jjtree.openNodeScope(jjtn000);
  143. try {
  144. jj_consume_token(11);
  145. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  146. case IDENTIFIER:
  147. Reference();
  148. break;
  149. case 12:
  150. jj_consume_token(12);
  151. Reference();
  152. jj_consume_token(13);
  153. break;
  154. default:
  155. jj_la1[2] = jj_gen;
  156. jj_consume_token(-1);
  157. throw new ParseException();
  158. }
  159. } catch (Throwable jjte000) {
  160. if (jjtc000) {
  161. jjtree.clearNodeScope(jjtn000);
  162. jjtc000 = false;
  163. } else {
  164. jjtree.popNode();
  165. }
  166. if (jjte000 instanceof RuntimeException) {
  167. {if (true) throw (RuntimeException)jjte000;}
  168. }
  169. if (jjte000 instanceof ParseException) {
  170. {if (true) throw (ParseException)jjte000;}
  171. }
  172. {if (true) throw (Error)jjte000;}
  173. } finally {
  174. if (jjtc000) {
  175. jjtree.closeNodeScope(jjtn000, true);
  176. }
  177. }
  178. }
  179. final public void SizeFunction() throws ParseException {
  180. /*@bgen(jjtree) SizeFunction */
  181. ASTSizeFunction jjtn000 = new ASTSizeFunction(this, JJTSIZEFUNCTION);
  182. boolean jjtc000 = true;
  183. jjtree.openNodeScope(jjtn000);
  184. try {
  185. jj_consume_token(14);
  186. jj_consume_token(12);
  187. Reference();
  188. jj_consume_token(13);
  189. } catch (Throwable jjte000) {
  190. if (jjtc000) {
  191. jjtree.clearNodeScope(jjtn000);
  192. jjtc000 = false;
  193. } else {
  194. jjtree.popNode();
  195. }
  196. if (jjte000 instanceof RuntimeException) {
  197. {if (true) throw (RuntimeException)jjte000;}
  198. }
  199. if (jjte000 instanceof ParseException) {
  200. {if (true) throw (ParseException)jjte000;}
  201. }
  202. {if (true) throw (Error)jjte000;}
  203. } finally {
  204. if (jjtc000) {
  205. jjtree.closeNodeScope(jjtn000, true);
  206. }
  207. }
  208. }
  209. final public void Identifier() throws ParseException {
  210. /*@bgen(jjtree) Identifier */
  211. ASTIdentifier jjtn000 = new ASTIdentifier(this, JJTIDENTIFIER);
  212. boolean jjtc000 = true;
  213. jjtree.openNodeScope(jjtn000);Token t;
  214. try {
  215. t = jj_consume_token(IDENTIFIER);
  216. jjtree.closeNodeScope(jjtn000, true);
  217. jjtc000 = false;
  218. jjtn000.val = t.image;
  219. } finally {
  220. if (jjtc000) {
  221. jjtree.closeNodeScope(jjtn000, true);
  222. }
  223. }
  224. }
  225. /*
  226. * Expression syntax follows.
  227. */
  228. final public void Expression() throws ParseException {
  229. /*@bgen(jjtree) Expression */
  230. ASTExpression jjtn000 = new ASTExpression(this, JJTEXPRESSION);
  231. boolean jjtc000 = true;
  232. jjtree.openNodeScope(jjtn000);
  233. try {
  234. if (jj_2_1(2147483647)) {
  235. Assignment();
  236. } else {
  237. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  238. case INTEGER_LITERAL:
  239. case FLOAT_LITERAL:
  240. case 11:
  241. case 12:
  242. case 14:
  243. case 36:
  244. case 42:
  245. case 43:
  246. case 44:
  247. case 45:
  248. case 46:
  249. case 47:
  250. case IDENTIFIER:
  251. case STRING_LITERAL:
  252. ConditionalOrExpression();
  253. break;
  254. default:
  255. jj_la1[3] = jj_gen;
  256. jj_consume_token(-1);
  257. throw new ParseException();
  258. }
  259. }
  260. } catch (Throwable jjte000) {
  261. if (jjtc000) {
  262. jjtree.clearNodeScope(jjtn000);
  263. jjtc000 = false;
  264. } else {
  265. jjtree.popNode();
  266. }
  267. if (jjte000 instanceof RuntimeException) {
  268. {if (true) throw (RuntimeException)jjte000;}
  269. }
  270. if (jjte000 instanceof ParseException) {
  271. {if (true) throw (ParseException)jjte000;}
  272. }
  273. {if (true) throw (Error)jjte000;}
  274. } finally {
  275. if (jjtc000) {
  276. jjtree.closeNodeScope(jjtn000, true);
  277. }
  278. }
  279. }
  280. final public void Assignment() throws ParseException {
  281. /*@bgen(jjtree) #Assignment( 2) */
  282. ASTAssignment jjtn000 = new ASTAssignment(this, JJTASSIGNMENT);
  283. boolean jjtc000 = true;
  284. jjtree.openNodeScope(jjtn000);
  285. try {
  286. PrimaryExpression();
  287. jj_consume_token(15);
  288. Expression();
  289. } catch (Throwable jjte000) {
  290. if (jjtc000) {
  291. jjtree.clearNodeScope(jjtn000);
  292. jjtc000 = false;
  293. } else {
  294. jjtree.popNode();
  295. }
  296. if (jjte000 instanceof RuntimeException) {
  297. {if (true) throw (RuntimeException)jjte000;}
  298. }
  299. if (jjte000 instanceof ParseException) {
  300. {if (true) throw (ParseException)jjte000;}
  301. }
  302. {if (true) throw (Error)jjte000;}
  303. } finally {
  304. if (jjtc000) {
  305. jjtree.closeNodeScope(jjtn000, 2);
  306. }
  307. }
  308. }
  309. final public void ConditionalOrExpression() throws ParseException {
  310. ConditionalAndExpression();
  311. label_3:
  312. while (true) {
  313. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  314. case 16:
  315. case 17:
  316. ;
  317. break;
  318. default:
  319. jj_la1[4] = jj_gen;
  320. break label_3;
  321. }
  322. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  323. case 16:
  324. jj_consume_token(16);
  325. ASTOrNode jjtn001 = new ASTOrNode(this, JJTORNODE);
  326. boolean jjtc001 = true;
  327. jjtree.openNodeScope(jjtn001);
  328. try {
  329. ConditionalAndExpression();
  330. } catch (Throwable jjte001) {
  331. if (jjtc001) {
  332. jjtree.clearNodeScope(jjtn001);
  333. jjtc001 = false;
  334. } else {
  335. jjtree.popNode();
  336. }
  337. if (jjte001 instanceof RuntimeException) {
  338. {if (true) throw (RuntimeException)jjte001;}
  339. }
  340. if (jjte001 instanceof ParseException) {
  341. {if (true) throw (ParseException)jjte001;}
  342. }
  343. {if (true) throw (Error)jjte001;}
  344. } finally {
  345. if (jjtc001) {
  346. jjtree.closeNodeScope(jjtn001, 2);
  347. }
  348. }
  349. break;
  350. case 17:
  351. jj_consume_token(17);
  352. ASTOrNode jjtn002 = new ASTOrNode(this, JJTORNODE);
  353. boolean jjtc002 = true;
  354. jjtree.openNodeScope(jjtn002);
  355. try {
  356. ConditionalAndExpression();
  357. } catch (Throwable jjte002) {
  358. if (jjtc002) {
  359. jjtree.clearNodeScope(jjtn002);
  360. jjtc002 = false;
  361. } else {
  362. jjtree.popNode();
  363. }
  364. if (jjte002 instanceof RuntimeException) {
  365. {if (true) throw (RuntimeException)jjte002;}
  366. }
  367. if (jjte002 instanceof ParseException) {
  368. {if (true) throw (ParseException)jjte002;}
  369. }
  370. {if (true) throw (Error)jjte002;}
  371. } finally {
  372. if (jjtc002) {
  373. jjtree.closeNodeScope(jjtn002, 2);
  374. }
  375. }
  376. break;
  377. default:
  378. jj_la1[5] = jj_gen;
  379. jj_consume_token(-1);
  380. throw new ParseException();
  381. }
  382. }
  383. }
  384. final public void ConditionalAndExpression() throws ParseException {
  385. InclusiveOrExpression();
  386. label_4:
  387. while (true) {
  388. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  389. case 18:
  390. case 19:
  391. ;
  392. break;
  393. default:
  394. jj_la1[6] = jj_gen;
  395. break label_4;
  396. }
  397. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  398. case 18:
  399. jj_consume_token(18);
  400. ASTAndNode jjtn001 = new ASTAndNode(this, JJTANDNODE);
  401. boolean jjtc001 = true;
  402. jjtree.openNodeScope(jjtn001);
  403. try {
  404. InclusiveOrExpression();
  405. } catch (Throwable jjte001) {
  406. if (jjtc001) {
  407. jjtree.clearNodeScope(jjtn001);
  408. jjtc001 = false;
  409. } else {
  410. jjtree.popNode();
  411. }
  412. if (jjte001 instanceof RuntimeException) {
  413. {if (true) throw (RuntimeException)jjte001;}
  414. }
  415. if (jjte001 instanceof ParseException) {
  416. {if (true) throw (ParseException)jjte001;}
  417. }
  418. {if (true) throw (Error)jjte001;}
  419. } finally {
  420. if (jjtc001) {
  421. jjtree.closeNodeScope(jjtn001, 2);
  422. }
  423. }
  424. break;
  425. case 19:
  426. jj_consume_token(19);
  427. ASTAndNode jjtn002 = new ASTAndNode(this, JJTANDNODE);
  428. boolean jjtc002 = true;
  429. jjtree.openNodeScope(jjtn002);
  430. try {
  431. InclusiveOrExpression();
  432. } catch (Throwable jjte002) {
  433. if (jjtc002) {
  434. jjtree.clearNodeScope(jjtn002);
  435. jjtc002 = false;
  436. } else {
  437. jjtree.popNode();
  438. }
  439. if (jjte002 instanceof RuntimeException) {
  440. {if (true) throw (RuntimeException)jjte002;}
  441. }
  442. if (jjte002 instanceof ParseException) {
  443. {if (true) throw (ParseException)jjte002;}
  444. }
  445. {if (true) throw (Error)jjte002;}
  446. } finally {
  447. if (jjtc002) {
  448. jjtree.closeNodeScope(jjtn002, 2);
  449. }
  450. }
  451. break;
  452. default:
  453. jj_la1[7] = jj_gen;
  454. jj_consume_token(-1);
  455. throw new ParseException();
  456. }
  457. }
  458. }
  459. final public void InclusiveOrExpression() throws ParseException {
  460. ExclusiveOrExpression();
  461. label_5:
  462. while (true) {
  463. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  464. case 20:
  465. ;
  466. break;
  467. default:
  468. jj_la1[8] = jj_gen;
  469. break label_5;
  470. }
  471. jj_consume_token(20);
  472. ASTBitwiseOrNode jjtn001 = new ASTBitwiseOrNode(this, JJTBITWISEORNODE);
  473. boolean jjtc001 = true;
  474. jjtree.openNodeScope(jjtn001);
  475. try {
  476. ExclusiveOrExpression();
  477. } catch (Throwable jjte001) {
  478. if (jjtc001) {
  479. jjtree.clearNodeScope(jjtn001);
  480. jjtc001 = false;
  481. } else {
  482. jjtree.popNode();
  483. }
  484. if (jjte001 instanceof RuntimeException) {
  485. {if (true) throw (RuntimeException)jjte001;}
  486. }
  487. if (jjte001 instanceof ParseException) {
  488. {if (true) throw (ParseException)jjte001;}
  489. }
  490. {if (true) throw (Error)jjte001;}
  491. } finally {
  492. if (jjtc001) {
  493. jjtree.closeNodeScope(jjtn001, 2);
  494. }
  495. }
  496. }
  497. }
  498. final public void ExclusiveOrExpression() throws ParseException {
  499. AndExpression();
  500. label_6:
  501. while (true) {
  502. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  503. case 21:
  504. ;
  505. break;
  506. default:
  507. jj_la1[9] = jj_gen;
  508. break label_6;
  509. }
  510. jj_consume_token(21);
  511. ASTBitwiseXorNode jjtn001 = new ASTBitwiseXorNode(this, JJTBITWISEXORNODE);
  512. boolean jjtc001 = true;
  513. jjtree.openNodeScope(jjtn001);
  514. try {
  515. AndExpression();
  516. } catch (Throwable jjte001) {
  517. if (jjtc001) {
  518. jjtree.clearNodeScope(jjtn001);
  519. jjtc001 = false;
  520. } else {
  521. jjtree.popNode();
  522. }
  523. if (jjte001 instanceof RuntimeException) {
  524. {if (true) throw (RuntimeException)jjte001;}
  525. }
  526. if (jjte001 instanceof ParseException) {
  527. {if (true) throw (ParseException)jjte001;}
  528. }
  529. {if (true) throw (Error)jjte001;}
  530. } finally {
  531. if (jjtc001) {
  532. jjtree.closeNodeScope(jjtn001, 2);
  533. }
  534. }
  535. }
  536. }
  537. final public void AndExpression() throws ParseException {
  538. EqualityExpression();
  539. label_7:
  540. while (true) {
  541. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  542. case 22:
  543. ;
  544. break;
  545. default:
  546. jj_la1[10] = jj_gen;
  547. break label_7;
  548. }
  549. jj_consume_token(22);
  550. ASTBitwiseAndNode jjtn001 = new ASTBitwiseAndNode(this, JJTBITWISEANDNODE);
  551. boolean jjtc001 = true;
  552. jjtree.openNodeScope(jjtn001);
  553. try {
  554. EqualityExpression();
  555. } catch (Throwable jjte001) {
  556. if (jjtc001) {
  557. jjtree.clearNodeScope(jjtn001);
  558. jjtc001 = false;
  559. } else {
  560. jjtree.popNode();
  561. }
  562. if (jjte001 instanceof RuntimeException) {
  563. {if (true) throw (RuntimeException)jjte001;}
  564. }
  565. if (jjte001 instanceof ParseException) {
  566. {if (true) throw (ParseException)jjte001;}
  567. }
  568. {if (true) throw (Error)jjte001;}
  569. } finally {
  570. if (jjtc001) {
  571. jjtree.closeNodeScope(jjtn001, 2);
  572. }
  573. }
  574. }
  575. }
  576. final public void EqualityExpression() throws ParseException {
  577. RelationalExpression();
  578. label_8:
  579. while (true) {
  580. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  581. case 23:
  582. case 24:
  583. case 25:
  584. case 26:
  585. ;
  586. break;
  587. default:
  588. jj_la1[11] = jj_gen;
  589. break label_8;
  590. }
  591. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  592. case 23:
  593. jj_consume_token(23);
  594. ASTEQNode jjtn001 = new ASTEQNode(this, JJTEQNODE);
  595. boolean jjtc001 = true;
  596. jjtree.openNodeScope(jjtn001);
  597. try {
  598. RelationalExpression();
  599. } catch (Throwable jjte001) {
  600. if (jjtc001) {
  601. jjtree.clearNodeScope(jjtn001);
  602. jjtc001 = false;
  603. } else {
  604. jjtree.popNode();
  605. }
  606. if (jjte001 instanceof RuntimeException) {
  607. {if (true) throw (RuntimeException)jjte001;}
  608. }
  609. if (jjte001 instanceof ParseException) {
  610. {if (true) throw (ParseException)jjte001;}
  611. }
  612. {if (true) throw (Error)jjte001;}
  613. } finally {
  614. if (jjtc001) {
  615. jjtree.closeNodeScope(jjtn001, 2);
  616. }
  617. }
  618. break;
  619. case 24:
  620. jj_consume_token(24);
  621. ASTEQNode jjtn002 = new ASTEQNode(this, JJTEQNODE);
  622. boolean jjtc002 = true;
  623. jjtree.openNodeScope(jjtn002);
  624. try {
  625. RelationalExpression();
  626. } catch (Throwable jjte002) {
  627. if (jjtc002) {
  628. jjtree.clearNodeScope(jjtn002);
  629. jjtc002 = false;
  630. } else {
  631. jjtree.popNode();
  632. }
  633. if (jjte002 instanceof RuntimeException) {
  634. {if (true) throw (RuntimeException)jjte002;}
  635. }
  636. if (jjte002 instanceof ParseException) {
  637. {if (true) throw (ParseException)jjte002;}
  638. }
  639. {if (true) throw (Error)jjte002;}
  640. } finally {
  641. if (jjtc002) {
  642. jjtree.closeNodeScope(jjtn002, 2);
  643. }
  644. }
  645. break;
  646. case 25:
  647. jj_consume_token(25);
  648. ASTNENode jjtn003 = new ASTNENode(this, JJTNENODE);
  649. boolean jjtc003 = true;
  650. jjtree.openNodeScope(jjtn003);
  651. try {
  652. RelationalExpression();
  653. } catch (Throwable jjte003) {
  654. if (jjtc003) {
  655. jjtree.clearNodeScope(jjtn003);
  656. jjtc003 = false;
  657. } else {
  658. jjtree.popNode();
  659. }
  660. if (jjte003 instanceof RuntimeException) {
  661. {if (true) throw (RuntimeException)jjte003;}
  662. }
  663. if (jjte003 instanceof ParseException) {
  664. {if (true) throw (ParseException)jjte003;}
  665. }
  666. {if (true) throw (Error)jjte003;}
  667. } finally {
  668. if (jjtc003) {
  669. jjtree.closeNodeScope(jjtn003, 2);
  670. }
  671. }
  672. break;
  673. case 26:
  674. jj_consume_token(26);
  675. ASTNENode jjtn004 = new ASTNENode(this, JJTNENODE);
  676. boolean jjtc004 = true;
  677. jjtree.openNodeScope(jjtn004);
  678. try {
  679. RelationalExpression();
  680. } catch (Throwable jjte004) {
  681. if (jjtc004) {
  682. jjtree.clearNodeScope(jjtn004);
  683. jjtc004 = false;
  684. } else {
  685. jjtree.popNode();
  686. }
  687. if (jjte004 instanceof RuntimeException) {
  688. {if (true) throw (RuntimeException)jjte004;}
  689. }
  690. if (jjte004 instanceof ParseException) {
  691. {if (true) throw (ParseException)jjte004;}
  692. }
  693. {if (true) throw (Error)jjte004;}
  694. } finally {
  695. if (jjtc004) {
  696. jjtree.closeNodeScope(jjtn004, 2);
  697. }
  698. }
  699. break;
  700. default:
  701. jj_la1[12] = jj_gen;
  702. jj_consume_token(-1);
  703. throw new ParseException();
  704. }
  705. }
  706. }
  707. final public void RelationalExpression() throws ParseException {
  708. AdditiveExpression();
  709. label_9:
  710. while (true) {
  711. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  712. case 27:
  713. case 28:
  714. case 29:
  715. case 30:
  716. case 31:
  717. case 32:
  718. case 33:
  719. case 34:
  720. ;
  721. break;
  722. default:
  723. jj_la1[13] = jj_gen;
  724. break label_9;
  725. }
  726. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  727. case 27:
  728. jj_consume_token(27);
  729. ASTLTNode jjtn001 = new ASTLTNode(this, JJTLTNODE);
  730. boolean jjtc001 = true;
  731. jjtree.openNodeScope(jjtn001);
  732. try {
  733. AdditiveExpression();
  734. } catch (Throwable jjte001) {
  735. if (jjtc001) {
  736. jjtree.clearNodeScope(jjtn001);
  737. jjtc001 = false;
  738. } else {
  739. jjtree.popNode();
  740. }
  741. if (jjte001 instanceof RuntimeException) {
  742. {if (true) throw (RuntimeException)jjte001;}
  743. }
  744. if (jjte001 instanceof ParseException) {
  745. {if (true) throw (ParseException)jjte001;}
  746. }
  747. {if (true) throw (Error)jjte001;}
  748. } finally {
  749. if (jjtc001) {
  750. jjtree.closeNodeScope(jjtn001, 2);
  751. }
  752. }
  753. break;
  754. case 28:
  755. jj_consume_token(28);
  756. ASTLTNode jjtn002 = new ASTLTNode(this, JJTLTNODE);
  757. boolean jjtc002 = true;
  758. jjtree.openNodeScope(jjtn002);
  759. try {
  760. AdditiveExpression();
  761. } catch (Throwable jjte002) {
  762. if (jjtc002) {
  763. jjtree.clearNodeScope(jjtn002);
  764. jjtc002 = false;
  765. } else {
  766. jjtree.popNode();
  767. }
  768. if (jjte002 instanceof RuntimeException) {
  769. {if (true) throw (RuntimeException)jjte002;}
  770. }
  771. if (jjte002 instanceof ParseException) {
  772. {if (true) throw (ParseException)jjte002;}
  773. }
  774. {if (true) throw (Error)jjte002;}
  775. } finally {
  776. if (jjtc002) {
  777. jjtree.closeNodeScope(jjtn002, 2);
  778. }
  779. }
  780. break;
  781. case 29:
  782. jj_consume_token(29);
  783. ASTGTNode jjtn003 = new ASTGTNode(this, JJTGTNODE);
  784. boolean jjtc003 = true;
  785. jjtree.openNodeScope(jjtn003);
  786. try {
  787. AdditiveExpression();
  788. } catch (Throwable jjte003) {
  789. if (jjtc003) {
  790. jjtree.clearNodeScope(jjtn003);
  791. jjtc003 = false;
  792. } else {
  793. jjtree.popNode();
  794. }
  795. if (jjte003 instanceof RuntimeException) {
  796. {if (true) throw (RuntimeException)jjte003;}
  797. }
  798. if (jjte003 instanceof ParseException) {
  799. {if (true) throw (ParseException)jjte003;}
  800. }
  801. {if (true) throw (Error)jjte003;}
  802. } finally {
  803. if (jjtc003) {
  804. jjtree.closeNodeScope(jjtn003, 2);
  805. }
  806. }
  807. break;
  808. case 30:
  809. jj_consume_token(30);
  810. ASTGTNode jjtn004 = new ASTGTNode(this, JJTGTNODE);
  811. boolean jjtc004 = true;
  812. jjtree.openNodeScope(jjtn004);
  813. try {
  814. AdditiveExpression();
  815. } catch (Throwable jjte004) {
  816. if (jjtc004) {
  817. jjtree.clearNodeScope(jjtn004);
  818. jjtc004 = false;
  819. } else {
  820. jjtree.popNode();
  821. }
  822. if (jjte004 instanceof RuntimeException) {
  823. {if (true) throw (RuntimeException)jjte004;}
  824. }
  825. if (jjte004 instanceof ParseException) {
  826. {if (true) throw (ParseException)jjte004;}
  827. }
  828. {if (true) throw (Error)jjte004;}
  829. } finally {
  830. if (jjtc004) {
  831. jjtree.closeNodeScope(jjtn004, 2);
  832. }
  833. }
  834. break;
  835. case 31:
  836. jj_consume_token(31);
  837. ASTLENode jjtn005 = new ASTLENode(this, JJTLENODE);
  838. boolean jjtc005 = true;
  839. jjtree.openNodeScope(jjtn005);
  840. try {
  841. AdditiveExpression();
  842. } catch (Throwable jjte005) {
  843. if (jjtc005) {
  844. jjtree.clearNodeScope(jjtn005);
  845. jjtc005 = false;
  846. } else {
  847. jjtree.popNode();
  848. }
  849. if (jjte005 instanceof RuntimeException) {
  850. {if (true) throw (RuntimeException)jjte005;}
  851. }
  852. if (jjte005 instanceof ParseException) {
  853. {if (true) throw (ParseException)jjte005;}
  854. }
  855. {if (true) throw (Error)jjte005;}
  856. } finally {
  857. if (jjtc005) {
  858. jjtree.closeNodeScope(jjtn005, 2);
  859. }
  860. }
  861. break;
  862. case 32:
  863. jj_consume_token(32);
  864. ASTLENode jjtn006 = new ASTLENode(this, JJTLENODE);
  865. boolean jjtc006 = true;
  866. jjtree.openNodeScope(jjtn006);
  867. try {
  868. AdditiveExpression();
  869. } catch (Throwable jjte006) {
  870. if (jjtc006) {
  871. jjtree.clearNodeScope(jjtn006);
  872. jjtc006 = false;
  873. } else {
  874. jjtree.popNode();
  875. }
  876. if (jjte006 instanceof RuntimeException) {
  877. {if (true) throw (RuntimeException)jjte006;}
  878. }
  879. if (jjte006 instanceof ParseException) {
  880. {if (true) throw (ParseException)jjte006;}
  881. }
  882. {if (true) throw (Error)jjte006;}
  883. } finally {
  884. if (jjtc006) {
  885. jjtree.closeNodeScope(jjtn006, 2);
  886. }
  887. }
  888. break;
  889. case 33:
  890. jj_consume_token(33);
  891. ASTGENode jjtn007 = new ASTGENode(this, JJTGENODE);
  892. boolean jjtc007 = true;
  893. jjtree.openNodeScope(jjtn007);
  894. try {
  895. AdditiveExpression();
  896. } catch (Throwable jjte007) {
  897. if (jjtc007) {
  898. jjtree.clearNodeScope(jjtn007);
  899. jjtc007 = false;
  900. } else {
  901. jjtree.popNode();
  902. }
  903. if (jjte007 instanceof RuntimeException) {
  904. {if (true) throw (RuntimeException)jjte007;}
  905. }
  906. if (jjte007 instanceof ParseException) {
  907. {if (true) throw (ParseException)jjte007;}
  908. }
  909. {if (true) throw (Error)jjte007;}
  910. } finally {
  911. if (jjtc007) {
  912. jjtree.closeNodeScope(jjtn007, 2);
  913. }
  914. }
  915. break;
  916. case 34:
  917. jj_consume_token(34);
  918. ASTGENode jjtn008 = new ASTGENode(this, JJTGENODE);
  919. boolean jjtc008 = true;
  920. jjtree.openNodeScope(jjtn008);
  921. try {
  922. AdditiveExpression();
  923. } catch (Throwable jjte008) {
  924. if (jjtc008) {
  925. jjtree.clearNodeScope(jjtn008);
  926. jjtc008 = false;
  927. } else {
  928. jjtree.popNode();
  929. }
  930. if (jjte008 instanceof RuntimeException) {
  931. {if (true) throw (RuntimeException)jjte008;}
  932. }
  933. if (jjte008 instanceof ParseException) {
  934. {if (true) throw (ParseException)jjte008;}
  935. }
  936. {if (true) throw (Error)jjte008;}
  937. } finally {
  938. if (jjtc008) {
  939. jjtree.closeNodeScope(jjtn008, 2);
  940. }
  941. }
  942. break;
  943. default:
  944. jj_la1[14] = jj_gen;
  945. jj_consume_token(-1);
  946. throw new ParseException();
  947. }
  948. }
  949. }
  950. final public void AdditiveExpression() throws ParseException {
  951. MultiplicativeExpression();
  952. label_10:
  953. while (true) {
  954. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  955. case 35:
  956. case 36:
  957. ;
  958. break;
  959. default:
  960. jj_la1[15] = jj_gen;
  961. break label_10;
  962. }
  963. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  964. case 35:
  965. jj_consume_token(35);
  966. ASTAddNode jjtn001 = new ASTAddNode(this, JJTADDNODE);
  967. boolean jjtc001 = true;
  968. jjtree.openNodeScope(jjtn001);
  969. try {
  970. MultiplicativeExpression();
  971. } catch (Throwable jjte001) {
  972. if (jjtc001) {
  973. jjtree.clearNodeScope(jjtn001);
  974. jjtc001 = false;
  975. } else {
  976. jjtree.popNode();
  977. }
  978. if (jjte001 instanceof RuntimeException) {
  979. {if (true) throw (RuntimeException)jjte001;}
  980. }
  981. if (jjte001 instanceof ParseException) {
  982. {if (true) throw (ParseException)jjte001;}
  983. }
  984. {if (true) throw (Error)jjte001;}
  985. } finally {
  986. if (jjtc001) {
  987. jjtree.closeNodeScope(jjtn001, 2);
  988. }
  989. }
  990. break;
  991. case 36:
  992. jj_consume_token(36);
  993. ASTSubtractNode jjtn002 = new ASTSubtractNode(this, JJTSUBTRACTNODE);
  994. boolean jjtc002 = true;
  995. jjtree.openNodeScope(jjtn002);
  996. try {
  997. MultiplicativeExpression();
  998. } catch (Throwable jjte002) {
  999. if (jjtc002) {
  1000. jjtree.clearNodeScope(jjtn002);
  1001. jjtc002 = false;
  1002. } else {
  1003. jjtree.popNode();
  1004. }
  1005. if (jjte002 instanceof RuntimeException) {
  1006. {if (true) throw (RuntimeException)jjte002;}
  1007. }
  1008. if (jjte002 instanceof ParseException) {
  1009. {if (true) throw (ParseException)jjte002;}
  1010. }
  1011. {if (true) throw (Error)jjte002;}
  1012. } finally {
  1013. if (jjtc002) {
  1014. jjtree.closeNodeScope(jjtn002, 2);
  1015. }
  1016. }
  1017. break;
  1018. default:
  1019. jj_la1[16] = jj_gen;
  1020. jj_consume_token(-1);
  1021. throw new ParseException();
  1022. }
  1023. }
  1024. }
  1025. final public void MultiplicativeExpression() throws ParseException {
  1026. UnaryExpression();
  1027. label_11:
  1028. while (true) {
  1029. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  1030. case 37:
  1031. case 38:
  1032. case 39:
  1033. case 40:
  1034. case 41:
  1035. ;
  1036. break;
  1037. default:
  1038. jj_la1[17] = jj_gen;
  1039. break label_11;
  1040. }
  1041. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  1042. case 37:
  1043. jj_consume_token(37);
  1044. ASTMulNode jjtn001 = new ASTMulNode(this, JJTMULNODE);
  1045. boolean jjtc001 = true;
  1046. jjtree.openNodeScope(jjtn001);
  1047. try {
  1048. UnaryExpression();
  1049. } catch (Throwable jjte001) {
  1050. if (jjtc001) {
  1051. jjtree.clearNodeScope(jjtn001);
  1052. jjtc001 = false;
  1053. } else {
  1054. jjtree.popNode();
  1055. }
  1056. if (jjte001 instanceof RuntimeException) {
  1057. {if (true) throw (RuntimeException)jjte001;}
  1058. }
  1059. if (jjte001 instanceof ParseException) {
  1060. {if (true) throw (ParseException)jjte001;}
  1061. }
  1062. {if (true) throw (Error)jjte001;}
  1063. } finally {
  1064. if (jjtc001) {
  1065. jjtree.closeNodeScope(jjtn001, 2);
  1066. }
  1067. }
  1068. break;
  1069. case 38:
  1070. jj_consume_token(38);
  1071. ASTDivNode jjtn002 = new ASTDivNode(this, JJTDIVNODE);
  1072. boolean jjtc002 = true;
  1073. jjtree.openNodeScope(jjtn002);
  1074. try {
  1075. UnaryExpression();
  1076. } catch (Throwable jjte002) {
  1077. if (jjtc002) {
  1078. jjtree.clearNodeScope(jjtn002);
  1079. jjtc002 = false;
  1080. } else {
  1081. jjtree.popNode();
  1082. }
  1083. if (jjte002 instanceof RuntimeException) {
  1084. {if (true) throw (RuntimeException)jjte002;}
  1085. }
  1086. if (jjte002 instanceof ParseException) {
  1087. {if (true) throw (ParseException)jjte002;}
  1088. }
  1089. {if (true) throw (Error)jjte002;}
  1090. } finally {
  1091. if (jjtc002) {
  1092. jjtree.closeNodeScope(jjtn002, 2);
  1093. }
  1094. }
  1095. break;
  1096. case 39:
  1097. jj_consume_token(39);
  1098. ASTDivNode jjtn003 = new ASTDivNode(this, JJTDIVNODE);
  1099. boolean jjtc003 = true;
  1100. jjtree.openNodeScope(jjtn003);
  1101. try {
  1102. UnaryExpression();
  1103. } catch (Throwable jjte003) {
  1104. if (jjtc003) {
  1105. jjtree.clearNodeScope(jjtn003);
  1106. jjtc003 = false;
  1107. } else {
  1108. jjtree.popNode();
  1109. }
  1110. if (jjte003 instanceof RuntimeException) {
  1111. {if (true) throw (RuntimeException)jjte003;}
  1112. }
  1113. if (jjte003 instanceof ParseException) {
  1114. {if (true) throw (ParseException)jjte003;}
  1115. }
  1116. {if (true) throw (Error)jjte003;}
  1117. } finally {
  1118. if (jjtc003) {
  1119. jjtree.closeNodeScope(jjtn003, 2);
  1120. }
  1121. }
  1122. break;
  1123. case 40:
  1124. jj_consume_token(40);
  1125. ASTModNode jjtn004 = new ASTModNode(this, JJTMODNODE);
  1126. boolean jjtc004 = true;
  1127. jjtree.openNodeScope(jjtn004);
  1128. try {
  1129. UnaryExpression();
  1130. } catch (Throwable jjte004) {
  1131. if (jjtc004) {
  1132. jjtree.clearNodeScope(jjtn004);
  1133. jjtc004 = false;
  1134. } else {
  1135. jjtree.popNode();
  1136. }
  1137. if (jjte004 instanceof RuntimeException) {
  1138. {if (true) throw (RuntimeException)jjte004;}
  1139. }
  1140. if (jjte004 instanceof ParseException) {
  1141. {if (true) throw (ParseException)jjte004;}
  1142. }
  1143. {if (true) throw (Error)jjte004;}
  1144. } finally {
  1145. if (jjtc004) {
  1146. jjtree.closeNodeScope(jjtn004, 2);
  1147. }
  1148. }
  1149. break;
  1150. case 41:
  1151. jj_consume_token(41);
  1152. ASTModNode jjtn005 = new ASTModNode(this, JJTMODNODE);
  1153. boolean jjtc005 = true;
  1154. jjtree.openNodeScope(jjtn005);
  1155. try {
  1156. UnaryExpression();
  1157. } catch (Throwable jjte005) {
  1158. if (jjtc005) {
  1159. jjtree.clearNodeScope(jjtn005);
  1160. jjtc005 = false;
  1161. } else {
  1162. jjtree.popNode();
  1163. }
  1164. if (jjte005 instanceof RuntimeException) {
  1165. {if (true) throw (RuntimeException)jjte005;}
  1166. }
  1167. if (jjte005 instanceof ParseException) {
  1168. {if (true) throw (ParseException)jjte005;}
  1169. }
  1170. {if (true) throw (Error)jjte005;}
  1171. } finally {
  1172. if (jjtc005) {
  1173. jjtree.closeNodeScope(jjtn005, 2);
  1174. }
  1175. }
  1176. break;
  1177. default:
  1178. jj_la1[18] = jj_gen;
  1179. jj_consume_token(-1);
  1180. throw new ParseException();
  1181. }
  1182. }
  1183. }
  1184. final public void UnaryExpression() throws ParseException {
  1185. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  1186. case 36:
  1187. jj_consume_token(36);
  1188. ASTUnaryMinusNode jjtn001 = new ASTUnaryMinusNode(this, JJTUNARYMINUSNODE);
  1189. boolean jjtc001 = true;
  1190. jjtree.openNodeScope(jjtn001);
  1191. try {
  1192. UnaryExpression();
  1193. } catch (Throwable jjte001) {
  1194. if (jjtc001) {
  1195. jjtree.clearNodeScope(jjtn001);
  1196. jjtc001 = false;
  1197. } else {
  1198. jjtree.popNode();
  1199. }
  1200. if (jjte001 instanceof RuntimeException) {
  1201. {if (true) throw (RuntimeException)jjte001;}
  1202. }
  1203. if (jjte001 instanceof ParseException) {
  1204. {if (true) throw (ParseException)jjte001;}
  1205. }
  1206. {if (true) throw (Error)jjte001;}
  1207. } finally {
  1208. if (jjtc001) {
  1209. jjtree.closeNodeScope(jjtn001, 1);
  1210. }
  1211. }
  1212. break;
  1213. case 42:
  1214. jj_consume_token(42);
  1215. ASTBitwiseComplNode jjtn002 = new ASTBitwiseComplNode(this, JJTBITWISECOMPLNODE);
  1216. boolean jjtc002 = true;
  1217. jjtree.openNodeScope(jjtn002);
  1218. try {
  1219. UnaryExpression();
  1220. } catch (Throwable jjte002) {
  1221. if (jjtc002) {
  1222. jjtree.clearNodeScope(jjtn002);
  1223. jjtc002 = false;
  1224. } else {
  1225. jjtree.popNode();
  1226. }
  1227. if (jjte002 instanceof RuntimeException) {
  1228. {if (true) throw (RuntimeException)jjte002;}
  1229. }
  1230. if (jjte002 instanceof ParseException) {
  1231. {if (true) throw (ParseException)jjte002;}
  1232. }
  1233. {if (true) throw (Error)jjte002;}
  1234. } finally {
  1235. if (jjtc002) {
  1236. jjtree.closeNodeScope(jjtn002, 1);
  1237. }
  1238. }
  1239. break;
  1240. case 43:
  1241. jj_consume_token(43);
  1242. ASTNotNode jjtn003 = new ASTNotNode(this, JJTNOTNODE);
  1243. boolean jjtc003 = true;
  1244. jjtree.openNodeScope(jjtn003);
  1245. try {
  1246. UnaryExpression();
  1247. } catch (Throwable jjte003) {
  1248. if (jjtc003) {
  1249. jjtree.clearNodeScope(jjtn003);
  1250. jjtc003 = false;
  1251. } else {
  1252. jjtree.popNode();
  1253. }
  1254. if (jjte003 instanceof RuntimeException) {
  1255. {if (true) throw (RuntimeException)jjte003;}
  1256. }
  1257. if (jjte003 instanceof ParseException) {
  1258. {if (true) throw (ParseException)jjte003;}
  1259. }
  1260. {if (true) throw (Error)jjte003;}
  1261. } finally {
  1262. if (jjtc003) {
  1263. jjtree.closeNodeScope(jjtn003, 1);
  1264. }
  1265. }
  1266. break;
  1267. case 44:
  1268. jj_consume_token(44);
  1269. ASTNotNode jjtn004 = new ASTNotNode(this, JJTNOTNODE);
  1270. boolean jjtc004 = true;
  1271. jjtree.openNodeScope(jjtn004);
  1272. try {
  1273. UnaryExpression();
  1274. } catch (Throwable jjte004) {
  1275. if (jjtc004) {
  1276. jjtree.clearNodeScope(jjtn004);
  1277. jjtc004 = false;
  1278. } else {
  1279. jjtree.popNode();
  1280. }
  1281. if (jjte004 instanceof RuntimeException) {
  1282. {if (true) throw (RuntimeException)jjte004;}
  1283. }
  1284. if (jjte004 instanceof ParseException) {
  1285. {if (true) throw (ParseException)jjte004;}
  1286. }
  1287. {if (true) throw (Error)jjte004;}
  1288. } finally {
  1289. if (jjtc004) {
  1290. jjtree.closeNodeScope(jjtn004, 1);
  1291. }
  1292. }
  1293. break;
  1294. case INTEGER_LITERAL:
  1295. case FLOAT_LITERAL:
  1296. case 11:
  1297. case 12:
  1298. case 14:
  1299. case 45:
  1300. case 46:
  1301. case 47:
  1302. case IDENTIFIER:
  1303. case STRING_LITERAL:
  1304. PrimaryExpression();
  1305. break;
  1306. default:
  1307. jj_la1[19] = jj_gen;
  1308. jj_consume_token(-1);
  1309. throw new ParseException();
  1310. }
  1311. }
  1312. final public void PrimaryExpression() throws ParseException {
  1313. switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
  1314. case INTEGER_LITERAL:
  1315. case FLOAT_LITERAL:
  1316. case 45:
  1317. case 46:
  1318. case 47:
  1319. case STRING_LITERAL:
  1320. Literal();
  1321. break;
  1322. case IDENTIFIER:
  1323. Reference();
  1324. break;
  1325. case 12:
  1326. jj_consume_token(12);
  1327. Expression();
  1328. jj_consume_token(13);