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:
25a23e5
)
commented debug prints
author
ken
<ken@mihrtec.com>
Mon, 16 Jan 2017 01:28:59 +0000
(17:28 -0800)
committer
ken
<ken@mihrtec.com>
Mon, 16 Jan 2017 01:28:59 +0000
(17:28 -0800)
src/ir.c
patch
|
blob
|
history
src/lexer.rl
patch
|
blob
|
history
diff --git
a/src/ir.c
b/src/ir.c
index
ebb2545
..
ff82d01
100644
(file)
--- a/
src/ir.c
+++ b/
src/ir.c
@@
-220,7
+220,6
@@
struct ir_class_t* ir_class_addchild
const uint8_t* name
\r
)
\r
{ struct ir_class_t* iter;
\r
const uint8_t* name
\r
)
\r
{ struct ir_class_t* iter;
\r
- printf("Class %s, addchild %s\n", class->name, name);
\r
if (class->nextchild == NULL)
\r
goto alloc;
\r
iter = class->nextchild;
\r
if (class->nextchild == NULL)
\r
goto alloc;
\r
iter = class->nextchild;
\r
@@
-251,7
+250,6
@@
struct ir_set_t* ir_class_addset
const uint8_t* name
\r
)
\r
{ struct ir_set_t* iter;
\r
const uint8_t* name
\r
)
\r
{ struct ir_set_t* iter;
\r
- printf("Class %s, addset %s\n", class->name, name);
\r
if (class->root_set == NULL)
\r
goto alloc;
\r
iter = class->root_set;
\r
if (class->root_set == NULL)
\r
goto alloc;
\r
iter = class->root_set;
\r
@@
-282,7
+280,6
@@
struct ir_set_t* ir_set_addchild
const uint8_t* name
\r
)
\r
{ struct ir_set_t* iter;
\r
const uint8_t* name
\r
)
\r
{ struct ir_set_t* iter;
\r
- printf("Set %s, addchild %s\n", set->name, name);
\r
if (set->nextchild == NULL)
\r
goto alloc;
\r
iter = set->nextchild;
\r
if (set->nextchild == NULL)
\r
goto alloc;
\r
iter = set->nextchild;
\r
diff --git
a/src/lexer.rl
b/src/lexer.rl
index
6bb1d1b
..
b56ac48
100644
(file)
--- a/
src/lexer.rl
+++ b/
src/lexer.rl
@@
-24,10
+24,9
@@
static
uint8_t lval_offs;
#define PUSHTOK(T,L) yypush_parse(pstate, T, (L), cstate)
#define LEXTOK(T,Y,L) do { \
uint8_t lval_offs;
#define PUSHTOK(T,L) yypush_parse(pstate, T, (L), cstate)
#define LEXTOK(T,Y,L) do { \
- printf("lval[%i]\n",lval_offs);\
- lval_stack[lval_offs].Y = L; \
- PUSHTOK(T,lval_stack + lval_offs); \
- lval_offs = (lval_offs + 1); \
+ lval_stack[lval_offs].Y = L; \
+ PUSHTOK(T,lval_stack + lval_offs); \
+ lval_offs++; \
ntok++; \
} while (0);
#define PUSHFACE(F) LEXTOK(FACING, face, F)
ntok++; \
} while (0);
#define PUSHFACE(F) LEXTOK(FACING, face, F)
@@
-63,44
+62,46
@@
uint8_t lval_offs;
}
PUSHNUM(lval.val);
}
}
PUSHNUM(lval.val);
}
- action push_name { printf("Lexer_lexstring:: action:push_name: from %s to %s\n", ts, p);
+ action push_name {
//
printf("Lexer_lexstring:: action:push_name: from %s to %s\n", ts, p);
PUSHNAME(ts);
}
PUSHNAME(ts);
}
- action push_map { printf("Lexer_lexstring:: action:push_map: pushing map token\n");
+ action push_map {
//
printf("Lexer_lexstring:: action:push_map: pushing map token\n");
PUSHOP(MAP);
}
PUSHOP(MAP);
}
- action set_ts { printf("Lexer_lexstring:: action:set_ts. ts = %s\n", p); ts = p; }
- action push_SS { printf("Lexer_lexstring:: action:push_SS. p = %s\n",p);
+ action set_ts { //printf("Lexer_lexstring:: action:set_ts. ts = %s\n", p);
+ ts = p; }
+ action push_SS { //printf("Lexer_lexstring:: action:push_SS. p = %s\n",p);
PUSHOP(SS);
}
PUSHOP(SS);
}
- action push_S { printf("Lexer_lexstring:: action:push_S. p = %s\n", p);
+ action push_S {
//
printf("Lexer_lexstring:: action:push_S. p = %s\n", p);
PUSHFACE(SFACE);
}
PUSHFACE(SFACE);
}
- action push_SW { printf("Lexer_lexstring:: action:push_SW. p = %s\n", p);
+ action push_SW {
//
printf("Lexer_lexstring:: action:push_SW. p = %s\n", p);
PUSHFACE(SWFACE);
}
PUSHFACE(SWFACE);
}
- action push_W { printf("Lexer_lexstring:: action:push_W. p = %s\n", p);
+ action push_W {
//
printf("Lexer_lexstring:: action:push_W. p = %s\n", p);
PUSHFACE(WFACE);
}
PUSHFACE(WFACE);
}
- action push_NW { printf("Lexer_lexstring:: action:push_NW. p = %s\n", p);
+ action push_NW {
//
printf("Lexer_lexstring:: action:push_NW. p = %s\n", p);
PUSHFACE(NWFACE);
}
PUSHFACE(NWFACE);
}
- action push_N { printf("Lexer_lexstring:: action:push_N. p = %s\n", p);
+ action push_N {
//
printf("Lexer_lexstring:: action:push_N. p = %s\n", p);
PUSHFACE(NFACE);
}
PUSHFACE(NFACE);
}
- action push_NE { printf("Lexer_lexstring:: action:push_NE. p = %s\n", p);
+ action push_NE {
//
printf("Lexer_lexstring:: action:push_NE. p = %s\n", p);
PUSHFACE(NEFACE);
}
PUSHFACE(NEFACE);
}
- action push_E { printf("Lexer_lexstring:: action:push_N. p = %s\n", p);
+ action push_E {
//
printf("Lexer_lexstring:: action:push_N. p = %s\n", p);
PUSHFACE(EFACE);
}
PUSHFACE(EFACE);
}
- action push_SE { printf("Lexer_lexstring:: action:push_N. p = %s\n", p);
+ action push_SE {
//
printf("Lexer_lexstring:: action:push_N. p = %s\n", p);
PUSHFACE(SEFACE);
}
PUSHFACE(SEFACE);
}
- action ref_error { printf("ref from %s to %s has an inappropriate amount of hex digits, it must have eight.\n", ts, p);
+ action ref_error {
//
printf("ref from %s to %s has an inappropriate amount of hex digits, it must have eight.\n", ts, p);
exit(1);
}
exit(1);
}
- action p { printf("Lexer_lexstring:: p = %s\n", p);}
+ action p { //printf("Lexer_lexstring:: p = %s\n", p);
+ }
N = 'N' %push_N;
W = 'W' %push_W;
N = 'N' %push_N;
W = 'W' %push_W;
@@
-157,12
+158,12
@@
int lexer_lexstring
p = ts = str;
pe = eof = p + size + 1;
p = ts = str;
pe = eof = p + size + 1;
- printf("|---Begin lexstring on p = %s, pe = %s.\n",p, pe);
+
//
printf("|---Begin lexstring on p = %s, pe = %s.\n",p, pe);
%%write init;
%%write exec;
%%write init;
%%write exec;
- printf("Ending lexstring of file %s, pushed %d tokens.\n",str, ntok);
+
//
printf("Ending lexstring of file %s, pushed %d tokens.\n",str, ntok);
return ntok;
}
return ntok;
}