Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ext/racc/com/headius/racc/Cparse.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void parse_main(ThreadContext context, IRubyObject tok, IRubyObject val,
i = assert_integer(tmp);

D_printf("read_next=%d\n", read_next);
if (read_next && (this.t != vFINAL_TOKEN)) {
if (read_next && (!this.t.equals(vFINAL_TOKEN))) {
if (this.lex_is_iterator) {
D_puts("resuming...");
if (this.fin != 0) throw runtime.newArgumentError("token given after EOF");
Expand Down Expand Up @@ -391,7 +391,7 @@ else if (act == this.shift_n) {

case USER_YYERROR:
if (this.errstatus == 3) {
if (this.t == vFINAL_TOKEN) {
if (this.t.equals(vFINAL_TOKEN)) {
this.retval = runtime.getFalse();
this.fin = CP_FIN_EOT;
return;
Expand Down Expand Up @@ -527,13 +527,13 @@ private IRubyObject reduce0(ThreadContext context) {
/* call action */
if (len == 0) {
tmp = context.nil;
if (mid != sym_noreduce)
if (!mid.equals(sym_noreduce))
tmp_v = runtime.newArray();
if (this.debug)
tmp_t = runtime.newArray();
}
else {
if (mid != sym_noreduce) {
if (!mid.equals(sym_noreduce)) {
tmp_v = GET_TAIL(context, this.vstack, len);
tmp = ((RubyArray)tmp_v).entry(0);
}
Expand All @@ -547,7 +547,7 @@ private IRubyObject reduce0(ThreadContext context) {
}
CUT_TAIL(context, this.state, len);
}
if (mid != sym_noreduce) {
if (!mid.equals(sym_noreduce)) {
if (this.use_result_var) {
tmp = Helpers.invoke(context, this.parser, mid.toString(), tmp_v, this.vstack, tmp);
}
Expand Down Expand Up @@ -590,7 +590,7 @@ private IRubyObject reduce0(ThreadContext context) {
D_puts("(goto) check[i] == nil");
branch = NOTFOUND; continue BRANCH;
}
if (tmp != runtime.newFixnum(k1)) {
if (!tmp.equals(runtime.newFixnum(k1))) {
D_puts("(goto) check[i] != table[i]");
branch = NOTFOUND; continue BRANCH;
}
Expand Down Expand Up @@ -759,7 +759,7 @@ public IRubyObject call(ThreadContext context, IRubyObject[] args, Block block)
}
}, context));
} catch (LexerUnroll maybeOurs) {
if (maybeOurs == lexerUnroll) {
if (maybeOurs.equals(lexerUnroll)) {
return;
}
}
Expand Down