/* Generated By:JavaCC: Do not edit this line. CobolParser.java */
package com.res.cobol.parser;
import com.res.common.RESConfig;
import com.res.cobol.syntaxtree.*;
import java.util.Vector;
public class CobolParser implements CobolParserConstants {
private boolean notFollowedByEndExec()
{
int i = 1;
while ( getToken(i).kind == COBOL_WORD || getToken(i).kind == IN|| getToken(i).kind == OF )
{
i = skipSubscripts(++i);
if ( getToken(i).kind == PLUSCHAR || getToken(i).kind == MINUSCHAR|| getToken(i).kind == ASTERISKCHAR|| getToken(i).kind == SLASHCHAR )
return false;
}
return true;
}
private boolean notFollowedByOp()
{
int i = 1;
Token t;
while ( canBeIdentifierOrNumber(t = getToken(i)) )
{
i = skipSubscripts(++i);
if ( (t = getToken(i)).kind == PLUSCHAR || t.kind == PLUSCHAR_SUBS|| t.kind == MINUSCHAR_SUBS|| t.kind == ASTERISKCHAR|| t.kind == SLASHCHAR )
return false;
}
return true;
}
private boolean notFollowedByRelOp()
{
int i = 1;
Token t;
while ( canBeIdentifierOrNumber(t = getToken(i)) )
{
i = skipSubscripts(++i);
if ( (t = getToken(i)).kind == LESSTHANCHAR || t.kind == MORETHANCHAR|| t.kind == GREATER|| t.kind == LESS|| t.kind == EQUALCHAR|| t.kind == EQUAL|| t.kind == EQUALS|| t.kind == EQUALS|| t.kind == NOTEQUALCHAR|| t.kind == NOT )
return false;
}
return true;
}
private boolean canBeIdentifierOrNumber(Token t)
{
return t.kind == COBOL_WORD || t.kind == IN|| t.kind == OF|| t.kind == IS|| t.kind == LEVEL_66|| t.kind == LEVEL_77|| t.kind == LEVEL_78|| t.kind == LEVEL_88|| t.kind == LEVEL_NUMBER|| t.kind == INTEGER|| t.kind == COMMA_INTEGER|| t.kind == MINUSCHAR|| t.kind == MINUSCHAR_SUBS|| t.kind == LPARENCHAR|| t.kind == DOTCHAR;
}
private int skipSubscripts(int i)
{
if ( getToken(i).kind == LPARENCHAR )
{
while ( getToken(++i).kind != RPARENCHAR && getToken(i).kind != DOT )
;
if ( getToken(++i).kind == RPARENCHAR )
i++;
}
return i;
}
class SkipToEndExec extends NodeList
{
public SkipToEndExec(NodeList n0)
{
super();
super.nodes.addAll(n0.nodes);
if ( n0 != null )
super.setParent(this);
}
public SkipToEndExec()
{
}
public void accept(com.res.cobol.visitor.Visitor v)
{
v.visit(this);
}
public void setParent(Node n)
{
super.setParent(n);
}
public Node getParent()
{
return super.getParent();
}
}
final public CobolWord CobolWord() throws ParseException {
trace_call("CobolWord");
try {
NodeToken n0;
Token n1;
try {
n1 = jj_consume_token(COBOL_WORD);
n0 = JTBToolkit.makeNodeToken(n1);
} catch (ParseException e) {
error_skipto(DOT); {if (true) return new CobolWord();}
}
{if (true) return new CobolWord(n0);}
throw new Error("Missing return statement in function");
} finally {
trace_return("CobolWord");
}
}
final public IntegerConstant IntegerConstant() throws ParseException {
trace_call("IntegerConstant");
try {
NodeChoice n0;
NodeToken n1;
Token n2;
NodeToken n3;
Token n4;
NodeToken n5;
Token n6;
NodeToken n7;
Token n8;
NodeToken n9;
Token n10;
NodeToken n11;
Token n12;
NodeToken n13;
Token n14;
try {
if (jj_2_1(2)) {
n2 = jj_consume_token(LEVEL_66);
n1 = JTBToolkit.makeNodeToken(n2);
n0 = new NodeChoice(n1, 0);
} else if (jj_2_2(2)) {
n4 = jj_consume_token(LEVEL_77);
n3 = JTBToolkit.makeNodeToken(n4);
n0 = new NodeChoice(n3, 1);
} else if (jj_2_3(2)) {
n6 = jj_consume_token(LEVEL_78);
n5 = JTBToolkit.makeNodeToken(n6);
n0 = new NodeChoice(n5, 2);
} else if (jj_2_4(2)) {
n8 = jj_consume_token(LEVEL_88);
n7 = JTBToolkit.makeNodeToken(n8);
n0 = new NodeChoice(n7, 3);
} else if (jj_2_5(2)) {
n10 = jj_consume_token(LEVEL_NUMBER);
n9 = JTBToolkit.makeNodeToken(n10);
n0 = new NodeChoice(n9, 4);
} else if (jj_2_6(2)) {
n12 = jj_consume_token(INTEGER);
n11 = JTBToolkit.makeNodeToken(n12);
n0 = new NodeChoice(n11, 5);
} else if (jj_2_7(2)) {
n14 = jj_consume_token(COMMA_INTEGER);
n13 = JTBToolkit.makeNodeToken(n14);
n0 = new NodeChoice(n13, 6);
} else {
jj_consume_token(-1);
throw new ParseException();
}
} catch (ParseException e) {
error_skipto(DOT); {if (true) return new IntegerConstant();}
}
{if (true) return new IntegerConstant(n0);}
throw new Error("Missing return statement in function");
} finally {
trace_return("IntegerConstant");
}
}
final public NumericConstant NumericConstant() throws ParseException {
trace_call("NumericConstant");
try {
NodeOptional n0 = new NodeOptional();
NodeChoice n1;
NodeToken n2;
Token n3;
NodeToken n4;
Token n5;
NodeChoice n6;
NodeSequence n7;
IntegerConstant n8;
NodeToken n9;
Token n10;
NodeOptional n11 = new NodeOptional();
IntegerConstant n12;
NodeSequence n13;
NodeToken n14;
Token n15;
IntegerConstant n16;
IntegerConstant n17;
try {
if (jj_2_10(2)) {
if (jj_2_8(2)) {
n3 = jj_consume_token(PLUSCHAR);
n2 = JTBToolkit.makeNodeToken(n3);
n1 = new NodeChoice(n2, 0);
} else if (jj_2_9(2)) {
n5 = jj_consume_token(MINUSCHAR);
n4 = JTBToolkit.makeNodeToken(n5);
n1 = new NodeChoice(n4, 1);
} else {
jj_consume_token(-1);
throw new ParseException();
}
n0.addNode(n1);
} else {
;
}
if (jj_2_12(2147483647)) {
n7 = new NodeSequence(4);
n8 = IntegerConstant();
n7.addNode(n8);
n10 = jj_consume_token(DOTCHAR);
n9 = JTBToolkit.makeNodeToken(n10);
n7.addNode(n9);
if (jj_2_11(2)) {
n12 = IntegerConstant();
n11.addNode(n12);
} else {
;
}
n7.addNode(n11);
n6 = new NodeChoice(n7, 0);
} else if (jj_2_13(2147483647)) {
n13 = new NodeSequence(3);
n15 = jj_consume_token(DOTCHAR);
n14 = JTBToolkit.makeNodeToken(n15);
n13.addNode(n14);
n16 = IntegerConstant();
n13.addNode(n16);
n6 = new NodeChoice(n13, 1);
} else if (jj_2_14(2147483647)) {
n17 = IntegerConstant();
n6 = new NodeChoice(n17, 2);
} else {
jj_consume_token(-1);
throw new ParseException();
}
} catch (ParseException e) {
error_skipto(DOT); {if (true) return new NumericConstant();}
}
{if (true) return new NumericConstant(n0,n6);}
throw new Error("Missing return statement in function");
} finally {
trace_return("NumericConstant");
}
}
final public LevelNumber LevelNumber() throws ParseException {
trace_call("LevelNumber");
try {
NodeToken n0;
Token n1;
try {
n1 = jj_consume_token(LEVEL_NUMBER);
n0 = JTBT
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论















收起资源包目录





































































































共 639 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论


lllyg
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


会员权益专享
最新资源
- .archivetemp足球分析安装4.3.msi
- 单文件获取摄像头动作侦测信息,资源占用少,随地部署,有外联钩子,发生动作可访问指定网址
- Apress.Advanced.Social.Media.Marketing.Dec.2012
- 2022年中华人民共和国县以上行政区划代码
- GPT聊天工具.apk
- 真由光伏、蓄电池及负载组成的独立直流微电网,提出电压和电流分段式协同控制策略 该控制策略将能量管理划分为 4 种工作模式,采用最
- 光伏储能交直流微电网Matlab/simulink仿真模型
- 光伏MPPT控制算法仿真模型
- lmsq_v2.3.38.5_release_2338_jiagu_sign(4).apk
- 鞋go 1.1.0.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
