projects
/
henge
/
apc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7dae7dc
)
filename terminator is now a .
author
Jordan
<jordanlavatai@gmail.com>
Tue, 17 Jan 2017 01:26:35 +0000
(17:26 -0800)
committer
Jordan
<jordanlavatai@gmail.com>
Tue, 17 Jan 2017 01:26:35 +0000
(17:26 -0800)
src/lexer.rl
patch
|
blob
|
history
diff --git
a/src/lexer.rl
b/src/lexer.rl
index
920d62d
..
83915ec
100644
(file)
--- a/
src/lexer.rl
+++ b/
src/lexer.rl
@@
-113,7
+113,7
@@
uint8_t lval_offs;
tok = (name | val | ref | dimensions | map | link | SS | direction);
tok = (name | val | ref | dimensions | map | link | SS | direction);
- main := (tok tok_delimiter)* tok [
\0
];
+ main := (tok tok_delimiter)* tok [
.
];
write data nofinal noerror noprefix;
write data nofinal noerror noprefix;
@@
-159,6
+159,7
@@
int lexer_lexfile
{ uint8_t* last_period,* iter,* filename_end;
int ntok;
last_period = NULL;
{ uint8_t* last_period,* iter,* filename_end;
int ntok;
last_period = NULL;
+ printf("size of file = %d\n", u8_strlen(filename));
for (iter = filename; *iter; iter++)
switch (*iter)
{ // Keep track of the last 'dot' in the name
for (iter = filename; *iter; iter++)
switch (*iter)
{ // Keep track of the last 'dot' in the name
@@
-174,6
+175,7
@@
int lexer_lexfile
ntok = (last_period) ?
lexer_lexstring(filename, (int)(last_period - filename))
: lexer_lexstring(filename, (int)(iter - filename));
ntok = (last_period) ?
lexer_lexstring(filename, (int)(last_period - filename))
: lexer_lexstring(filename, (int)(iter - filename));
+
// Replace nulls with their original '_'
for (iter = filename; iter < filename_end; iter++)
if (*iter == '\0')
// Replace nulls with their original '_'
for (iter = filename; iter < filename_end; iter++)
if (*iter == '\0')