summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eo_tokenizer.rl10
1 files changed, 6 insertions, 4 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl
index 355c524..0f2f2cf 100644
--- a/eo_tokenizer.rl
+++ b/eo_tokenizer.rl
@@ -56,11 +56,12 @@ _eo_tokenizer_token_get(Eo_Tokenizer *toknz, char *p)
}
action show_comment {
- DBG("comment[%d] %03d:%03d", toknz->cs, toknz->saved.line, toknz->current_line);
+ DBG("comment[%d] line%03d:%03d", toknz->cs,
+ toknz->saved.line, toknz->current_line);
}
action show_ignore {
- DBG("ignore[%d] %d", toknz->cs, toknz->current_line);
+ DBG("ignore[%d] line:%d", toknz->cs, toknz->current_line);
}
action show_error {
@@ -69,12 +70,13 @@ _eo_tokenizer_token_get(Eo_Tokenizer *toknz, char *p)
char buf[BUFSIZE];
for (s = fpc, d = buf; (s <= toknz->pe); s++)
{
- if ( (int)*s == 13 || (int)*s == 10)
+ if ((*s == '\r') || (*s == '\n'))
break;
*d++ = *s;
}
*d = '\0';
- ERR("error line %d : %s...", toknz->current_line, buf);
+ ERR("error nesting:%d line:%d : %s",
+ toknz->current_nesting, toknz->current_line, buf);
fbreak; /* necessary to stop scanners */
}