mirror of
https://github.com/DMaroo/GhidRust.git
synced 2025-09-10 04:53:36 +02:00
Add parsing and codegen for assignment and declaration
This commit is contained in:
@@ -4,6 +4,6 @@ import ghidrust.decompiler.parser.c.gen.CParser;
|
||||
|
||||
public class Run {
|
||||
public static void main(String[] args) {
|
||||
System.out.println(CParser.transpile("int main(int a, int b) { return 0; }"));
|
||||
System.out.println(CParser.transpile("int main(int a, int b) {\n int a = 5; int b = 3; a = 3; int c; return a + b;\n}"));
|
||||
}
|
||||
}
|
||||
|
@@ -25,6 +25,14 @@ public class CVisitor implements CParserVisitor {
|
||||
type_map.put("code", "code");
|
||||
}
|
||||
|
||||
private StringBuilder indent(StringBuilder sb) {
|
||||
for (int i = 0; i < indent_level; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
public Object defaultVisit(SimpleNode node, Object data) {
|
||||
StringBuilder sb = new StringBuilder("");
|
||||
|
||||
@@ -40,7 +48,7 @@ public class CVisitor implements CParserVisitor {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Object defaultSpacedVisit(SimpleNode node, Object data) {
|
||||
public Object defaultSpacedVisit(SimpleNode node, Object data, String separator, boolean last) {
|
||||
StringBuilder sb = new StringBuilder("");
|
||||
|
||||
int child_count = node.jjtGetNumChildren();
|
||||
@@ -49,8 +57,8 @@ public class CVisitor implements CParserVisitor {
|
||||
String ret = (String) child.jjtAccept(this, data);
|
||||
if (ret != null) {
|
||||
sb.append(ret);
|
||||
if (!ret.equals("") && i != child_count - 1) {
|
||||
sb.append(" ");
|
||||
if (!ret.equals("") && (last || i != child_count - 1)) {
|
||||
sb.append(separator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -91,7 +99,7 @@ public class CVisitor implements CParserVisitor {
|
||||
rust_code.append(" {\n");
|
||||
indent_level++;
|
||||
rust_code.append(node.jjtGetChild(2).jjtAccept(this, data));
|
||||
rust_code.append("\n}\n");
|
||||
rust_code.append("}\n");
|
||||
indent_level--;
|
||||
|
||||
return rust_code.toString();
|
||||
@@ -102,28 +110,32 @@ public class CVisitor implements CParserVisitor {
|
||||
String[] ret = (String[]) node.jjtGetChild(1).jjtAccept(this, data);
|
||||
|
||||
for (int i = 0; i < ret.length / 2; i++) {
|
||||
for (int j = 0; j < indent_level; j++) {
|
||||
sb.append("\t");
|
||||
if (i != 0) {
|
||||
sb = indent(sb);
|
||||
}
|
||||
|
||||
sb.append("let mut ");
|
||||
sb.append(ret[2 * i]);
|
||||
sb.append(": ");
|
||||
sb.append(node.jjtGetChild(0).jjtAccept(this, data));
|
||||
sb.append(" = ");
|
||||
sb.append(ret[2 * i + 1]);
|
||||
sb.append(";\n");
|
||||
if (ret[2 * i + 1] != null) {
|
||||
sb.append(" = ");
|
||||
sb.append(ret[2 * i + 1]);
|
||||
}
|
||||
sb.append(";");
|
||||
sb.append("\n");
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Object visit(ASTDeclarationList node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
StringBuilder sb = indent(new StringBuilder(""));
|
||||
return sb.toString() + defaultSpacedVisit(node, data, sb.toString(), false);
|
||||
}
|
||||
|
||||
public Object visit(ASTDeclarationSpecifiers node, Object data) {
|
||||
return defaultSpacedVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTInitDeclaratorList node, Object data) {
|
||||
@@ -239,7 +251,8 @@ public class CVisitor implements CParserVisitor {
|
||||
}
|
||||
|
||||
public Object visit(ASTStatement node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
StringBuilder sb = indent(new StringBuilder(""));
|
||||
return sb.toString() + defaultVisit(node, data);
|
||||
}
|
||||
|
||||
public Object visit(ASTLabeledStatement node, Object data) {
|
||||
@@ -255,7 +268,7 @@ public class CVisitor implements CParserVisitor {
|
||||
}
|
||||
|
||||
public Object visit(ASTStatementList node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, "\n", true);
|
||||
}
|
||||
|
||||
public Object visit(ASTSelectionStatement node, Object data) {
|
||||
@@ -268,11 +281,9 @@ public class CVisitor implements CParserVisitor {
|
||||
|
||||
public Object visit(ASTJumpStatement node, Object data) {
|
||||
StringBuilder sb = new StringBuilder("");
|
||||
for (int i = 0; i < indent_level; i++) {
|
||||
sb.append("\t");
|
||||
}
|
||||
|
||||
if (node.jjtGetNumChildren() > 0 && node.jjtGetChild(0) instanceof ASTExpression) {
|
||||
sb.append("return ");
|
||||
sb.append(node.jjtGetChild(0).jjtAccept(this, data));
|
||||
} else {
|
||||
sb.append(defaultVisit(node, data));
|
||||
@@ -281,71 +292,74 @@ public class CVisitor implements CParserVisitor {
|
||||
}
|
||||
|
||||
public Object visit(ASTExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
if (node.jjtGetChild(0) instanceof ASTAssignmentExpression) {
|
||||
return defaultSpacedVisit(node, data, " ", false) + ";";
|
||||
} else {
|
||||
ASTDeclaration decl = new ASTDeclaration(0);
|
||||
decl.jjtAddChild(node.jjtGetChild(0), 0);
|
||||
decl.jjtAddChild(node.jjtGetChild(1), 1);
|
||||
return decl.jjtAccept(this, data);
|
||||
}
|
||||
}
|
||||
|
||||
public Object visit(ASTAssignmentExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
}
|
||||
|
||||
public Object visit(ASTAssignmentOperator node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTConditionalExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTConstantExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTLogicalORExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTLogicalANDExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTInclusiveORExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTExclusiveORExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTANDExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTEqualityExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTRelationalExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTShiftExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTAdditiveExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTMultiplicativeExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTCastExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTUnaryExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTUnaryOperator node, Object data) {
|
||||
@@ -353,11 +367,11 @@ public class CVisitor implements CParserVisitor {
|
||||
}
|
||||
|
||||
public Object visit(ASTPostfixExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTPrimaryExpression node, Object data) {
|
||||
return defaultVisit(node, data);
|
||||
return defaultSpacedVisit(node, data, " ", false);
|
||||
}
|
||||
|
||||
public Object visit(ASTArgumentExpressionList node, Object data) {
|
||||
|
@@ -1,23 +0,0 @@
|
||||
package ghidrust.decompiler.parser.c.gen;
|
||||
|
||||
/* Generated By:JJTree: Do not edit this line. ASTAssignmentOperator.java Version 7.0 */
|
||||
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
|
||||
public
|
||||
class ASTAssignmentOperator extends SimpleNode {
|
||||
public ASTAssignmentOperator(int id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public ASTAssignmentOperator(CParser p, int id) {
|
||||
super(p, id);
|
||||
}
|
||||
|
||||
|
||||
/** Accept the visitor. **/
|
||||
public Object jjtAccept(CParserVisitor visitor, Object data) {
|
||||
|
||||
return
|
||||
visitor.visit(this, data);
|
||||
}
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=12f8178c7ddf074d791222ca3a98afdd (do not edit this line) */
|
@@ -2083,54 +2083,54 @@ if (jjtc000) {
|
||||
}
|
||||
}
|
||||
|
||||
final public void AssignmentOperator() throws ParseException {/*@bgen(jjtree) AssignmentOperator */
|
||||
ASTAssignmentOperator jjtn000 = new ASTAssignmentOperator(JJTASSIGNMENTOPERATOR);
|
||||
boolean jjtc000 = true;
|
||||
jjtree.openNodeScope(jjtn000);
|
||||
final public void AssignmentOperator() throws ParseException {/*@bgen(jjtree) StringToken */
|
||||
ASTStringToken jjtn000 = new ASTStringToken(JJTSTRINGTOKEN);
|
||||
boolean jjtc000 = true;
|
||||
jjtree.openNodeScope(jjtn000);Token t;
|
||||
try {
|
||||
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
|
||||
case 60:{
|
||||
jj_consume_token(60);
|
||||
t = jj_consume_token(60);
|
||||
break;
|
||||
}
|
||||
case 70:{
|
||||
jj_consume_token(70);
|
||||
t = jj_consume_token(70);
|
||||
break;
|
||||
}
|
||||
case 71:{
|
||||
jj_consume_token(71);
|
||||
t = jj_consume_token(71);
|
||||
break;
|
||||
}
|
||||
case 72:{
|
||||
jj_consume_token(72);
|
||||
t = jj_consume_token(72);
|
||||
break;
|
||||
}
|
||||
case 73:{
|
||||
jj_consume_token(73);
|
||||
t = jj_consume_token(73);
|
||||
break;
|
||||
}
|
||||
case 74:{
|
||||
jj_consume_token(74);
|
||||
t = jj_consume_token(74);
|
||||
break;
|
||||
}
|
||||
case 75:{
|
||||
jj_consume_token(75);
|
||||
t = jj_consume_token(75);
|
||||
break;
|
||||
}
|
||||
case 76:{
|
||||
jj_consume_token(76);
|
||||
t = jj_consume_token(76);
|
||||
break;
|
||||
}
|
||||
case 77:{
|
||||
jj_consume_token(77);
|
||||
t = jj_consume_token(77);
|
||||
break;
|
||||
}
|
||||
case 78:{
|
||||
jj_consume_token(78);
|
||||
t = jj_consume_token(78);
|
||||
break;
|
||||
}
|
||||
case 79:{
|
||||
jj_consume_token(79);
|
||||
t = jj_consume_token(79);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -2138,6 +2138,9 @@ if (jjtc000) {
|
||||
jj_consume_token(-1);
|
||||
throw new ParseException();
|
||||
}
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
jjtc000 = false;
|
||||
jjtn000.setValue(t.image);
|
||||
} finally {
|
||||
if (jjtc000) {
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
@@ -2568,25 +2571,12 @@ if (jjtc000) {
|
||||
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
|
||||
case 94:
|
||||
case 95:{
|
||||
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
|
||||
case 94:{
|
||||
jj_consume_token(94);
|
||||
break;
|
||||
}
|
||||
case 95:{
|
||||
jj_consume_token(95);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
jj_la1[60] = jj_gen;
|
||||
jj_consume_token(-1);
|
||||
throw new ParseException();
|
||||
}
|
||||
AdditionOperator();
|
||||
AdditiveExpression();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
jj_la1[61] = jj_gen;
|
||||
jj_la1[60] = jj_gen;
|
||||
;
|
||||
}
|
||||
} catch (Throwable jjte000) {
|
||||
@@ -2610,6 +2600,35 @@ if (jjtc000) {
|
||||
}
|
||||
}
|
||||
|
||||
final public void AdditionOperator() throws ParseException {/*@bgen(jjtree) StringToken */
|
||||
ASTStringToken jjtn000 = new ASTStringToken(JJTSTRINGTOKEN);
|
||||
boolean jjtc000 = true;
|
||||
jjtree.openNodeScope(jjtn000);Token t;
|
||||
try {
|
||||
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
|
||||
case 94:{
|
||||
t = jj_consume_token(94);
|
||||
break;
|
||||
}
|
||||
case 95:{
|
||||
t = jj_consume_token(95);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
jj_la1[61] = jj_gen;
|
||||
jj_consume_token(-1);
|
||||
throw new ParseException();
|
||||
}
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
jjtc000 = false;
|
||||
jjtn000.setValue(t.image);
|
||||
} finally {
|
||||
if (jjtc000) {
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final public void MultiplicativeExpression() throws ParseException {/*@bgen(jjtree) MultiplicativeExpression */
|
||||
ASTMultiplicativeExpression jjtn000 = new ASTMultiplicativeExpression(JJTMULTIPLICATIVEEXPRESSION);
|
||||
boolean jjtc000 = true;
|
||||
@@ -3244,12 +3263,9 @@ if (jjtc000) {
|
||||
finally { jj_save(21, xla); }
|
||||
}
|
||||
|
||||
private boolean jj_3R_LogicalORExpression_369_9_59()
|
||||
private boolean jj_3R_ConstantExpression_370_9_84()
|
||||
{
|
||||
if (jj_3R_LogicalANDExpression_374_9_93()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_LogicalORExpression_369_34_94()) jj_scanpos = xsp;
|
||||
if (jj_3R_ConditionalExpression_365_9_27()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3260,6 +3276,15 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ConditionalExpression_365_9_27()
|
||||
{
|
||||
if (jj_3R_LogicalORExpression_375_9_59()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_ConditionalExpression_365_33_60()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3_16()
|
||||
{
|
||||
if (jj_scan_token(ELSE)) return true;
|
||||
@@ -3267,29 +3292,14 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ConstantExpression_364_9_84()
|
||||
{
|
||||
if (jj_3R_ConditionalExpression_359_9_27()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ConditionalExpression_359_9_27()
|
||||
{
|
||||
if (jj_3R_LogicalORExpression_369_9_59()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_ConditionalExpression_359_33_60()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3_17()
|
||||
{
|
||||
if (jj_3R_UnaryExpression_425_9_25()) return true;
|
||||
if (jj_3R_AssignmentOperator_354_9_26()) return true;
|
||||
if (jj_3R_UnaryExpression_442_9_25()) return true;
|
||||
if (jj_3R_AssignmentOperator_357_9_26()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_AssignmentOperator_354_9_26()
|
||||
private boolean jj_3R_AssignmentOperator_357_9_26()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
@@ -3329,7 +3339,7 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3_18()
|
||||
{
|
||||
if (jj_3R_ConditionalExpression_359_9_27()) return true;
|
||||
if (jj_3R_ConditionalExpression_365_9_27()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3346,8 +3356,8 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3R_AssignmentExpression_348_9_103()
|
||||
{
|
||||
if (jj_3R_UnaryExpression_425_9_25()) return true;
|
||||
if (jj_3R_AssignmentOperator_354_9_26()) return true;
|
||||
if (jj_3R_UnaryExpression_442_9_25()) return true;
|
||||
if (jj_3R_AssignmentOperator_357_9_26()) return true;
|
||||
if (jj_3R_AssignmentExpression_348_9_66()) return true;
|
||||
return false;
|
||||
}
|
||||
@@ -3536,7 +3546,7 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3R_LabeledStatement_298_11_46()
|
||||
{
|
||||
if (jj_3R_Identifier_464_9_83()) return true;
|
||||
if (jj_3R_Identifier_481_9_83()) return true;
|
||||
if (jj_scan_token(69)) return true;
|
||||
return false;
|
||||
}
|
||||
@@ -3544,7 +3554,7 @@ if (jjtc000) {
|
||||
private boolean jj_3R_LabeledStatement_299_9_47()
|
||||
{
|
||||
if (jj_scan_token(CASE)) return true;
|
||||
if (jj_3R_ConstantExpression_364_9_84()) return true;
|
||||
if (jj_3R_ConstantExpression_370_9_84()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3582,7 +3592,7 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3R_DirectAbstractDeclarator_283_17_151()
|
||||
{
|
||||
if (jj_3R_ConstantExpression_364_9_84()) return true;
|
||||
if (jj_3R_ConstantExpression_370_9_84()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3651,7 +3661,7 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3R_DirectAbstractDeclarator_280_14_144()
|
||||
{
|
||||
if (jj_3R_ConstantExpression_364_9_84()) return true;
|
||||
if (jj_3R_ConstantExpression_370_9_84()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3775,7 +3785,7 @@ if (jjtc000) {
|
||||
private boolean jj_3R_IdentifierList_251_23_141()
|
||||
{
|
||||
if (jj_scan_token(59)) return true;
|
||||
if (jj_3R_Identifier_464_9_83()) return true;
|
||||
if (jj_3R_Identifier_481_9_83()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3840,7 +3850,7 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3R_IdentifierList_251_9_136()
|
||||
{
|
||||
if (jj_3R_Identifier_464_9_83()) return true;
|
||||
if (jj_3R_Identifier_481_9_83()) return true;
|
||||
Token xsp;
|
||||
while (true) {
|
||||
xsp = jj_scanpos;
|
||||
@@ -3926,7 +3936,7 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3R_DirectDeclarator_219_17_131()
|
||||
{
|
||||
if (jj_3R_ConstantExpression_364_9_84()) return true;
|
||||
if (jj_3R_ConstantExpression_370_9_84()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4003,7 +4013,7 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3R_DirectDeclarator_218_11_77()
|
||||
{
|
||||
if (jj_3R_Identifier_464_9_83()) return true;
|
||||
if (jj_3R_Identifier_481_9_83()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4291,7 +4301,7 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_429_70_92()
|
||||
private boolean jj_3R_UnaryExpression_446_70_92()
|
||||
{
|
||||
if (jj_scan_token(61)) return true;
|
||||
if (jj_3R_TypeName_267_9_28()) return true;
|
||||
@@ -4299,14 +4309,14 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ArgumentExpressionList_456_34_67()
|
||||
private boolean jj_3R_ArgumentExpressionList_473_34_67()
|
||||
{
|
||||
if (jj_scan_token(59)) return true;
|
||||
if (jj_3R_AssignmentExpression_348_9_66()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_Constant_475_9_127()
|
||||
private boolean jj_3R_Constant_492_9_127()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
@@ -4323,23 +4333,23 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_Identifier_464_9_83()
|
||||
private boolean jj_3R_Identifier_481_9_83()
|
||||
{
|
||||
if (jj_scan_token(IDENTIFIER)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PostfixExpression_439_31_65()
|
||||
private boolean jj_3R_PostfixExpression_456_31_65()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_PostfixExpression_439_31_99()) {
|
||||
if (jj_3R_PostfixExpression_456_31_99()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_PostfixExpression_440_9_100()) {
|
||||
if (jj_3R_PostfixExpression_457_9_100()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_PostfixExpression_441_9_101()) {
|
||||
if (jj_3R_PostfixExpression_458_9_101()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_PostfixExpression_442_9_102()) {
|
||||
if (jj_3R_PostfixExpression_459_9_102()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_scan_token(98)) {
|
||||
jj_scanpos = xsp;
|
||||
@@ -4352,7 +4362,7 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PostfixExpression_439_31_99()
|
||||
private boolean jj_3R_PostfixExpression_456_31_99()
|
||||
{
|
||||
if (jj_scan_token(63)) return true;
|
||||
if (jj_3R_Expression_343_9_95()) return true;
|
||||
@@ -4360,30 +4370,30 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ArgumentExpressionList_456_9_31()
|
||||
private boolean jj_3R_ArgumentExpressionList_473_9_31()
|
||||
{
|
||||
if (jj_3R_AssignmentExpression_348_9_66()) return true;
|
||||
Token xsp;
|
||||
while (true) {
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_ArgumentExpressionList_456_34_67()) { jj_scanpos = xsp; break; }
|
||||
if (jj_3R_ArgumentExpressionList_473_34_67()) { jj_scanpos = xsp; break; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3_22()
|
||||
{
|
||||
if (jj_3R_ArgumentExpressionList_456_9_31()) return true;
|
||||
if (jj_3R_ArgumentExpressionList_473_9_31()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PrimaryExpression_449_11_96()
|
||||
private boolean jj_3R_PrimaryExpression_466_11_96()
|
||||
{
|
||||
if (jj_3R_Identifier_464_9_83()) return true;
|
||||
if (jj_3R_Identifier_481_9_83()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PrimaryExpression_451_9_98()
|
||||
private boolean jj_3R_PrimaryExpression_468_9_98()
|
||||
{
|
||||
if (jj_scan_token(61)) return true;
|
||||
if (jj_3R_Expression_343_9_95()) return true;
|
||||
@@ -4393,90 +4403,78 @@ if (jjtc000) {
|
||||
|
||||
private boolean jj_3_20()
|
||||
{
|
||||
if (jj_3R_UnaryExpression_425_9_25()) return true;
|
||||
if (jj_3R_UnaryExpression_442_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PrimaryExpression_450_9_97()
|
||||
private boolean jj_3R_PrimaryExpression_467_9_97()
|
||||
{
|
||||
if (jj_3R_Constant_475_9_127()) return true;
|
||||
if (jj_3R_Constant_492_9_127()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PrimaryExpression_449_9_64()
|
||||
private boolean jj_3R_PrimaryExpression_466_9_64()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_PrimaryExpression_449_11_96()) {
|
||||
if (jj_3R_PrimaryExpression_466_11_96()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_PrimaryExpression_450_9_97()) {
|
||||
if (jj_3R_PrimaryExpression_467_9_97()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_PrimaryExpression_451_9_98()) return true;
|
||||
if (jj_3R_PrimaryExpression_468_9_98()) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PostfixExpression_440_15_128()
|
||||
private boolean jj_3R_PostfixExpression_457_15_128()
|
||||
{
|
||||
if (jj_3R_ArgumentExpressionList_456_9_31()) return true;
|
||||
if (jj_3R_ArgumentExpressionList_473_9_31()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PostfixExpression_442_9_102()
|
||||
private boolean jj_3R_PostfixExpression_459_9_102()
|
||||
{
|
||||
if (jj_scan_token(103)) return true;
|
||||
if (jj_3R_Identifier_464_9_83()) return true;
|
||||
if (jj_3R_Identifier_481_9_83()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PostfixExpression_441_9_101()
|
||||
private boolean jj_3R_PostfixExpression_458_9_101()
|
||||
{
|
||||
if (jj_scan_token(102)) return true;
|
||||
if (jj_3R_Identifier_464_9_83()) return true;
|
||||
if (jj_3R_Identifier_481_9_83()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_429_20_91()
|
||||
private boolean jj_3R_UnaryExpression_446_20_91()
|
||||
{
|
||||
if (jj_3R_UnaryExpression_425_9_25()) return true;
|
||||
if (jj_3R_UnaryExpression_442_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PostfixExpression_440_9_100()
|
||||
private boolean jj_3R_PostfixExpression_457_9_100()
|
||||
{
|
||||
if (jj_scan_token(61)) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_PostfixExpression_440_15_128()) jj_scanpos = xsp;
|
||||
if (jj_3R_PostfixExpression_457_15_128()) jj_scanpos = xsp;
|
||||
if (jj_scan_token(62)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_PostfixExpression_439_9_30()
|
||||
private boolean jj_3R_PostfixExpression_456_9_30()
|
||||
{
|
||||
if (jj_3R_PrimaryExpression_449_9_64()) return true;
|
||||
if (jj_3R_PrimaryExpression_466_9_64()) return true;
|
||||
Token xsp;
|
||||
while (true) {
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_PostfixExpression_439_31_65()) { jj_scanpos = xsp; break; }
|
||||
if (jj_3R_PostfixExpression_456_31_65()) { jj_scanpos = xsp; break; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_AdditiveExpression_409_38_158()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_scan_token(94)) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_scan_token(95)) return true;
|
||||
}
|
||||
if (jj_3R_AdditiveExpression_409_9_155()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryOperator_434_9_90()
|
||||
private boolean jj_3R_UnaryOperator_451_9_90()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
@@ -4499,7 +4497,7 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_MultiplicativeExpression_414_28_159()
|
||||
private boolean jj_3R_MultiplicativeExpression_431_28_159()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
@@ -4510,7 +4508,7 @@ if (jjtc000) {
|
||||
if (jj_scan_token(97)) return true;
|
||||
}
|
||||
}
|
||||
if (jj_3R_MultiplicativeExpression_414_9_157()) return true;
|
||||
if (jj_3R_MultiplicativeExpression_431_9_157()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4519,30 +4517,103 @@ if (jjtc000) {
|
||||
if (jj_scan_token(61)) return true;
|
||||
if (jj_3R_TypeName_267_9_28()) return true;
|
||||
if (jj_scan_token(62)) return true;
|
||||
if (jj_3R_CastExpression_419_9_29()) return true;
|
||||
if (jj_3R_CastExpression_436_9_29()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_429_9_58()
|
||||
private boolean jj_3R_UnaryExpression_446_9_58()
|
||||
{
|
||||
if (jj_scan_token(SIZEOF)) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_UnaryExpression_429_20_91()) {
|
||||
if (jj_3R_UnaryExpression_446_20_91()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_429_70_92()) return true;
|
||||
if (jj_3R_UnaryExpression_446_70_92()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_428_9_57()
|
||||
private boolean jj_3R_UnaryExpression_445_9_57()
|
||||
{
|
||||
if (jj_3R_UnaryOperator_434_9_90()) return true;
|
||||
if (jj_3R_CastExpression_419_9_29()) return true;
|
||||
if (jj_3R_UnaryOperator_451_9_90()) return true;
|
||||
if (jj_3R_CastExpression_436_9_29()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ShiftExpression_404_32_156()
|
||||
private boolean jj_3R_AdditiveExpression_415_38_158()
|
||||
{
|
||||
if (jj_3R_AdditionOperator_423_9_160()) return true;
|
||||
if (jj_3R_AdditiveExpression_415_9_155()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_444_9_56()
|
||||
{
|
||||
if (jj_scan_token(99)) return true;
|
||||
if (jj_3R_UnaryExpression_442_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3_21()
|
||||
{
|
||||
if (jj_3R_PostfixExpression_456_9_30()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_443_9_55()
|
||||
{
|
||||
if (jj_scan_token(98)) return true;
|
||||
if (jj_3R_UnaryExpression_442_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_442_9_25()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3_21()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_443_9_55()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_444_9_56()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_445_9_57()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_446_9_58()) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_CastExpression_436_11_62()
|
||||
{
|
||||
if (jj_scan_token(61)) return true;
|
||||
if (jj_3R_TypeName_267_9_28()) return true;
|
||||
if (jj_scan_token(62)) return true;
|
||||
if (jj_3R_CastExpression_436_9_29()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_CastExpression_437_9_63()
|
||||
{
|
||||
if (jj_3R_UnaryExpression_442_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_CastExpression_436_9_29()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_CastExpression_436_11_62()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_CastExpression_437_9_63()) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ShiftExpression_410_32_156()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
@@ -4550,66 +4621,20 @@ if (jjtc000) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_scan_token(93)) return true;
|
||||
}
|
||||
if (jj_3R_ShiftExpression_404_9_153()) return true;
|
||||
if (jj_3R_ShiftExpression_410_9_153()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_427_9_56()
|
||||
{
|
||||
if (jj_scan_token(99)) return true;
|
||||
if (jj_3R_UnaryExpression_425_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3_21()
|
||||
{
|
||||
if (jj_3R_PostfixExpression_439_9_30()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_426_9_55()
|
||||
{
|
||||
if (jj_scan_token(98)) return true;
|
||||
if (jj_3R_UnaryExpression_425_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_UnaryExpression_425_9_25()
|
||||
private boolean jj_3R_MultiplicativeExpression_431_9_157()
|
||||
{
|
||||
if (jj_3R_CastExpression_436_9_29()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3_21()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_426_9_55()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_427_9_56()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_428_9_57()) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_UnaryExpression_429_9_58()) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jj_3R_MultiplicativeExpression_431_28_159()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_CastExpression_419_11_62()
|
||||
{
|
||||
if (jj_scan_token(61)) return true;
|
||||
if (jj_3R_TypeName_267_9_28()) return true;
|
||||
if (jj_scan_token(62)) return true;
|
||||
if (jj_3R_CastExpression_419_9_29()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_CastExpression_420_9_63()
|
||||
{
|
||||
if (jj_3R_UnaryExpression_425_9_25()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_RelationalExpression_399_29_154()
|
||||
private boolean jj_3R_RelationalExpression_405_29_154()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
@@ -4623,11 +4648,11 @@ if (jjtc000) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (jj_3R_RelationalExpression_399_9_149()) return true;
|
||||
if (jj_3R_RelationalExpression_405_9_149()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_EqualityExpression_394_34_150()
|
||||
private boolean jj_3R_EqualityExpression_400_34_150()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
@@ -4635,73 +4660,89 @@ if (jjtc000) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_scan_token(87)) return true;
|
||||
}
|
||||
if (jj_3R_EqualityExpression_394_9_142()) return true;
|
||||
if (jj_3R_EqualityExpression_400_9_142()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_CastExpression_419_9_29()
|
||||
private boolean jj_3R_AdditionOperator_423_9_160()
|
||||
{
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_CastExpression_419_11_62()) {
|
||||
if (jj_scan_token(94)) {
|
||||
jj_scanpos = xsp;
|
||||
if (jj_3R_CastExpression_420_9_63()) return true;
|
||||
if (jj_scan_token(95)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_MultiplicativeExpression_414_9_157()
|
||||
{
|
||||
if (jj_3R_CastExpression_419_9_29()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_MultiplicativeExpression_414_28_159()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ANDExpression_389_32_143()
|
||||
private boolean jj_3R_ANDExpression_395_32_143()
|
||||
{
|
||||
if (jj_scan_token(85)) return true;
|
||||
if (jj_3R_ANDExpression_389_9_137()) return true;
|
||||
if (jj_3R_ANDExpression_395_9_137()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_AdditiveExpression_409_9_155()
|
||||
private boolean jj_3R_AdditiveExpression_415_9_155()
|
||||
{
|
||||
if (jj_3R_MultiplicativeExpression_414_9_157()) return true;
|
||||
if (jj_3R_MultiplicativeExpression_431_9_157()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_AdditiveExpression_409_38_158()) jj_scanpos = xsp;
|
||||
if (jj_3R_AdditiveExpression_415_38_158()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_InclusiveORExpression_379_35_134()
|
||||
private boolean jj_3R_InclusiveORExpression_385_35_134()
|
||||
{
|
||||
if (jj_scan_token(83)) return true;
|
||||
if (jj_3R_InclusiveORExpression_379_9_123()) return true;
|
||||
if (jj_3R_InclusiveORExpression_385_9_123()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ShiftExpression_404_9_153()
|
||||
private boolean jj_3R_ShiftExpression_410_9_153()
|
||||
{
|
||||
if (jj_3R_AdditiveExpression_409_9_155()) return true;
|
||||
if (jj_3R_AdditiveExpression_415_9_155()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_ShiftExpression_404_32_156()) jj_scanpos = xsp;
|
||||
if (jj_3R_ShiftExpression_410_32_156()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ExclusiveORExpression_384_27_138()
|
||||
private boolean jj_3R_ExclusiveORExpression_390_27_138()
|
||||
{
|
||||
if (jj_scan_token(84)) return true;
|
||||
if (jj_3R_ExclusiveORExpression_384_9_133()) return true;
|
||||
if (jj_3R_ExclusiveORExpression_390_9_133()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_LogicalANDExpression_374_35_124()
|
||||
private boolean jj_3R_LogicalANDExpression_380_35_124()
|
||||
{
|
||||
if (jj_scan_token(82)) return true;
|
||||
if (jj_3R_LogicalANDExpression_374_9_93()) return true;
|
||||
if (jj_3R_LogicalANDExpression_380_9_93()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_RelationalExpression_405_9_149()
|
||||
{
|
||||
if (jj_3R_ShiftExpression_410_9_153()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_RelationalExpression_405_29_154()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_EqualityExpression_400_9_142()
|
||||
{
|
||||
if (jj_3R_RelationalExpression_405_9_149()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_EqualityExpression_400_34_150()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_LogicalORExpression_375_34_94()
|
||||
{
|
||||
if (jj_scan_token(81)) return true;
|
||||
if (jj_3R_LogicalORExpression_375_9_59()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4712,73 +4753,57 @@ if (jjtc000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_RelationalExpression_399_9_149()
|
||||
private boolean jj_3R_ANDExpression_395_9_137()
|
||||
{
|
||||
if (jj_3R_ShiftExpression_404_9_153()) return true;
|
||||
if (jj_3R_EqualityExpression_400_9_142()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_RelationalExpression_399_29_154()) jj_scanpos = xsp;
|
||||
if (jj_3R_ANDExpression_395_32_143()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_EqualityExpression_394_9_142()
|
||||
private boolean jj_3R_ExclusiveORExpression_390_9_133()
|
||||
{
|
||||
if (jj_3R_RelationalExpression_399_9_149()) return true;
|
||||
if (jj_3R_ANDExpression_395_9_137()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_EqualityExpression_394_34_150()) jj_scanpos = xsp;
|
||||
if (jj_3R_ExclusiveORExpression_390_27_138()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_LogicalORExpression_369_34_94()
|
||||
{
|
||||
if (jj_scan_token(81)) return true;
|
||||
if (jj_3R_LogicalORExpression_369_9_59()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ANDExpression_389_9_137()
|
||||
{
|
||||
if (jj_3R_EqualityExpression_394_9_142()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_ANDExpression_389_32_143()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ExclusiveORExpression_384_9_133()
|
||||
{
|
||||
if (jj_3R_ANDExpression_389_9_137()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_ExclusiveORExpression_384_27_138()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_ConditionalExpression_359_33_60()
|
||||
private boolean jj_3R_ConditionalExpression_365_33_60()
|
||||
{
|
||||
if (jj_scan_token(80)) return true;
|
||||
if (jj_3R_Expression_343_9_95()) return true;
|
||||
if (jj_scan_token(69)) return true;
|
||||
if (jj_3R_ConditionalExpression_359_9_27()) return true;
|
||||
if (jj_3R_ConditionalExpression_365_9_27()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_InclusiveORExpression_379_9_123()
|
||||
private boolean jj_3R_InclusiveORExpression_385_9_123()
|
||||
{
|
||||
if (jj_3R_ExclusiveORExpression_384_9_133()) return true;
|
||||
if (jj_3R_ExclusiveORExpression_390_9_133()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_InclusiveORExpression_379_35_134()) jj_scanpos = xsp;
|
||||
if (jj_3R_InclusiveORExpression_385_35_134()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_LogicalANDExpression_374_9_93()
|
||||
private boolean jj_3R_LogicalANDExpression_380_9_93()
|
||||
{
|
||||
if (jj_3R_InclusiveORExpression_379_9_123()) return true;
|
||||
if (jj_3R_InclusiveORExpression_385_9_123()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_LogicalANDExpression_374_35_124()) jj_scanpos = xsp;
|
||||
if (jj_3R_LogicalANDExpression_380_35_124()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean jj_3R_LogicalORExpression_375_9_59()
|
||||
{
|
||||
if (jj_3R_LogicalANDExpression_380_9_93()) return true;
|
||||
Token xsp;
|
||||
xsp = jj_scanpos;
|
||||
if (jj_3R_LogicalORExpression_375_34_94()) jj_scanpos = xsp;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -108,9 +108,6 @@ public class CParserDefaultVisitor implements CParserVisitor{
|
||||
public Object visit(ASTAssignmentExpression node, Object data){
|
||||
return defaultVisit(node, data);
|
||||
}
|
||||
public Object visit(ASTAssignmentOperator node, Object data){
|
||||
return defaultVisit(node, data);
|
||||
}
|
||||
public Object visit(ASTConditionalExpression node, Object data){
|
||||
return defaultVisit(node, data);
|
||||
}
|
||||
@@ -166,4 +163,4 @@ public class CParserDefaultVisitor implements CParserVisitor{
|
||||
return defaultVisit(node, data);
|
||||
}
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=3e084c4d4fc2f72217d78b4001ae5330 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=02bd2f1bbfbe0abbaf156b1dcc67f14c (do not edit this line) */
|
||||
|
@@ -36,25 +36,24 @@ public interface CParserTreeConstants
|
||||
public int JJTJUMPSTATEMENT = 30;
|
||||
public int JJTEXPRESSION = 31;
|
||||
public int JJTASSIGNMENTEXPRESSION = 32;
|
||||
public int JJTASSIGNMENTOPERATOR = 33;
|
||||
public int JJTCONDITIONALEXPRESSION = 34;
|
||||
public int JJTCONSTANTEXPRESSION = 35;
|
||||
public int JJTLOGICALOREXPRESSION = 36;
|
||||
public int JJTLOGICALANDEXPRESSION = 37;
|
||||
public int JJTINCLUSIVEOREXPRESSION = 38;
|
||||
public int JJTEXCLUSIVEOREXPRESSION = 39;
|
||||
public int JJTANDEXPRESSION = 40;
|
||||
public int JJTEQUALITYEXPRESSION = 41;
|
||||
public int JJTRELATIONALEXPRESSION = 42;
|
||||
public int JJTSHIFTEXPRESSION = 43;
|
||||
public int JJTADDITIVEEXPRESSION = 44;
|
||||
public int JJTMULTIPLICATIVEEXPRESSION = 45;
|
||||
public int JJTCASTEXPRESSION = 46;
|
||||
public int JJTUNARYEXPRESSION = 47;
|
||||
public int JJTUNARYOPERATOR = 48;
|
||||
public int JJTPOSTFIXEXPRESSION = 49;
|
||||
public int JJTPRIMARYEXPRESSION = 50;
|
||||
public int JJTARGUMENTEXPRESSIONLIST = 51;
|
||||
public int JJTCONDITIONALEXPRESSION = 33;
|
||||
public int JJTCONSTANTEXPRESSION = 34;
|
||||
public int JJTLOGICALOREXPRESSION = 35;
|
||||
public int JJTLOGICALANDEXPRESSION = 36;
|
||||
public int JJTINCLUSIVEOREXPRESSION = 37;
|
||||
public int JJTEXCLUSIVEOREXPRESSION = 38;
|
||||
public int JJTANDEXPRESSION = 39;
|
||||
public int JJTEQUALITYEXPRESSION = 40;
|
||||
public int JJTRELATIONALEXPRESSION = 41;
|
||||
public int JJTSHIFTEXPRESSION = 42;
|
||||
public int JJTADDITIVEEXPRESSION = 43;
|
||||
public int JJTMULTIPLICATIVEEXPRESSION = 44;
|
||||
public int JJTCASTEXPRESSION = 45;
|
||||
public int JJTUNARYEXPRESSION = 46;
|
||||
public int JJTUNARYOPERATOR = 47;
|
||||
public int JJTPOSTFIXEXPRESSION = 48;
|
||||
public int JJTPRIMARYEXPRESSION = 49;
|
||||
public int JJTARGUMENTEXPRESSIONLIST = 50;
|
||||
|
||||
|
||||
public String[] jjtNodeName = {
|
||||
@@ -91,7 +90,6 @@ public interface CParserTreeConstants
|
||||
"JumpStatement",
|
||||
"Expression",
|
||||
"AssignmentExpression",
|
||||
"AssignmentOperator",
|
||||
"ConditionalExpression",
|
||||
"ConstantExpression",
|
||||
"LogicalORExpression",
|
||||
@@ -112,4 +110,4 @@ public interface CParserTreeConstants
|
||||
"ArgumentExpressionList",
|
||||
};
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=6481848a6a13fcbf09c2152866d8e998 (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=6fdc7fd778ad43f052fadf52075bfbaa (do not edit this line) */
|
||||
|
@@ -37,7 +37,6 @@ public interface CParserVisitor
|
||||
public Object visit(ASTJumpStatement node, Object data);
|
||||
public Object visit(ASTExpression node, Object data);
|
||||
public Object visit(ASTAssignmentExpression node, Object data);
|
||||
public Object visit(ASTAssignmentOperator node, Object data);
|
||||
public Object visit(ASTConditionalExpression node, Object data);
|
||||
public Object visit(ASTConstantExpression node, Object data);
|
||||
public Object visit(ASTLogicalORExpression node, Object data);
|
||||
@@ -57,4 +56,4 @@ public interface CParserVisitor
|
||||
public Object visit(ASTPrimaryExpression node, Object data);
|
||||
public Object visit(ASTArgumentExpressionList node, Object data);
|
||||
}
|
||||
/* JavaCC - OriginalChecksum=268378ad65a278fa22d6bd4787195a5f (do not edit this line) */
|
||||
/* JavaCC - OriginalChecksum=1f05897c3d57918f597035227f8d60dd (do not edit this line) */
|
||||
|
@@ -1189,15 +1189,26 @@ void AssignmentExpression() : {/*@bgen(jjtree) AssignmentExpression */
|
||||
/*@egen*/
|
||||
}
|
||||
|
||||
void AssignmentOperator() : {/*@bgen(jjtree) AssignmentOperator */
|
||||
ASTAssignmentOperator jjtn000 = new ASTAssignmentOperator(JJTASSIGNMENTOPERATOR);
|
||||
boolean jjtc000 = true;
|
||||
jjtree.openNodeScope(jjtn000);
|
||||
/*@egen*/}
|
||||
{/*@bgen(jjtree) AssignmentOperator */
|
||||
void AssignmentOperator() :
|
||||
{/*@bgen(jjtree) StringToken */
|
||||
ASTStringToken jjtn000 = new ASTStringToken(JJTSTRINGTOKEN);
|
||||
boolean jjtc000 = true;
|
||||
jjtree.openNodeScope(jjtn000);
|
||||
/*@egen*/
|
||||
Token t;
|
||||
}
|
||||
{/*@bgen(jjtree) StringToken */
|
||||
try {
|
||||
/*@egen*/
|
||||
( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "|=" )/*@bgen(jjtree)*/
|
||||
( t = "=" | t = "*=" | t = "/=" | t = "%=" | t = "+=" | t = "-=" | t = "<<=" | t = ">>=" | t = "&=" | t = "^=" | t = "|=" )/*@bgen(jjtree)*/
|
||||
{
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
jjtc000 = false;
|
||||
}
|
||||
/*@egen*/
|
||||
{
|
||||
jjtn000.setValue(t.image);
|
||||
}/*@bgen(jjtree)*/
|
||||
} finally {
|
||||
if (jjtc000) {
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
@@ -1524,7 +1535,7 @@ void AdditiveExpression() : {/*@bgen(jjtree) AdditiveExpression */
|
||||
{/*@bgen(jjtree) AdditiveExpression */
|
||||
try {
|
||||
/*@egen*/
|
||||
MultiplicativeExpression() [ ( "+" | "-" ) AdditiveExpression() ]/*@bgen(jjtree)*/
|
||||
MultiplicativeExpression() [ AdditionOperator() AdditiveExpression() ]/*@bgen(jjtree)*/
|
||||
} catch (Throwable jjte000) {
|
||||
if (jjtc000) {
|
||||
jjtree.clearNodeScope(jjtn000);
|
||||
@@ -1547,6 +1558,34 @@ void AdditiveExpression() : {/*@bgen(jjtree) AdditiveExpression */
|
||||
/*@egen*/
|
||||
}
|
||||
|
||||
void AdditionOperator() :
|
||||
{/*@bgen(jjtree) StringToken */
|
||||
ASTStringToken jjtn000 = new ASTStringToken(JJTSTRINGTOKEN);
|
||||
boolean jjtc000 = true;
|
||||
jjtree.openNodeScope(jjtn000);
|
||||
/*@egen*/
|
||||
Token t;
|
||||
}
|
||||
{/*@bgen(jjtree) StringToken */
|
||||
try {
|
||||
/*@egen*/
|
||||
( t = "+" | t = "-" )/*@bgen(jjtree)*/
|
||||
{
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
jjtc000 = false;
|
||||
}
|
||||
/*@egen*/
|
||||
{
|
||||
jjtn000.setValue(t.image);
|
||||
}/*@bgen(jjtree)*/
|
||||
} finally {
|
||||
if (jjtc000) {
|
||||
jjtree.closeNodeScope(jjtn000, true);
|
||||
}
|
||||
}
|
||||
/*@egen*/
|
||||
}
|
||||
|
||||
void MultiplicativeExpression() : {/*@bgen(jjtree) MultiplicativeExpression */
|
||||
ASTMultiplicativeExpression jjtn000 = new ASTMultiplicativeExpression(JJTMULTIPLICATIVEEXPRESSION);
|
||||
boolean jjtc000 = true;
|
||||
|
@@ -349,9 +349,15 @@ void AssignmentExpression() : {}
|
||||
LOOKAHEAD(3) ConditionalExpression()
|
||||
}
|
||||
|
||||
void AssignmentOperator() : {}
|
||||
void AssignmentOperator() #StringToken :
|
||||
{
|
||||
( "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | "&=" | "^=" | "|=" )
|
||||
Token t;
|
||||
}
|
||||
{
|
||||
( t = "=" | t = "*=" | t = "/=" | t = "%=" | t = "+=" | t = "-=" | t = "<<=" | t = ">>=" | t = "&=" | t = "^=" | t = "|=" )
|
||||
{
|
||||
jjtThis.setValue(t.image);
|
||||
}
|
||||
}
|
||||
|
||||
void ConditionalExpression() : {}
|
||||
@@ -406,7 +412,18 @@ void ShiftExpression() : {}
|
||||
|
||||
void AdditiveExpression() : {}
|
||||
{
|
||||
MultiplicativeExpression() [ ( "+" | "-" ) AdditiveExpression() ]
|
||||
MultiplicativeExpression() [ AdditionOperator() AdditiveExpression() ]
|
||||
}
|
||||
|
||||
void AdditionOperator() #StringToken :
|
||||
{
|
||||
Token t;
|
||||
}
|
||||
{
|
||||
( t = "+" | t = "-" )
|
||||
{
|
||||
jjtThis.setValue(t.image);
|
||||
}
|
||||
}
|
||||
|
||||
void MultiplicativeExpression() : {}
|
||||
|
Reference in New Issue
Block a user