Skip to content

Commit ca67986

Browse files
author
Sudipto "smlckz" Mallick
committed
Remove check for token length
1 parent ff97bbc commit ca67986

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

pl0c.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static long line;
8282
static void expression(void);
8383
static void error(void) {
8484
{
85-
(void)fprintf(stdout, "pl0c: error: ");
85+
(void)fprintf(stdout, "\npl0c: error: ");
8686
;
8787
(void)fprintf(stdout, "%ld", (long)(line));
8888
;
@@ -514,17 +514,6 @@ static void ident(void) {
514514
;
515515
};
516516
};
517-
if (i >= 256) {
518-
{
519-
error();
520-
;
521-
(void)fprintf(stdout, "token too long\n");
522-
;
523-
exit(1);
524-
;
525-
;
526-
};
527-
};
528517
if (loop != 0) {
529518
loc = loc + 1;
530519
};

pl0c.pl0

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,6 @@ begin
486486
end;
487487
end;
488488

489-
if i >= 256 then
490-
begin
491-
call error;
492-
writeStr 'token too long\n';
493-
exit 1;
494-
end;
495-
496489
if loop # 0 then
497490
loc := loc + 1;
498491
end;

0 commit comments

Comments
 (0)