⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parser.cup

📁 该工具也是用于字节码插桩
💻 CUP
字号:
/* * Parser.cup * * Parser for the Table format. * * See LICENSE file for license conditions. */package residue.tables;import java_cup.runtime.*;import java.util.*;terminal Integer NUMBER;terminal String STRING;terminal SEMICOLON, STARTPROBED, STARTREFERENCED, STARTROOTS;non terminal Table table;non terminal TableEntry probedline, referencedline;non terminal List probedlines, referencedlines;non terminal Set intlist, rootset;start with table;table ::= STARTPROBED          probedlines:pl          STARTREFERENCED          referencedlines:rl	  STARTROOTS	  rootset:rs           {:              RESULT = new Table(pl, rl, rs);          :};rootset ::= rootset:rs STRING:st  {: rs.add(st); RESULT = rs; :}	  |                       {: RESULT = new TreeSet();  :}	  ;probedlines ::= probedlines:pl probedline:p  {: pl.add(p); RESULT = pl;   :}              |                              {: RESULT = new ArrayList(); :}              ;probedline ::= NUMBER:index               NUMBER:ref               STRING:classname               STRING:methodname               NUMBER:start               NUMBER:probe               NUMBER:end               STRING:sourcename               intlist:lines               SEMICOLON               {:                   RESULT = new TableEntry(index,                                           ref,                                           classname,                                           methodname,                                           start,                                           probe,                                           end,                                           sourcename,                                           lines);               :};referencedlines ::= referencedlines:rl referencedline:r  {: rl.add(r); RESULT = rl;   :}                  |                                      {: RESULT = new ArrayList(); :}                  ;referencedline ::= NUMBER:index                   NUMBER:ref                   STRING:classname                   STRING:methodname                   NUMBER:start                   NUMBER:end                   STRING:sourcename                   intlist:lines                   SEMICOLON                   {:                       RESULT = new TableEntry(index,                                               ref,                                               classname,                                               methodname,                                               start,                                               end,                                               sourcename,                                               lines);                   :};intlist ::= intlist:il NUMBER:n  {: il.add(n); RESULT = il; :}          |  {: RESULT = new HashSet(); :}          ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -