summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-11-25 11:19:01 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-11-25 11:19:01 +0100
commit3fb65bfe9c03d2adf098435fe6be559aaaeb1d4f (patch)
tree886114d22077de43d48b56c68657b96062b50c41
parentf1b53db468e6e5fba2d672cde32cc5c5f091972b (diff)
downloadeo_tokenizer-3fb65bfe9c03d2adf098435fe6be559aaaeb1d4f.zip
eo_tokenizer-3fb65bfe9c03d2adf098435fe6be559aaaeb1d4f.tar.gz
minor cleanups
-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 */
}