Skip to content

Commit

Permalink
Work on external SLIF scanner: t+
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Kegler committed Apr 1, 2013
1 parent 3d147d1 commit c360839
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions r2/xs/R2.xs
Expand Up @@ -1696,6 +1696,7 @@ slr_alternatives (Scanless_R * slr,
g1_lexeme = slr->slg->g0_rule_to_g1_lexeme[rule_id];
if (g1_lexeme == -1)
goto NEXT_PASS1_REPORT_ITEM;
slr->end_of_lexeme = slr->start_of_lexeme + earley_set;
/* -2 means a discarded item */
if (g1_lexeme <= -2)
{
Expand Down Expand Up @@ -1789,21 +1790,6 @@ slr_alternatives (Scanless_R * slr,
if (g1_lexeme <= -2)
{
lexemes_discarded++;
if (slr->trace_terminals)
{
AV *event;
SV *event_data[4];
event_data[0] = newSVpvs ("discarded lexeme");
/* We do not have the lexeme, but we have the
* g0 rule.
* The upper level will have to figure things out.
*/
event_data[1] = newSViv (rule_id);
event_data[2] = newSViv (slr->start_of_lexeme);
event_data[3] = newSViv (slr->end_of_lexeme);
event = av_make (Dim (event_data), event_data);
av_push (slr->event_queue, newRV_noinc ((SV *) event));
}
goto NEXT_REPORT_ITEM;
}

Expand Down

0 comments on commit c360839

Please sign in to comment.