PageRenderTime 51ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/bundles/plugins-trunk/XML/sidekick/ecmascript/parser/EcmaScript.jj

#
Unknown | 2408 lines | 2238 code | 170 blank | 0 comment | 0 complexity | 8c8fbb89355ba15c6c823822cde55b39 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0

Large files files are truncated, but you can click here to view the full file

  1. /*@bgen(jjtree) Generated By:JJTree: Do not edit this line. /home/elelay/jedit/relax-ng/sidekick/ecmascript/parser/EcmaScript.jj */
  2. /*@egen*//*
  3. Copyright (c) 2004-2005, The Dojo Foundation
  4. All Rights Reserved.
  5. Licensed under the Academic Free License version 2.1 or above OR the
  6. modified BSD license. For more information on Dojo licensing, see:
  7. http://dojotoolkit.org/community/licensing.shtml <http://dojotoolkit.org/community/licensing.shtml>
  8. Code donated to the Dojo Foundation by AOL LLC under the terms of
  9. the Dojo CCLA (http://dojotoolkit.org/ccla.txt).
  10. */
  11. /*
  12. danson, modified for jEdit, Sep 2006. What a nicely done jjt file! Kudos
  13. to the original author(s).
  14. */
  15. options {
  16. /*
  17. * Default value is true. If true, all methods and class variables
  18. * are specified as static in the generated parser and token manager. This allows only
  19. * one parser object to be present, but it improves the performance of the parser.
  20. */
  21. STATIC = false;
  22. /*
  23. * Options for obtaining debugging information
  24. */
  25. DEBUG_PARSER = false;
  26. DEBUG_TOKEN_MANAGER = false;
  27. /*
  28. * Default value is false. When set to true, the generated parser
  29. * uses an input stream object that processes Java Unicode escapes before
  30. * sending characters to the token manager.
  31. */
  32. JAVA_UNICODE_ESCAPE = true;
  33. /*
  34. * Default value is false. When set to true, the generated parser
  35. * uses uses an input stream object that reads Unicode files. By default, ASCII files
  36. * are assumed.
  37. */
  38. UNICODE_INPUT = true;
  39. /*
  40. * JDK Version
  41. */
  42. JDK_VERSION = "1.5";
  43. }
  44. PARSER_BEGIN(EcmaScript)
  45. package sidekick.ecmascript.parser;
  46. import java.io.*;
  47. import java.util.*;
  48. import java.util.regex.*;
  49. import sidekick.util.*;
  50. public class EcmaScript/*@bgen(jjtree)*/implements EcmaScriptTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
  51. protected JJTEcmaScriptState jjtree = new JJTEcmaScriptState();
  52. /*@egen*/
  53. private int lineOffset = 0;
  54. private List<ParseError> parseErrors = new ArrayList<ParseError>();
  55. public static void main(String args[]){
  56. EcmaScript parser;
  57. if(args.length == 0){
  58. System.out.println("EcmaScript Parser: Reading from standard input . . .");
  59. parser = new EcmaScript(System.in);
  60. } else if(args.length == 1){
  61. System.out.println("EcmaScript Parser: Reading from file " + args[0] + " . . .");
  62. try {
  63. parser = new EcmaScript(new FileInputStream(args[0]), "UTF-8");
  64. } catch(java.io.FileNotFoundException e){
  65. System.out.println("EcmaScript Parser: File " + args[0] + " not found.");
  66. return;
  67. }
  68. } else {
  69. System.out.println("EcmaScript Parser: Usage is one of:");
  70. System.out.println(" EcmaScript < inputfile");
  71. System.out.println("OR");
  72. System.out.println(" EcmaScript inputfile");
  73. return;
  74. }
  75. try {
  76. SimpleNode n = parser.Program();
  77. System.out.println("EcmaScript parser: EcmaScript program parsed successfully.");
  78. } catch (ParseException e) {
  79. System.out.println(e.getMessage());
  80. System.out.println("EcmaScript parser: Encountered errors during parse.");
  81. }
  82. }
  83. void jjtreeOpenNodeScope(Node n){
  84. Token t = getToken(1);
  85. if(t != null){
  86. ((SimpleNode) n).setBeginToken(t);
  87. ((SimpleNode) n).setStartLocation(getStartLocation(t));
  88. }
  89. }
  90. void jjtreeCloseNodeScope(Node n){
  91. Token t = getToken(0);
  92. if(t != null){
  93. ((SimpleNode) n).setEndToken(t);
  94. ((SimpleNode) n).setEndLocation(getEndLocation(t));
  95. }
  96. }
  97. public Location getStartLocation(Token t) {
  98. if (t == null)
  99. return new Location(0 + lineOffset, 0);
  100. return new Location(t.beginLine + lineOffset, t.beginColumn);
  101. }
  102. public Location getEndLocation(Token t) {
  103. if (t == null)
  104. return new Location(0 + lineOffset, 0);
  105. return new Location(t.endLine + lineOffset, t.endColumn + 1);
  106. }
  107. public void setLineOffset(int offset) {
  108. lineOffset = offset > 0 ? offset : 0;
  109. }
  110. public void setTabSize(int size) {
  111. jj_input_stream.setTabSize(size);
  112. }
  113. public int getTabSize() {
  114. return jj_input_stream.getTabSize(0);
  115. }
  116. private void addException(ParseException pe) {
  117. // check for a jsp tag, these can appear in several places and will cause
  118. // a parse error, but they can be ignored. It's easier to catch them and
  119. // ignore them than rewrite the grammar to allow them in all the appropriate
  120. // places.
  121. Token t = pe.currentToken;
  122. if (t != null) {
  123. if (t.next != null && t.next.image.startsWith("<%")) {
  124. return;
  125. }
  126. }
  127. Range range = getExceptionLocation( pe );
  128. parseErrors.add(new ParseError(pe.getMessage(), range));
  129. }
  130. public List<ParseError> getParseErrors() {
  131. return parseErrors;
  132. }
  133. /**
  134. * @return attempts to return a Location indicating the location of a parser
  135. * exception. If the ParseException contains a Token reference, all is well,
  136. * otherwise, this method attempts to parse the message string for the
  137. * exception.
  138. */
  139. private Range getExceptionLocation( ParseException pe ) {
  140. Token t = pe.currentToken;
  141. if ( t != null ) {
  142. return new Range( new Location( t.next.beginLine + lineOffset, t.next.beginColumn ), new Location( t.next.endLine + lineOffset, t.next.endColumn ) );
  143. }
  144. // ParseException message look like: "Parse error at line 116, column 5. Encountered: }"
  145. try {
  146. Pattern p = Pattern.compile( "(.*?)(\\d+)(.*?)(\\d+)(.*?)" );
  147. Matcher m = p.matcher( pe.getMessage() );
  148. if ( m.matches() ) {
  149. String ln = m.group( 2 );
  150. String cn = m.group( 4 );
  151. int line_number = -1;
  152. int column_number = 0;
  153. if ( ln != null )
  154. line_number = Integer.parseInt( ln );
  155. if ( cn != null )
  156. column_number = Integer.parseInt( cn );
  157. return line_number > -1 ? new Range( new Location( line_number + lineOffset, column_number - 1 ), new Location( line_number + lineOffset, column_number ) ) : null;
  158. }
  159. return new Range();
  160. }
  161. catch ( Exception e ) {
  162. //e.printStackTrace();
  163. return new Range();
  164. }
  165. }
  166. }
  167. PARSER_END(EcmaScript)
  168. TOKEN_MGR_DECLS : {
  169. public int htmlTokenNestingLevel = 0;
  170. public boolean expectActionScript = false;
  171. }
  172. /*****************************************
  173. * LEXICAL & REGEXP GRAMMARS STARTS HERE *
  174. *****************************************/
  175. /*
  176. /* Section 7 : Lexical Conventions */
  177. /*
  178. TOKEN:
  179. {
  180. < SOURCE_CHAR: ["\u0000"-"\ufffe"] >
  181. }
  182. MORE :
  183. {
  184. < INPUT_ELEMENT_DIV:
  185. <WHITE_SPACE>
  186. | <LINE_TERMINATOR>
  187. | <COMMENT>
  188. | <_TOKEN>
  189. | <DIV_PUNCTUATOR>
  190. >
  191. }
  192. MORE:
  193. {
  194. < INPUTELEMENTREGEXP:
  195. <WHITE_SPACE>
  196. | <LINE_TERMINATOR>
  197. | <COMMENT>
  198. | <_TOKEN>
  199. | <REGULAR_EXPRESSION_LITERAL>
  200. >
  201. }
  202. */
  203. /* Section 7.2 : White Space */
  204. <DEFAULT, IN_REGEX>
  205. SPECIAL_TOKEN :
  206. {
  207. <WHITE_SPACE: <TAB> | <VT> | <FF> | <SP> | <NBSP> >
  208. |
  209. < #TAB: " " | "\t" > /* TAB */
  210. |
  211. < #VT: "\u000b" > /* Vertical Tab */
  212. |
  213. < #FF: " " | "\f"> /* Form Feed */
  214. |
  215. < #SP: " " | " " > /* Space */
  216. |
  217. < #NBSP: "\u00a0" > /* No-break space */
  218. |
  219. < #USP: /* Other Unicode space seperator */
  220. ["\u2000"]
  221. | ["\u2001"]
  222. | ["\u2002"]
  223. | ["\u2003"]
  224. | ["\u2004"]
  225. | ["\u2005"]
  226. | ["\u2006"]
  227. | ["\u2007"]
  228. | ["\u2008"]
  229. | ["\u2009"]
  230. | ["\u200a"]
  231. | ["\u200b"]
  232. | ["\u3000"]
  233. >
  234. }
  235. /* Section 7.3 : Line Terminators */
  236. <DEFAULT, IN_REGEX>
  237. SPECIAL_TOKEN :
  238. {
  239. <LINE_TERMINATOR: <LF> | <CR> | <LS> | <PS> >
  240. |
  241. < #LF: "\n" > /* Line Feed */
  242. |
  243. < #CR: "\r" > /* Carriage Return */
  244. |
  245. < #LS: "\u2028" > /* Line separator */
  246. |
  247. < #PS: "\u2029" > /* Paragraph separator */
  248. }
  249. /* Comments */
  250. <DEFAULT, IN_REGEX>
  251. MORE :
  252. {
  253. "//" : IN_SINGLE_LINE_COMMENT
  254. |
  255. "/*" : IN_MULTI_LINE_COMMENT
  256. |
  257. "<%" : IN_JSP_TAG // not necessarily a comment...
  258. }
  259. <IN_SINGLE_LINE_COMMENT>
  260. SPECIAL_TOKEN :
  261. {
  262. <SINGLE_LINE_COMMENT: (~["\n","\r"])* ("\n"|"\r"|"\r\n")? > : DEFAULT
  263. }
  264. <IN_MULTI_LINE_COMMENT>
  265. SPECIAL_TOKEN :
  266. {
  267. <MULTI_LINE_COMMENT: "*/" > : DEFAULT
  268. }
  269. <IN_JSP_TAG>
  270. SPECIAL_TOKEN :
  271. {
  272. <JSP_TAG: "%>" > : DEFAULT
  273. }
  274. <IN_SINGLE_LINE_COMMENT, IN_MULTI_LINE_COMMENT, IN_JSP_TAG, IN_PATTERN>
  275. MORE :
  276. {
  277. < ~[] >
  278. }
  279. /* Section 7.5.1: Reserved Words */
  280. <DEFAULT, IN_REGEX>
  281. TOKEN :
  282. {
  283. < BREAK: "break" > : DEFAULT
  284. |
  285. < CONTINUE: "continue" > : DEFAULT
  286. |
  287. < DELETE: "delete" > : DEFAULT
  288. |
  289. < ELSE: "else" > : DEFAULT
  290. |
  291. < FOR: "for" > : DEFAULT
  292. |
  293. < FUNCTION: "function" > : DEFAULT
  294. |
  295. < IF: "if" > : DEFAULT
  296. |
  297. < IN: "in" > : DEFAULT
  298. |
  299. < NEW: "new" > : DEFAULT
  300. |
  301. < RETURN: "return" > : DEFAULT
  302. |
  303. < THIS: "this" > : IN_REGEX
  304. |
  305. < TYPEOF: "typeof" > : DEFAULT
  306. |
  307. < VAR: "var" > : DEFAULT
  308. |
  309. < VOID: "void" > : DEFAULT
  310. |
  311. < WHILE: "while" > : DEFAULT
  312. |
  313. < WITH: "with" > : DEFAULT
  314. |
  315. < CASE: "case" > : DEFAULT
  316. |
  317. < CATCH: "catch" > : DEFAULT
  318. |
  319. < CLASS: "class" > : DEFAULT
  320. |
  321. < CONST: "const" > : DEFAULT
  322. |
  323. < DEBUGGER: "debugger" > : DEFAULT
  324. |
  325. < _DEFAULT: "default" > : DEFAULT
  326. |
  327. < DO: "do" > : DEFAULT
  328. |
  329. < ENUM: "enum" > : DEFAULT
  330. |
  331. < EXPORT: "export" > : DEFAULT
  332. |
  333. < EXTENDS: "extends" > : DEFAULT
  334. |
  335. < FINALLY: "finally" > : DEFAULT
  336. |
  337. < IMPORT: "import" > : DEFAULT
  338. |
  339. < SUPER: "super" > : DEFAULT
  340. |
  341. < SWITCH: "switch" > : DEFAULT
  342. |
  343. < THROW: "throw" > : DEFAULT
  344. |
  345. < TRY: "try" > : DEFAULT
  346. }
  347. /* JScript .NET Tokens
  348. TOKEN :
  349. {
  350. < BYTE: "byte" >
  351. | < SBYTE: "sbyte" >
  352. | < SHORT: "short" >
  353. | < USHORT: "ushort" >
  354. | < UINT: "uint" >
  355. | < LONG: "long" >
  356. | < ULONG: "ulong" >
  357. | < FLOAT: "float" >
  358. | < NUMBER: "Number" >
  359. | < DOUBLE: "double" >
  360. | < DECIMAL: "decimal" >
  361. | < BOOLEAN: "boolean" >
  362. | < STRING: "String" >
  363. | < CHAR: "char" >
  364. }
  365. */
  366. /* Section 7.7: Punctuators */
  367. <DEFAULT, IN_REGEX>
  368. TOKEN :
  369. {
  370. < LBRACE: "{" > : DEFAULT
  371. |
  372. < RBRACE: "}" > : IN_REGEX
  373. |
  374. < LPAREN: "(" > : DEFAULT
  375. |
  376. < RPAREN: ")" > : IN_REGEX
  377. |
  378. < LBRACKET: "[" > : DEFAULT
  379. |
  380. < RBRACKET: "]" > : IN_REGEX
  381. |
  382. < DOT: "." > : DEFAULT
  383. |
  384. < SEMICOLON: ";" > : DEFAULT
  385. |
  386. < COMMA: "," > : DEFAULT
  387. |
  388. < LT: "<" > : DEFAULT
  389. |
  390. < GT: ">" > : DEFAULT
  391. |
  392. < LE: "<=" > : DEFAULT
  393. |
  394. < GE: ">=" > : DEFAULT
  395. |
  396. < EQ: "==" > : DEFAULT
  397. |
  398. < NE: "!=" > : DEFAULT
  399. |
  400. < SEQ: "===" > : DEFAULT /* Strict Equals Operator */
  401. |
  402. < SNEQ: "!==" > : DEFAULT /* Strict Does-not-equal Operator */
  403. |
  404. < PLUS: "+" > : DEFAULT
  405. |
  406. < MINUS: "-" > : DEFAULT
  407. |
  408. < STAR: "*" > : DEFAULT
  409. |
  410. < REM: "%" > : DEFAULT
  411. |
  412. < INCR: "++" > : IN_REGEX
  413. |
  414. < DECR: "--" > : IN_REGEX
  415. |
  416. < LSHIFT: "<<" > : DEFAULT
  417. |
  418. < RSHIFT: ">>" > : DEFAULT
  419. |
  420. < RUNSHIFT: ">>>" > : DEFAULT /* Unsigned Right Shift Operator */
  421. |
  422. < BIT_AND: "&" > : DEFAULT
  423. |
  424. < BIT_OR: "|" > : DEFAULT
  425. |
  426. < XOR: "^" > : DEFAULT
  427. |
  428. < BANG: "!" > : DEFAULT
  429. |
  430. < TILDE: "~" > : IN_REGEX
  431. |
  432. < SC_AND: "&&" > : DEFAULT
  433. |
  434. < SC_OR: "||" > : DEFAULT
  435. |
  436. < HOOK: "?" > : DEFAULT
  437. |
  438. < COLON: ":" > : DEFAULT
  439. |
  440. < ASSIGN: "=" > : DEFAULT
  441. |
  442. < PLUSASSIGN: "+=" > : DEFAULT
  443. |
  444. < MINUSASSIGN: "-=" > : DEFAULT
  445. |
  446. < STARASSIGN: "*=" > : DEFAULT
  447. |
  448. < REMASSIGN: "%=" > : DEFAULT
  449. |
  450. < LSHIFTASSIGN: "<<=" > : DEFAULT
  451. |
  452. < RSIGNEDSHIFTASSIGN: ">>=" > : DEFAULT
  453. |
  454. < RUNSIGNEDSHIFTASSIGN: ">>>=" > : DEFAULT
  455. |
  456. < ANDASSIGN: "&=" > : DEFAULT
  457. |
  458. < ORASSIGN: "|=" > : DEFAULT
  459. |
  460. < XORASSIGN: "^=" > : DEFAULT
  461. |
  462. < INTANCE_OF: "instanceof" > : DEFAULT
  463. }
  464. /* Section 7.8.3: Numeric Literals */
  465. <DEFAULT, IN_REGEX>
  466. TOKEN:
  467. {
  468. < DECIMAL_LITERAL :
  469. <DECIMAL_INTEGER_LITERAL> "." (<DECIMAL_DIGITS>)? (<EXPONENT_PART>)?
  470. |
  471. "." <DECIMAL_DIGITS> (<EXPONENT_PART>)?
  472. |
  473. <DECIMAL_INTEGER_LITERAL> (<EXPONENT_PART>)?
  474. > : IN_REGEX
  475. |
  476. < #NON_ZERO_DIGIT: ["1"-"9"] >
  477. |
  478. < #EXPONENT_PART: ("e" | "E") (["+","-"])? <DECIMAL_DIGITS> >
  479. }
  480. <DEFAULT, IN_REGEX>
  481. TOKEN:
  482. {
  483. < DECIMAL_INTEGER_LITERAL:
  484. "0" | <NON_ZERO_DIGIT> (<DECIMAL_DIGITS>)?
  485. > : IN_REGEX
  486. }
  487. <DEFAULT, IN_REGEX>
  488. TOKEN:
  489. {
  490. < HEX_INTEGER_LITERAL: "0" ["x","X"] (<HEX_DIGIT>)+ > : IN_REGEX
  491. }
  492. <DEFAULT, IN_REGEX>
  493. TOKEN:
  494. { < DECIMAL_DIGITS: (<DECIMAL_DIGIT>)+ > : IN_REGEX }
  495. TOKEN:
  496. {
  497. < DECIMAL_DIGIT: ["0"-"9"] >
  498. }
  499. /* Section 7.8: Literals */
  500. /*
  501. MORE:
  502. {
  503. < LITERAL:
  504. <NULL_LITERAL>
  505. | <BOOLEAN_LITERAL>
  506. | <NUMERIC_LITERAL>
  507. | <STRING_LITERAL>
  508. >
  509. }
  510. */
  511. /* Section 7.8.1: NULL Literals */
  512. <DEFAULT, IN_REGEX>
  513. TOKEN:
  514. {
  515. < NULL_LITERAL: "null" > : IN_REGEX
  516. }
  517. /* Section 7.8.2: Boolean Literals */
  518. <DEFAULT, IN_REGEX>
  519. TOKEN:
  520. {
  521. < BOOLEAN_LITERAL: "true" | "false" > : IN_REGEX
  522. }
  523. /* Section 7.8.4: String Literals */
  524. <DEFAULT, IN_REGEX>
  525. TOKEN:
  526. {
  527. < STRING_LITERAL:
  528. "\"" (<DOUBLE_STRING_CHARACTERS>)? "\"" | "'" (<SINGLE_STRING_CHARACTERS>)? "'"
  529. > : IN_REGEX
  530. |
  531. < #DOUBLE_STRING_CHARACTERS: (<DOUBLE_STRING_CHARACTER>)* >
  532. |
  533. < #SINGLE_STRING_CHARACTERS: (<SINGLE_STRING_CHARACTER>)* >
  534. |
  535. < #DOUBLE_STRING_CHARACTER:
  536. (~["\"","\\","\n","\r","\u2028","\u2029"])*
  537. | "\\" <ESCAPE_SEQUENCE>
  538. >
  539. |
  540. < #SINGLE_STRING_CHARACTER:
  541. (~["'","\\","\n","\r","\u2028","\u2029"])
  542. | "\\" <ESCAPE_SEQUENCE>
  543. >
  544. |
  545. < #ESCAPE_SEQUENCE:
  546. <CHARACTER_ESCAPE_SEQUENCE>
  547. |
  548. "0"
  549. |
  550. <HEX_ESCAPE_SEQUENCE>
  551. |
  552. <UNICODE_ESCAPE_SEQUENCE>
  553. >
  554. |
  555. < #CHARACTER_ESCAPE_SEQUENCE:
  556. <SINGLE_ESCAPE_CHARACTER> | <NON_ESCAPE_CHARACTER>
  557. >
  558. |
  559. < #SINGLE_ESCAPE_CHARACTER: ["'" , "\"" , "\\" , "b" , "f" , "n" , "r" , "t" , "v"] >
  560. |
  561. < #NON_ESCAPE_CHARACTER:
  562. ~["\n","\r","\u2028","\u2029"]
  563. |
  564. ~["'" , "\"" , "\\" , "b" , "f" , "n" , "r" , "t" , "v", "x", "u"]
  565. |
  566. ~["0"-"9"]
  567. >
  568. }
  569. TOKEN:
  570. {
  571. < HEX_ESCAPE_SEQUENCE: "x" <HEX_DIGIT> <HEX_DIGIT> >
  572. }
  573. /*
  574. TOKEN:
  575. {
  576. < ESCAPE_CHARACTER:
  577. ["'" , "\"" , "\\" , "b" , "f" , "n" , "r" , "t" , "v"]
  578. | ["0"-"9"]
  579. | "x"
  580. | "u"
  581. >
  582. }
  583. */
  584. /* Section 7.6: Identifiers */
  585. <DEFAULT, IN_REGEX>
  586. TOKEN:
  587. {
  588. < IDENTIFIER_NAME: <IDENTIFIER_START> (<IDENTIFIER_PART>)* > : IN_REGEX
  589. |
  590. < #IDENTIFIER_START:
  591. <UNICODE_LETTER>
  592. |
  593. <DOLLAR_SIGN>
  594. |
  595. <UNDER_SCORE>
  596. |
  597. <UNICODE_ESCAPE_SEQUENCE>
  598. >
  599. |
  600. < #IDENTIFIER_PART:
  601. <IDENTIFIER_START>
  602. |
  603. <UNICODE_COMBINING_MARK>
  604. |
  605. <UNICODE_DIGIT>
  606. |
  607. <UNICODE_CONNECTOR_PUNCTUATION>
  608. |
  609. <UNICODE_ESCAPE_SEQUENCE>
  610. >
  611. |
  612. < #DOLLAR_SIGN: "$" >
  613. |
  614. < #UNDER_SCORE: "_" >
  615. |
  616. < #UNICODE_LETTER:
  617. ["A"-"Z"]
  618. | ["a"-"z"]
  619. | ["A"-"Z"]
  620. | ["a"-"z"]
  621. | ["\u00aa"]
  622. | ["\u00b5"]
  623. | ["\u00ba"]
  624. | ["\u00c0"-"\u00d6"]
  625. | ["\u00d8"-"\u00f6"]
  626. | ["\u00f8"-"\u021f"]
  627. | ["\u0222"-"\u0233"]
  628. | ["\u0250"-"\u02ad"]
  629. | ["\u02b0"-"\u02b8"]
  630. | ["\u02bb"-"\u02c1"]
  631. | ["\u02d0"-"\u02d1"]
  632. | ["\u02e0"-"\u02e4"]
  633. | ["\u02ee"]
  634. | ["\u037a"]
  635. | ["\u0386"]
  636. | ["\u0388"-"\u038a"]
  637. | ["\u038c"]
  638. | ["\u038e"-"\u03a1"]
  639. | ["\u03a3"-"\u03ce"]
  640. | ["\u03d0"-"\u03d7"]
  641. | ["\u03da"-"\u03f3"]
  642. | ["\u0400"-"\u0481"]
  643. | ["\u048c"-"\u04c4"]
  644. | ["\u04c7"-"\u04c8"]
  645. | ["\u04cb"-"\u04cc"]
  646. | ["\u04d0"-"\u04f5"]
  647. | ["\u04f8"-"\u04f9"]
  648. | ["\u0531"-"\u0556"]
  649. | ["\u0559"]
  650. | ["\u0561"-"\u0587"]
  651. | ["\u05d0"-"\u05ea"]
  652. | ["\u05f0"-"\u05f2"]
  653. | ["\u0621"-"\u063a"]
  654. | ["\u0640"-"\u064a"]
  655. | ["\u0671"-"\u06d3"]
  656. | ["\u06d5"]
  657. | ["\u06e5"-"\u06e6"]
  658. | ["\u06fa"-"\u06fc"]
  659. | ["\u0710"]
  660. | ["\u0712"-"\u072c"]
  661. | ["\u0780"-"\u07a5"]
  662. | ["\u0905"-"\u0939"]
  663. | ["\u093d"]
  664. | ["\u0950"]
  665. | ["\u0958"-"\u0961"]
  666. | ["\u0985"-"\u098c"]
  667. | ["\u098f"-"\u0990"]
  668. | ["\u0993"-"\u09a8"]
  669. | ["\u09aa"-"\u09b0"]
  670. | ["\u09b2"]
  671. | ["\u09b6"-"\u09b9"]
  672. | ["\u09dc"-"\u09dd"]
  673. | ["\u09df"-"\u09e1"]
  674. | ["\u09f0"-"\u09f1"]
  675. | ["\u0a05"-"\u0a0a"]
  676. | ["\u0a0f"-"\u0a10"]
  677. | ["\u0a13"-"\u0a28"]
  678. | ["\u0a2a"-"\u0a30"]
  679. | ["\u0a32"-"\u0a33"]
  680. | ["\u0a35"-"\u0a36"]
  681. | ["\u0a38"-"\u0a39"]
  682. | ["\u0a59"-"\u0a5c"]
  683. | ["\u0a5e"]
  684. | ["\u0a72"-"\u0a74"]
  685. | ["\u0a85"-"\u0a8b"]
  686. | ["\u0a8d"]
  687. | ["\u0a8f"-"\u0a91"]
  688. | ["\u0a93"-"\u0aa8"]
  689. | ["\u0aaa"-"\u0ab0"]
  690. | ["\u0ab2"-"\u0ab3"]
  691. | ["\u0ab5"-"\u0ab9"]
  692. | ["\u0abd"]
  693. | ["\u0ad0"]
  694. | ["\u0ae0"]
  695. | ["\u0b05"-"\u0b0c"]
  696. | ["\u0b0f"-"\u0b10"]
  697. | ["\u0b13"-"\u0b28"]
  698. | ["\u0b2a"-"\u0b30"]
  699. | ["\u0b32"-"\u0b33"]
  700. | ["\u0b36"-"\u0b39"]
  701. | ["\u0b3d"]
  702. | ["\u0b5c"-"\u0b5d"]
  703. | ["\u0b5f"-"\u0b61"]
  704. | ["\u0b85"-"\u0b8a"]
  705. | ["\u0b8e"-"\u0b90"]
  706. | ["\u0b92"-"\u0b95"]
  707. | ["\u0b99"-"\u0b9a"]
  708. | ["\u0b9c"]
  709. | ["\u0b9e"-"\u0b9f"]
  710. | ["\u0ba3"-"\u0ba4"]
  711. | ["\u0ba8"-"\u0baa"]
  712. | ["\u0bae"-"\u0bb5"]
  713. | ["\u0bb7"-"\u0bb9"]
  714. | ["\u0c05"-"\u0c0c"]
  715. | ["\u0c0e"-"\u0c10"]
  716. | ["\u0c12"-"\u0c28"]
  717. | ["\u0c2a"-"\u0c33"]
  718. | ["\u0c35"-"\u0c39"]
  719. | ["\u0c60"-"\u0c61"]
  720. | ["\u0c85"-"\u0c8c"]
  721. | ["\u0c8e"-"\u0c90"]
  722. | ["\u0c92"-"\u0ca8"]
  723. | ["\u0caa"-"\u0cb3"]
  724. | ["\u0cb5"-"\u0cb9"]
  725. | ["\u0cde"]
  726. | ["\u0ce0"-"\u0ce1"]
  727. | ["\u0d05"-"\u0d0c"]
  728. | ["\u0d0e"-"\u0d10"]
  729. | ["\u0d12"-"\u0d28"]
  730. | ["\u0d2a"-"\u0d39"]
  731. | ["\u0d60"-"\u0d61"]
  732. | ["\u0d85"-"\u0d96"]
  733. | ["\u0d9a"-"\u0db1"]
  734. | ["\u0db3"-"\u0dbb"]
  735. | ["\u0dbd"]
  736. | ["\u0dc0"-"\u0dc6"]
  737. | ["\u0e01"-"\u0e30"]
  738. | ["\u0e32"-"\u0e33"]
  739. | ["\u0e40"-"\u0e46"]
  740. | ["\u0e81"-"\u0e82"]
  741. | ["\u0e84"]
  742. | ["\u0e87"-"\u0e88"]
  743. | ["\u0e8a"]
  744. | ["\u0e8d"]
  745. | ["\u0e94"-"\u0e97"]
  746. | ["\u0e99"-"\u0e9f"]
  747. | ["\u0ea1"-"\u0ea3"]
  748. | ["\u0ea5"]
  749. | ["\u0ea7"]
  750. | ["\u0eaa"-"\u0eab"]
  751. | ["\u0ead"-"\u0eb0"]
  752. | ["\u0eb2"-"\u0eb3"]
  753. | ["\u0ebd"-"\u0ec4"]
  754. | ["\u0ec6"]
  755. | ["\u0edc"-"\u0edd"]
  756. | ["\u0f00"]
  757. | ["\u0f40"-"\u0f6a"]
  758. | ["\u0f88"-"\u0f8b"]
  759. | ["\u1000"-"\u1021"]
  760. | ["\u1023"-"\u1027"]
  761. | ["\u1029"-"\u102a"]
  762. | ["\u1050"-"\u1055"]
  763. | ["\u10a0"-"\u10c5"]
  764. | ["\u10d0"-"\u10f6"]
  765. | ["\u1100"-"\u1159"]
  766. | ["\u115f"-"\u11a2"]
  767. | ["\u11a8"-"\u11f9"]
  768. | ["\u1200"-"\u1206"]
  769. | ["\u1208"-"\u1246"]
  770. | ["\u1248"]
  771. | ["\u124a"-"\u124d"]
  772. | ["\u1250"-"\u1256"]
  773. | ["\u1258"]
  774. | ["\u125a"-"\u125d"]
  775. | ["\u1260"-"\u1286"]
  776. | ["\u1288"]
  777. | ["\u128a"-"\u128d"]
  778. | ["\u1290"-"\u12ae"]
  779. | ["\u12b0"]
  780. | ["\u12b2"-"\u12b5"]
  781. | ["\u12b8"-"\u12be"]
  782. | ["\u12c0"]
  783. | ["\u12c2"-"\u12c5"]
  784. | ["\u12c8"-"\u12ce"]
  785. | ["\u12d0"-"\u12d6"]
  786. | ["\u12d8"-"\u12ee"]
  787. | ["\u12f0"-"\u130e"]
  788. | ["\u1310"]
  789. | ["\u1312"-"\u1315"]
  790. | ["\u1318"-"\u131e"]
  791. | ["\u1320"-"\u1346"]
  792. | ["\u1348"-"\u135a"]
  793. | ["\u13a0"-"\u13b0"]
  794. | ["\u13b1"-"\u13f4"]
  795. | ["\u1401"-"\u1676"]
  796. | ["\u1681"-"\u169a"]
  797. | ["\u16a0"-"\u16ea"]
  798. | ["\u1780"-"\u17b3"]
  799. | ["\u1820"-"\u1877"]
  800. | ["\u1880"-"\u18a8"]
  801. | ["\u1e00"-"\u1e9b"]
  802. | ["\u1ea0"-"\u1ee0"]
  803. | ["\u1ee1"-"\u1ef9"]
  804. | ["\u1f00"-"\u1f15"]
  805. | ["\u1f18"-"\u1f1d"]
  806. | ["\u1f20"-"\u1f39"]
  807. | ["\u1f3a"-"\u1f45"]
  808. | ["\u1f48"-"\u1f4d"]
  809. | ["\u1f50"-"\u1f57"]
  810. | ["\u1f59"]
  811. | ["\u1f5b"]
  812. | ["\u1f5d"]
  813. | ["\u1f5f"-"\u1f7d"]
  814. | ["\u1f80"-"\u1fb4"]
  815. | ["\u1fb6"-"\u1fbc"]
  816. | ["\u1fbe"]
  817. | ["\u1fc2"-"\u1fc4"]
  818. | ["\u1fc6"-"\u1fcc"]
  819. | ["\u1fd0"-"\u1fd3"]
  820. | ["\u1fd6"-"\u1fdb"]
  821. | ["\u1fe0"-"\u1fec"]
  822. | ["\u1ff2"-"\u1ff4"]
  823. | ["\u1ff6"-"\u1ffc"]
  824. | ["\u207f"]
  825. | ["\u2102"]
  826. | ["\u2107"]
  827. | ["\u210a"-"\u2113"]
  828. | ["\u2115"]
  829. | ["\u2119"-"\u211d"]
  830. | ["\u2124"]
  831. | ["\u2126"]
  832. | ["\u2128"]
  833. | ["\u212a"-"\u212d"]
  834. | ["\u212f"-"\u2131"]
  835. | ["\u2133"-"\u2139"]
  836. | ["\u2160"-"\u2183"]
  837. | ["\u3005"-"\u3007"]
  838. | ["\u3021"-"\u3029"]
  839. | ["\u3031"-"\u3035"]
  840. | ["\u3038"-"\u303a"]
  841. | ["\u3041"-"\u3094"]
  842. | ["\u309d"-"\u309e"]
  843. | ["\u30a1"-"\u30fa"]
  844. | ["\u30fc"-"\u30fe"]
  845. | ["\u3105"-"\u312c"]
  846. | ["\u3131"-"\u318e"]
  847. | ["\u31a0"-"\u31b7"]
  848. | ["\u3400"]
  849. | ["\u4db5"]
  850. | ["\u4e00"]
  851. | ["\u9fa5"]
  852. | ["\ua000"-"\ua48c"]
  853. | ["\uac00"]
  854. | ["\ud7a3"]
  855. | ["\uf900"-"\ufa2d"]
  856. | ["\ufb00"-"\ufb06"]
  857. | ["\ufb13"-"\ufb17"]
  858. | ["\ufb1d"]
  859. | ["\ufb1f"-"\ufb28"]
  860. | ["\ufb2a"-"\ufb36"]
  861. | ["\ufb38"-"\ufb3c"]
  862. | ["\ufb3e"]
  863. | ["\ufb40"-"\ufb41"]
  864. | ["\ufb43"-"\ufb44"]
  865. | ["\ufb46"-"\ufbb1"]
  866. | ["\ufbd3"-"\ufd3d"]
  867. | ["\ufd50"-"\ufd8f"]
  868. | ["\ufd92"-"\ufdc7"]
  869. | ["\ufdf0"-"\ufdfb"]
  870. | ["\ufe70"-"\ufe72"]
  871. | ["\ufe74"]
  872. | ["\ufe76"-"\ufefc"]
  873. | ["\uff21"-"\uff3a"]
  874. | ["\uff41"-"\uff5a"]
  875. | ["\uff66"-"\uffbe"]
  876. | ["\uffc2"-"\uffc7"]
  877. | ["\uffca"-"\uffcf"]
  878. | ["\uffd2"-"\uffd7"]
  879. | ["\uffda"-"\uffdc"]
  880. >
  881. }
  882. /*
  883. * Unicode categories Non-spacing mark (MN) OR Combining spacing mark (MC)
  884. */
  885. MORE:
  886. {
  887. < UNICODE_COMBINING_MARK: <MN> | <MC> >
  888. }
  889. TOKEN:
  890. {
  891. < MC:
  892. ["\u0903"]
  893. | ["\u093e"]
  894. | ["\u093f"]
  895. | ["\u0940"]
  896. | ["\u0949"]
  897. | ["\u094a"]
  898. | ["\u094b"]
  899. | ["\u094c"]
  900. | ["\u0982"]
  901. | ["\u0983"]
  902. | ["\u09be"]
  903. | ["\u09bf"]
  904. | ["\u09c0"]
  905. | ["\u09c7"]
  906. | ["\u09c8"]
  907. | ["\u09cb"]
  908. | ["\u09cc"]
  909. | ["\u09d7"]
  910. | ["\u0a03"]
  911. | ["\u0a3e"]
  912. | ["\u0a3f"]
  913. | ["\u0a40"]
  914. | ["\u0a83"]
  915. | ["\u0abe"]
  916. | ["\u0abf"]
  917. | ["\u0ac0"]
  918. | ["\u0ac9"]
  919. | ["\u0acb"]
  920. | ["\u0acc"]
  921. | ["\u0b02"]
  922. | ["\u0b03"]
  923. | ["\u0b3e"]
  924. | ["\u0b40"]
  925. | ["\u0b47"]
  926. | ["\u0b48"]
  927. | ["\u0b4b"]
  928. | ["\u0b4c"]
  929. | ["\u0b57"]
  930. | ["\u0bbe"]
  931. | ["\u0bbf"]
  932. | ["\u0bc1"]
  933. | ["\u0bc2"]
  934. | ["\u0bc6"]
  935. | ["\u0bc7"]
  936. | ["\u0bc8"]
  937. | ["\u0bca"]
  938. | ["\u0bcb"]
  939. | ["\u0bcc"]
  940. | ["\u0bd7"]
  941. | ["\u0c01"]
  942. | ["\u0c02"]
  943. | ["\u0c03"]
  944. | ["\u0c41"]
  945. | ["\u0c42"]
  946. | ["\u0c43"]
  947. | ["\u0c44"]
  948. | ["\u0c82"]
  949. | ["\u0c83"]
  950. | ["\u0cbe"]
  951. | ["\u0cc0"]
  952. | ["\u0cc1"]
  953. | ["\u0cc2"]
  954. | ["\u0cc3"]
  955. | ["\u0cc4"]
  956. | ["\u0cc7"]
  957. | ["\u0cc8"]
  958. | ["\u0cca"]
  959. | ["\u0ccb"]
  960. | ["\u0cd5"]
  961. | ["\u0cd6"]
  962. | ["\u0d02"]
  963. | ["\u0d03"]
  964. | ["\u0d3e"]
  965. | ["\u0d3f"]
  966. | ["\u0d40"]
  967. | ["\u0d46"]
  968. | ["\u0d47"]
  969. | ["\u0d48"]
  970. | ["\u0d4a"]
  971. | ["\u0d4b"]
  972. | ["\u0d4c"]
  973. | ["\u0d57"]
  974. | ["\u0d82"]
  975. | ["\u0d83"]
  976. | ["\u0dcf"]
  977. | ["\u0dd0"]
  978. | ["\u0dd1"]
  979. | ["\u0dd8"]
  980. | ["\u0dd9"]
  981. | ["\u0dda"]
  982. | ["\u0ddb"]
  983. | ["\u0ddc"]
  984. | ["\u0ddd"]
  985. | ["\u0dde"]
  986. | ["\u0ddf"]
  987. | ["\u0df2"]
  988. | ["\u0df3"]
  989. | ["\u0f3e"]
  990. | ["\u0f3f"]
  991. | ["\u0f7f"]
  992. | ["\u102c"]
  993. | ["\u1031"]
  994. | ["\u1038"]
  995. | ["\u1056"]
  996. | ["\u1057"]
  997. | ["\u17b6"]
  998. | ["\u17be"]
  999. | ["\u17bf"]
  1000. | ["\u17c0"]
  1001. | ["\u17c1"]
  1002. | ["\u17c2"]
  1003. | ["\u17c3"]
  1004. | ["\u17c4"]
  1005. | ["\u17c5"]
  1006. | ["\u17c7"]
  1007. | ["\u17c8"]
  1008. | ["\u1923"]
  1009. | ["\u1924"]
  1010. | ["\u1925"]
  1011. | ["\u1926"]
  1012. | ["\u1929"]
  1013. | ["\u192a"]
  1014. | ["\u192b"]
  1015. | ["\u1930"]
  1016. | ["\u1931"]
  1017. | ["\u1933"]
  1018. | ["\u1934"]
  1019. | ["\u1935"]
  1020. | ["\u1936"]
  1021. | ["\u1937"]
  1022. | ["\u1938"]
  1023. | ["\u19b0"]
  1024. | ["\u19b1"]
  1025. | ["\u19b2"]
  1026. | ["\u19b3"]
  1027. | ["\u19b4"]
  1028. | ["\u19b5"]
  1029. | ["\u19b6"]
  1030. | ["\u19b7"]
  1031. | ["\u19b8"]
  1032. | ["\u19b9"]
  1033. | ["\u19ba"]
  1034. | ["\u19bb"]
  1035. | ["\u19bc"]
  1036. | ["\u19bd"]
  1037. | ["\u19be"]
  1038. | ["\u19bf"]
  1039. | ["\u19c0"]
  1040. | ["\u19c8"]
  1041. | ["\u19c9"]
  1042. | ["\u1a19"]
  1043. | ["\u1a1a"]
  1044. | ["\u1a1b"]
  1045. | ["\ua802"]
  1046. | ["\ua823"]
  1047. | ["\ua824"]
  1048. | ["\ua827"]
  1049. | ["\u1d16"]
  1050. | ["\u1d16"]
  1051. | ["\u1d16"]
  1052. | ["\u1d16"]
  1053. | ["\u1d16"]
  1054. | ["\u1d17"]
  1055. | ["\u1d17"]
  1056. | ["\u1d17"]
  1057. >
  1058. |
  1059. < MN:
  1060. ["\u0300"-"\u034e"]
  1061. | ["\u0360"-"\u0362"]
  1062. | ["\u0483"-"\u0486"]
  1063. | ["\u0591"-"\u05a1"]
  1064. | ["\u05a3"-"\u05b9"]
  1065. | ["\u05bb"-"\u05bd"]
  1066. | ["\u05bf"]
  1067. | ["\u05c1"-"\u05c2"]
  1068. | ["\u05c4"]
  1069. | ["\u064b"-"\u0655"]
  1070. | ["\u0670"]
  1071. | ["\u06d6"-"\u06dc"]
  1072. | ["\u06df"-"\u06e4"]
  1073. | ["\u06e7"-"\u06e8"]
  1074. | ["\u06ea"-"\u06ed"]
  1075. | ["\u0711"]
  1076. | ["\u0730"-"\u074a"]
  1077. | ["\u07a6"-"\u07b0"]
  1078. | ["\u0901"-"\u0903"]
  1079. | ["\u093c"]
  1080. | ["\u093e"-"\u094d"]
  1081. | ["\u0951"-"\u0954"]
  1082. | ["\u0962"-"\u0963"]
  1083. | ["\u0981"-"\u0983"]
  1084. | ["\u09bc"-"\u09c4"]
  1085. | ["\u09c7"-"\u09c8"]
  1086. | ["\u09cb"-"\u09cd"]
  1087. | ["\u09d7"]
  1088. | ["\u09e2"-"\u09e3"]
  1089. | ["\u0a02"]
  1090. | ["\u0a3c"]
  1091. | ["\u0a3e"-"\u0a42"]
  1092. | ["\u0a47"-"\u0a48"]
  1093. | ["\u0a4b"-"\u0a4d"]
  1094. | ["\u0a70"-"\u0a71"]
  1095. | ["\u0a81"-"\u0a83"]
  1096. | ["\u0abc"]
  1097. | ["\u0abe"-"\u0ac5"]
  1098. | ["\u0ac7"-"\u0ac9"]
  1099. | ["\u0acb"-"\u0acd"]
  1100. | ["\u0b01"-"\u0b03"]
  1101. | ["\u0b3c"]
  1102. | ["\u0b3e"-"\u0b43"]
  1103. | ["\u0b47"-"\u0b48"]
  1104. | ["\u0b4b"-"\u0b4d"]
  1105. | ["\u0b56"-"\u0b57"]
  1106. | ["\u0b82"-"\u0b83"]
  1107. | ["\u0bbe"-"\u0bc2"]
  1108. | ["\u0bc6"-"\u0bc8"]
  1109. | ["\u0bca"-"\u0bcd"]
  1110. | ["\u0bd7"]
  1111. | ["\u0c01"-"\u0c03"]
  1112. | ["\u0c3e"-"\u0c44"]
  1113. | ["\u0c46"-"\u0c48"]
  1114. | ["\u0c4a"-"\u0c4d"]
  1115. | ["\u0c55"-"\u0c56"]
  1116. | ["\u0c82"-"\u0c83"]
  1117. | ["\u0cbe"-"\u0cc4"]
  1118. | ["\u0cc6"-"\u0cc8"]
  1119. | ["\u0cca"-"\u0ccd"]
  1120. | ["\u0cd5"-"\u0cd6"]
  1121. | ["\u0d02"-"\u0d03"]
  1122. | ["\u0d3e"-"\u0d43"]
  1123. | ["\u0d46"-"\u0d48"]
  1124. | ["\u0d4a"-"\u0d4d"]
  1125. | ["\u0d57"]
  1126. | ["\u0d82"-"\u0d83"]
  1127. | ["\u0dca"]
  1128. | ["\u0dcf"-"\u0dd4"]
  1129. | ["\u0dd6"]
  1130. | ["\u0dd8"-"\u0ddf"]
  1131. | ["\u0df2"-"\u0df3"]
  1132. | ["\u0e31"]
  1133. | ["\u0e34"-"\u0e3a"]
  1134. | ["\u0e47"-"\u0e4e"]
  1135. | ["\u0eb1"]
  1136. | ["\u0eb4"-"\u0eb9"]
  1137. | ["\u0ebb"-"\u0ebc"]
  1138. | ["\u0ec8"-"\u0ecd"]
  1139. | ["\u0f18"-"\u0f19"]
  1140. | ["\u0f35"]
  1141. | ["\u0f37"]
  1142. | ["\u0f39"]
  1143. | ["\u0f3e"-"\u0f3f"]
  1144. | ["\u0f71"-"\u0f84"]
  1145. | ["\u0f86"-"\u0f87"]
  1146. | ["\u0f90"-"\u0f97"]
  1147. | ["\u0f99"-"\u0fbc"]
  1148. | ["\u0fc6"]
  1149. | ["\u102c"-"\u1032"]
  1150. | ["\u1036"-"\u1039"]
  1151. | ["\u1056"-"\u1059"]
  1152. | ["\u17b4"-"\u17d3"]
  1153. | ["\u18a9"]
  1154. | ["\u20d0"-"\u20dc"]
  1155. | ["\u20e1"]
  1156. | ["\u302a"-"\u302f"]
  1157. | ["\u3099"-"\u309a"]
  1158. | ["\ufb1e"]
  1159. | ["\ufe20"-"\ufe23"]
  1160. >
  1161. }
  1162. TOKEN:
  1163. {
  1164. < UNICODE_DIGIT:
  1165. ["0"-"9"]
  1166. | ["\u0660"-"\u0669"]
  1167. | ["\u06f0"-"\u06f9"]
  1168. | ["\u0966"-"\u096f"]
  1169. | ["\u09e6"-"\u09ef"]
  1170. | ["\u0a66"-"\u0a6f"]
  1171. | ["\u0ae6"-"\u0aef"]
  1172. | ["\u0b66"-"\u0b6f"]
  1173. | ["\u0be7"-"\u0bef"]
  1174. | ["\u0c66"-"\u0c6f"]
  1175. | ["\u0ce6"-"\u0cef"]
  1176. | ["\u0d66"-"\u0d6f"]
  1177. | ["\u0e50"-"\u0e59"]
  1178. | ["\u0ed0"-"\u0ed9"]
  1179. | ["\u0f20"-"\u0f29"]
  1180. | ["\u1040"-"\u1049"]
  1181. | ["\u1369"-"\u1371"]
  1182. | ["\u17e0"-"\u17e9"]
  1183. | ["\u1810"-"\u1819"]
  1184. | ["\uff10"-"\uff19"]
  1185. >
  1186. }
  1187. TOKEN:
  1188. {
  1189. < UNICODE_CONNECTOR_PUNCTUATION:
  1190. ["_"]
  1191. |
  1192. ["\u203f"-"\u2040"]
  1193. |
  1194. ["\u30fb"]
  1195. |
  1196. ["\ufe33"-"\ufe34"]
  1197. |
  1198. ["\ufe4d"-"\ufe4f"]
  1199. |
  1200. ["\uff3f"]
  1201. |
  1202. ["\uff65"]
  1203. >
  1204. }
  1205. TOKEN:
  1206. {
  1207. < UNICODE_ESCAPE_SEQUENCE: "u" <HEX_DIGIT> <HEX_DIGIT> <HEX_DIGIT> <HEX_DIGIT> >
  1208. }
  1209. TOKEN:
  1210. {
  1211. < HEX_DIGIT: ["0"-"9"] | ["a"-"f"] | ["A"-"F"] >
  1212. }
  1213. <IN_REGEX>
  1214. TOKEN :
  1215. {
  1216. < SLASHASSIGN: "/=" > : DEFAULT
  1217. |
  1218. < SLASH: "/" > : DEFAULT
  1219. }
  1220. /* Section 7.8.5: Regular Expression Literals */
  1221. <DEFAULT>
  1222. TOKEN :
  1223. {
  1224. < REGULAR_EXPRESSION_LITERAL:
  1225. "/" ( (~["\n","\r","\\","/","*"]) | <BACKSLASH_SEQUENCE> )
  1226. ( (~["\n","\r","\\","/"]) | <BACKSLASH_SEQUENCE> )* "/" (<IDENTIFIER_PART>)*
  1227. > : IN_REGEX
  1228. |
  1229. < #BACKSLASH_SEQUENCE:
  1230. "\\" (~["\n","\r"])
  1231. >
  1232. }
  1233. /*
  1234. <DEFAULT>
  1235. TOKEN:
  1236. {
  1237. < REGULAR_EXPRESSION_LITERAL:
  1238. "/" <REGULAR_EXPRESSION_BODY> "/" <REGULAR_EXPRESSION_FLAGS>
  1239. > : IN_REGEX
  1240. |
  1241. < #REGULAR_EXPRESSION_BODY: <REGULAR_EXPRESSION_FIRSTCHAR> <REGULAR_EXPRESSION_CHARS> >
  1242. |
  1243. < #REGULAR_EXPRESSION_CHARS: (<REGULAR_EXPRESSION_CHAR>)* >
  1244. |
  1245. < #REGULAR_EXPRESSION_FIRSTCHAR:
  1246. // ~["*","\\","/"] <NON_TERMINATOR>
  1247. <NON_TERMINATOR_FIRSTCHAR>
  1248. | <BACKSLASH_SEQUENCE>
  1249. >
  1250. |
  1251. < #REGULAR_EXPRESSION_CHAR:
  1252. //~["\\","/"] <NON_TERMINATOR> <NON_TERMINATOR_CHAR>
  1253. | <BACKSLASH_SEQUENCE>
  1254. >
  1255. |
  1256. < #BACKSLASH_SEQUENCE: "\\" <NON_TERMINATOR> >
  1257. |
  1258. < #NON_TERMINATOR_FIRSTCHAR: ~["\n","\r","\u2028","\u2029","*","\\","/"] >
  1259. |
  1260. < #NON_TERMINATOR_CHAR: ~["\n","\r","\u2028","\u2029","\\","/"] >
  1261. |
  1262. < #NON_TERMINATOR: ~["\n","\r","\u2028","\u2029"] >
  1263. |
  1264. < #REGULAR_EXPRESSION_FLAGS: (<IDENTIFIER_PART>)* >
  1265. }
  1266. */
  1267. /*****************************************
  1268. * NUMERIC STRING GRAMMAR STARTS HERE *
  1269. *****************************************/
  1270. /* Section 9.3: String-to-Number Conversion */
  1271. /*
  1272. MORE:
  1273. {
  1274. <STRING_NUMERIC_LITERAL: (<STR_WHITESPACE>)? (<STR_NUMERIC_LITERAL> (<STR_WHITESPACE>)?)? >
  1275. }
  1276. MORE:
  1277. {
  1278. < STR_WHITESPACE: (<STR_WHITESPACE_CHAR>)+ >
  1279. }
  1280. MORE:
  1281. {
  1282. < STR_WHITESPACE_CHAR:
  1283. <TAB>
  1284. | <SP>
  1285. | <NBSP>
  1286. | <FF>
  1287. | <VT>
  1288. | <CR>
  1289. | <LF>
  1290. | <LS>
  1291. | <PS>
  1292. | <USP>
  1293. >
  1294. }
  1295. MORE:
  1296. {
  1297. < STR_NUMERIC_LITERAL:
  1298. <STR_DECIMAL_LITERAL> | <HEX_INTEGER_LITERAL>
  1299. >
  1300. }
  1301. MORE:
  1302. {
  1303. <STR_DECIMAL_LITERAL: <STR_UNSIGNED_DECIMAL_LITERAL> ("+" | "-") <STR_UNSIGNED_DECIMAL_LITERAL> >
  1304. }
  1305. MORE:
  1306. {
  1307. < STR_UNSIGNED_DECIMAL_LITERAL:
  1308. "Infinity"
  1309. | <DECIMAL_DIGITS> "." (<DECIMAL_DIGITS>)* (<EXPONENT_PART>)*
  1310. >
  1311. }
  1312. */
  1313. /* A.6 Universal Resource Identifier Character Classes */
  1314. /*
  1315. TOKEN:
  1316. {
  1317. < URIRESERVED : [";" , "/" , "?" , ":" , "@" , "&" , "=" , "+" , "$" , ","] >
  1318. }
  1319. TOKEN:
  1320. {
  1321. < URI_ALPHA : ["a"-"z","A"-"Z"] >
  1322. }
  1323. TOKEN:
  1324. {
  1325. < URI_MARK : ["-" , "_" , "." , "!" , "~" , "*" , "'" , "(" , ")"] >
  1326. }
  1327. void uri() :
  1328. {}
  1329. {
  1330. (uriCharacters())?
  1331. }
  1332. void uriCharacters() :
  1333. {}
  1334. {
  1335. (uriCharacter())+
  1336. }
  1337. void uriCharacter() :
  1338. {}
  1339. {
  1340. <URIRESERVED>
  1341. | uriUnescaped()
  1342. | uriEscaped()
  1343. }
  1344. void uriUnescaped() :
  1345. {}
  1346. {
  1347. <URI_ALPHA>
  1348. | <DECIMAL_DIGIT>
  1349. | <URI_MARK>
  1350. }
  1351. void uriEscaped() :
  1352. {}
  1353. {
  1354. "%" <HEX_DIGIT> <HEX_DIGIT>
  1355. }
  1356. */
  1357. /* A.7 Regular Expressions */
  1358. /*
  1359. MORE :
  1360. {
  1361. "/^" : INSIDE_PATTERN
  1362. }
  1363. <INSIDE_PATTERN, IN_PATTERN>
  1364. TOKEN:
  1365. {
  1366. < PATTERN : <DISJUNCTION> > : DEFAULT
  1367. |
  1368. < #DISJUNCTION : (<ALTERNATIVE>)+ >
  1369. |
  1370. < #ALTERNATIVE : (<TERM>)* >
  1371. |
  1372. < #TERM : <ASSERTION> | <ATOM> (<QUANTIFIER>)? >
  1373. |
  1374. < #ASSERTION :
  1375. "^"
  1376. | "$"
  1377. | "\\" ("b" | "B")
  1378. >
  1379. |
  1380. < #QUANTIFIER : <QUANTIFIERPREFIX> ("?")? >
  1381. |
  1382. < #QUANTIFIERPREFIX : "*" | "+" | "?" | ( "{" <DECIMAL_DIGITS> ("," (<DECIMAL_DIGITS>)?)? "}" ) >
  1383. |
  1384. < #ATOM :
  1385. <PATTERN_CHARACTER>
  1386. | "."
  1387. | "\\" <ATOMESCAPE>
  1388. | <CHARACTERCLASS>
  1389. //| "(" ("?" (":" | "=" | "!"))? <DISJUNCTION> ")"
  1390. | "(" ("?" (":" | "=" | "!"))? ")"
  1391. >
  1392. |
  1393. < #PATTERN_CHARACTER : ~["^", "$", "\\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", "|"] >
  1394. |
  1395. < #ATOMESCAPE : <DECIMALESCAPE> | <CHARACTERESCAPE> | <CHARACTER_CLASS_ESCAPE> >
  1396. |
  1397. < #CHARACTER_CLASS_ESCAPE : ["d", "D", "s", "S", "w", "W"] >
  1398. |
  1399. < #CHARACTERESCAPE :
  1400. <CONTROL_ESCAPE>
  1401. | "c" <CONTROL_LETTER>
  1402. | <HEX_ESCAPE_SEQUENCE>
  1403. | <UNICODE_ESCAPE_SEQUENCE>
  1404. | <IDENTITY_ESCAPE>
  1405. >
  1406. |
  1407. < #CONTROL_ESCAPE : ["f" , "n" , "r" , "t" , "v"] >
  1408. |
  1409. < #CONTROL_LETTER : ["a"-"z","A"-"Z"] >
  1410. |
  1411. < #IDENTITY_ESCAPE : ~["0"-"9", "A"-"Z", "a"-"z","-"] >
  1412. |
  1413. < #DECIMALESCAPE : <DECIMAL_INTEGER_LITERAL> >
  1414. |
  1415. < #CHARACTERCLASS : "[" ("^")? <CLASSRANGES> "]" >
  1416. |
  1417. < #CLASSRANGES : (<NONEMPTYCLASSRANGES>)? >
  1418. |
  1419. //< #NONEMPTYCLASSRANGES : <CLASSATOM> (<NONEMPTYCLASSRANGESNODASH> | "-" <CLASSATOM> <CLASSRANGES>) >
  1420. < #NONEMPTYCLASSRANGES : <CLASSATOM> (<NONEMPTYCLASSRANGESNODASH> | "-" <CLASSATOM>) >
  1421. |
  1422. //< #NONEMPTYCLASSRANGESNODASH : <CLASSATOM> | <CLASSATOMNODASH> ( <NONEMPTYCLASSRANGESNODASH> | "-" <CLASSATOM> <CLASSRANGES> ) >
  1423. < #NONEMPTYCLASSRANGESNODASH : <CLASSATOM> | <CLASSATOMNODASH> ( <CLASSATOM> | "-" <CLASSATOM> ) >
  1424. |
  1425. < #CLASSATOM : "-" <CLASSATOMNODASH> >
  1426. |
  1427. < #CLASSATOMNODASH : <CLASS_ATOM_NODASH_TOKEN> | "\\" <CLASSESCAPE> >
  1428. |
  1429. < #CLASS_ATOM_NODASH_TOKEN : ~["\\", "]", "-"] >
  1430. |
  1431. < #CLASSESCAPE :
  1432. <DECIMALESCAPE>
  1433. | "b"
  1434. | <CHARACTERESCAPE>
  1435. | <CHARACTER_CLASS_ESCAPE>
  1436. >
  1437. }
  1438. */
  1439. /*****************************************
  1440. * ECMA SYNTACTIC GRAMMARS STARTS HERE *
  1441. *****************************************/
  1442. /* Section 11.1: Primary Expressions */
  1443. void PrimaryExpression() :
  1444. {}
  1445. {
  1446. try {
  1447. LOOKAHEAD("this")/*@bgen(jjtree) ThisReference */
  1448. {
  1449. ASTThisReference jjtn001 = new ASTThisReference(JJTTHISREFERENCE);
  1450. boolean jjtc001 = true;
  1451. jjtree.openNodeScope(jjtn001);
  1452. jjtreeOpenNodeScope(jjtn001);
  1453. }
  1454. try {
  1455. /*@egen*/ "this"/*@bgen(jjtree)*/
  1456. } finally {
  1457. if (jjtc001) {
  1458. jjtree.closeNodeScope(jjtn001, true);
  1459. jjtreeCloseNodeScope(jjtn001);
  1460. }
  1461. }
  1462. /*@egen*/
  1463. | LOOKAHEAD("{") ObjectLiteral()
  1464. | LOOKAHEAD("(")/*@bgen(jjtree) ParenExpression */
  1465. {
  1466. ASTParenExpression jjtn002 = new ASTParenExpression(JJTPARENEXPRESSION);
  1467. boolean jjtc002 = true;
  1468. jjtree.openNodeScope(jjtn002);
  1469. jjtreeOpenNodeScope(jjtn002);
  1470. }
  1471. try {
  1472. /*@egen*/ ( "(" Expression() ")" )/*@bgen(jjtree)*/
  1473. } catch (Throwable jjte002) {
  1474. if (jjtc002) {
  1475. jjtree.clearNodeScope(jjtn002);
  1476. jjtc002 = false;
  1477. } else {
  1478. jjtree.popNode();
  1479. }
  1480. if (jjte002 instanceof RuntimeException) {
  1481. throw (RuntimeException)jjte002;
  1482. }
  1483. if (jjte002 instanceof ParseException) {
  1484. throw (ParseException)jjte002;
  1485. }
  1486. throw (Error)jjte002;
  1487. } finally {
  1488. if (jjtc002) {
  1489. jjtree.closeNodeScope(jjtn002, true);
  1490. jjtreeCloseNodeScope(jjtn002);
  1491. }
  1492. }
  1493. /*@egen*/
  1494. | LOOKAHEAD(Identifier()) Identifier()
  1495. | LOOKAHEAD("[") ArrayLiteral()
  1496. | LOOKAHEAD(2) Literal()
  1497. }
  1498. catch(ParseException pe) {
  1499. addException(pe);
  1500. }
  1501. }
  1502. /* Section 7.8: Literals */
  1503. void Literal() :
  1504. {/*@bgen(jjtree) Literal */
  1505. ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL);
  1506. boolean jjtc000 = true;
  1507. jjtree.openNodeScope(jjtn000);
  1508. jjtreeOpenNodeScope(jjtn000);
  1509. /*@egen*/
  1510. Token t;
  1511. Map objLiteral;
  1512. List arrayLiteral;
  1513. }
  1514. {/*@bgen(jjtree) Literal */
  1515. try {
  1516. /*@egen*/
  1517. try {
  1518. t = <DECIMAL_LITERAL>/*@bgen(jjtree)*/
  1519. {
  1520. jjtree.closeNodeScope(jjtn000, true);
  1521. jjtc000 = false;
  1522. jjtreeCloseNodeScope(jjtn000);
  1523. }
  1524. /*@egen*/
  1525. {
  1526. jjtn000.setDecimalValue(t.image);
  1527. }
  1528. |
  1529. t = <HEX_INTEGER_LITERAL>/*@bgen(jjtree)*/
  1530. {
  1531. jjtree.closeNodeScope(jjtn000, true);
  1532. jjtc000 = false;
  1533. jjtreeCloseNodeScope(jjtn000);
  1534. }
  1535. /*@egen*/
  1536. {
  1537. jjtn000.setHexValue(t.image);
  1538. }
  1539. |
  1540. t = <STRING_LITERAL>/*@bgen(jjtree)*/
  1541. {
  1542. jjtree.closeNodeScope(jjtn000, true);
  1543. jjtc000 = false;
  1544. jjtreeCloseNodeScope(jjtn000);
  1545. }
  1546. /*@egen*/
  1547. {
  1548. jjtn000.setStringValue(t.image);
  1549. }
  1550. |
  1551. t = <BOOLEAN_LITERAL>/*@bgen(jjtree)*/
  1552. {
  1553. jjtree.closeNodeScope(jjtn000, true);
  1554. jjtc000 = false;
  1555. jjtreeCloseNodeScope(jjtn000);
  1556. }
  1557. /*@egen*/
  1558. {
  1559. jjtn000.setBooleanValue(t.image);
  1560. }
  1561. |
  1562. t = <NULL_LITERAL>/*@bgen(jjtree)*/
  1563. {
  1564. jjtree.closeNodeScope(jjtn000, true);
  1565. jjtc000 = false;
  1566. jjtreeCloseNodeScope(jjtn000);
  1567. }
  1568. /*@egen*/
  1569. {
  1570. jjtn000.setNullValue();
  1571. }
  1572. |
  1573. t = <REGULAR_EXPRESSION_LITERAL>/*@bgen(jjtree)*/
  1574. {
  1575. jjtree.closeNodeScope(jjtn000, true);
  1576. jjtc000 = false;
  1577. jjtreeCloseNodeScope(jjtn000);
  1578. }
  1579. /*@egen*/
  1580. {
  1581. jjtn000.setRegexValue(t.image);
  1582. }
  1583. }
  1584. catch(ParseException pe) {
  1585. addException(pe);
  1586. }/*@bgen(jjtree)*/
  1587. } finally {
  1588. if (jjtc000) {
  1589. jjtree.closeNodeScope(jjtn000, true);
  1590. jjtreeCloseNodeScope(jjtn000);
  1591. }
  1592. }
  1593. /*@egen*/
  1594. }
  1595. void Identifier() :
  1596. {/*@bgen(jjtree) Identifier */
  1597. ASTIdentifier jjtn000 = new ASTIdentifier(JJTIDENTIFIER);
  1598. boolean jjtc000 = true;
  1599. jjtree.openNodeScope(jjtn000);
  1600. jjtreeOpenNodeScope(jjtn000);
  1601. /*@egen*/
  1602. Token t;
  1603. }
  1604. {/*@bgen(jjtree) Identifier */
  1605. try {
  1606. /*@egen*/
  1607. try {
  1608. t=<IDENTIFIER_NAME>/*@bgen(jjtree)*/
  1609. {
  1610. jjtree.closeNodeScope(jjtn000, true);
  1611. jjtc000 = false;
  1612. jjtreeCloseNodeScope(jjtn000);
  1613. }
  1614. /*@egen*/
  1615. {
  1616. jjtn000.setName(t.image);
  1617. }
  1618. }
  1619. catch(ParseException pe) {
  1620. addException(pe);
  1621. }/*@bgen(jjtree)*/
  1622. } finally {
  1623. if (jjtc000) {
  1624. jjtree.closeNodeScope(jjtn000, true);
  1625. jjtreeCloseNodeScope(jjtn000);
  1626. }
  1627. }
  1628. /*@egen*/
  1629. }
  1630. /* Section 11.1.4: Array Initialiser */
  1631. void ArrayLiteral() :
  1632. {/*@bgen(jjtree) ArrayLiteral */
  1633. ASTArrayLiteral jjtn000 = new ASTArrayLiteral(JJTARRAYLITERAL);
  1634. boolean jjtc000 = true;
  1635. jjtree.openNodeScope(jjtn000);
  1636. jjtreeOpenNodeScope(jjtn000);
  1637. /*@egen*/}
  1638. {/*@bgen(jjtree) ArrayLiteral */
  1639. try {
  1640. /*@egen*/
  1641. try {
  1642. "[" (
  1643. LOOKAHEAD(2) ( Elision() )? "]"
  1644. | LOOKAHEAD(ElementList() Elision()) ElementList() Elision() "]"
  1645. | ( ElementList() )? "]"
  1646. )
  1647. }
  1648. catch(ParseException pe) {
  1649. addException(pe);
  1650. }/*@bgen(jjtree)*/
  1651. } catch (Throwable jjte000) {
  1652. if (jjtc000) {
  1653. jjtree.clearNodeScope(jjtn000);
  1654. jjtc000 = false;
  1655. } else {
  1656. jjtree.popNode();
  1657. }
  1658. if (jjte000 instanceof RuntimeException) {
  1659. throw (RuntimeException)jjte000;
  1660. }
  1661. if (jjte000 instanceof ParseException) {
  1662. throw (ParseException)jjte000;
  1663. }
  1664. throw (Error)jjte000;
  1665. } finally {
  1666. if (jjtc000) {
  1667. jjtree.closeNodeScope(jjtn000, true);
  1668. jjtreeCloseNodeScope(jjtn000);
  1669. }
  1670. }
  1671. /*@egen*/
  1672. }
  1673. void ElementList() :
  1674. {}
  1675. {
  1676. try {
  1677. ( Elision() )? AssignmentExpression() ( LOOKAHEAD(Elision() AssignmentExpression()) Elision() AssignmentExpression())*
  1678. }
  1679. catch(ParseException pe) {
  1680. addException(pe);
  1681. }
  1682. }
  1683. void Elision() :
  1684. {}
  1685. {
  1686. try {
  1687. (",")+
  1688. }
  1689. catch(ParseException pe) {
  1690. addException(pe);
  1691. }
  1692. }
  1693. /* Section 11.1.5: Object Initialiser */
  1694. void ObjectLiteral() :
  1695. {/*@bgen(jjtree) ObjectLiteral */
  1696. ASTObjectLiteral jjtn000 = new ASTObjectLiteral(JJTOBJECTLITERAL);
  1697. boolean jjtc000 = true;
  1698. jjtree.openNodeScope(jjtn000);
  1699. jjtreeOpenNodeScope(jjtn000);
  1700. /*@egen*/}
  1701. {/*@bgen(jjtree) ObjectLiteral */
  1702. try {
  1703. /*@egen*/
  1704. try {
  1705. "{" ( PropertyNameAndValueList() )? "}"
  1706. }
  1707. catch(ParseException pe) {
  1708. addException(pe);
  1709. }/*@bgen(jjtree)*/
  1710. } catch (Throwable jjte000) {
  1711. if (jjtc000) {
  1712. jjtree.clearNodeScope(jjtn000);
  1713. jjtc000 = false;
  1714. } else {
  1715. jjtree.popNode();
  1716. }
  1717. if (jjte000 instanceof RuntimeException) {
  1718. throw (RuntimeException)jjte000;
  1719. }
  1720. if (jjte000 instanceof ParseException) {
  1721. throw (ParseException)jjte000;
  1722. }
  1723. throw (Error)jjte000;
  1724. } finally {
  1725. if (jjtc000) {
  1726. jjtree.closeNodeScope(jjtn000, true);
  1727. jjtreeCloseNodeScope(jjtn000);
  1728. }
  1729. }
  1730. /*@egen*/
  1731. }
  1732. void PropertyNameAndValueList() :
  1733. {}
  1734. {
  1735. try {
  1736. PropertyNameAndValue() ( LOOKAHEAD( "," PropertyNameAndValue()) "," PropertyNameAndValue() | "," )*
  1737. }
  1738. catch(ParseException pe) {
  1739. addException(pe);
  1740. }
  1741. }
  1742. void PropertyNameAndValue() :
  1743. {/*@bgen(jjtree) LiteralField */
  1744. ASTLiteralField jjtn000 = new ASTLiteralField(JJTLITERALFIELD);
  1745. boolean jjtc000 = true;
  1746. jjtree.openNodeScope(jjtn000);
  1747. jjtreeOpenNodeScope(jjtn000);
  1748. /*@egen*/}
  1749. {/*@bgen(jjtree) LiteralField */
  1750. try {
  1751. /*@egen*/
  1752. try {
  1753. PropertyName() ":" (LOOKAHEAD("function") FunctionExpression() | AssignmentExpression())
  1754. }
  1755. catch(ParseException pe) {
  1756. addException(pe);
  1757. }/*@bgen(jjtree)*/
  1758. } catch (Throwable jjte000) {
  1759. if (jjtc000) {
  1760. jjtree.clearNodeScope(jjtn000);
  1761. jjtc000 = false;
  1762. } else {
  1763. jjtree.popNode();
  1764. }
  1765. if (jjte000 instanceof RuntimeException) {
  1766. throw (RuntimeException)jjte000;
  1767. }
  1768. if (jjte000 instanceof ParseException) {
  1769. throw (ParseException)jjte000;
  1770. }
  1771. throw (Error)jjte000;
  1772. } finally {
  1773. if (jjtc000) {
  1774. jjtree.closeNodeScope(jjtn000, true);
  1775. jjtreeCloseNodeScope(jjtn000);
  1776. }
  1777. }
  1778. /*@egen*/
  1779. }
  1780. void PropertyName() :
  1781. {}
  1782. {
  1783. try {
  1784. Identifier()
  1785. |/*@bgen(jjtree) Literal */
  1786. {
  1787. ASTLiteral jjtn001 = new ASTLiteral(JJTLITERAL);
  1788. boolean jjtc001 = true;
  1789. jjtree.openNodeScope(jjtn001);
  1790. jjtreeOpenNodeScope(jjtn001);
  1791. }
  1792. try {
  1793. /*@egen*/
  1794. <STRING_LITERAL>/*@bgen(jjtree)*/
  1795. } finally {
  1796. if (jjtc001) {
  1797. jjtree.closeNodeScope(jjtn001, true);
  1798. jjtreeCloseNodeScope(jjtn001);
  1799. }
  1800. }
  1801. /*@egen*/
  1802. |/*@bgen(jjtree) Literal */
  1803. {
  1804. ASTLiteral jjtn002 = new ASTLiteral(JJTLITERAL);
  1805. boolean jjtc002 = true;
  1806. jjtree.openNodeScope(jjtn002);
  1807. jjtreeOpenNodeScope(jjtn002);
  1808. }
  1809. try {
  1810. /*@egen*/
  1811. <DECIMAL_LITERAL>/*@bgen(jjtree)*/
  1812. } finally {
  1813. if (jjtc002) {
  1814. jjtree.closeNodeScope(jjtn002, true);
  1815. jjtreeCloseNodeScope(jjtn002);
  1816. }
  1817. }
  1818. /*@egen*/
  1819. }
  1820. catch(ParseException pe) {
  1821. addException(pe);
  1822. }
  1823. }
  1824. /* Section 11.2: Left-Hand-Side Expressions */
  1825. void MemberExpression() :
  1826. {}
  1827. {
  1828. try {/*@bgen(jjtree) #CompositeReference(> 1) */
  1829. {
  1830. ASTCompositeReference jjtn001 = new ASTCompositeReference(JJTCOMPOSITEREFERENCE);
  1831. boolean jjtc001 = true;
  1832. jjtree.openNodeScope(jjtn001);
  1833. jjtreeOpenNodeScope(jjtn001);
  1834. }
  1835. try {
  1836. /*@egen*/
  1837. ( (
  1838. LOOKAHEAD("function") FunctionExpression()
  1839. | PrimaryExpression()
  1840. ) (LOOKAHEAD(2) MemberExpressionPart())* )/*@bgen(jjtree)*/
  1841. } catch (Throwable jjte001) {
  1842. if (jjtc001) {
  1843. jjtree.clearNodeScope(jjtn001);
  1844. jjtc001 = false;
  1845. } else {
  1846. jjtree.popNode();
  1847. }
  1848. if (jjte001 instanceof RuntimeException) {
  1849. throw (RuntimeException)jjte001;
  1850. }
  1851. if (jjte001 instanceof ParseException) {
  1852. throw (ParseException)jjte001;

Large files files are truncated, but you can click here to view the full file