fix: line number administration wrong in scan.c
This commit is contained in:
parent
2c413b9455
commit
e6d132830a
4 changed files with 8 additions and 0 deletions
|
@ -586,6 +586,7 @@ options.o: spec_arith.h
|
||||||
options.o: target_sizes.h
|
options.o: target_sizes.h
|
||||||
options.o: use_tmp.h
|
options.o: use_tmp.h
|
||||||
scan.o: class.h
|
scan.o: class.h
|
||||||
|
scan.o: file_info.h
|
||||||
scan.o: idf.h
|
scan.o: idf.h
|
||||||
scan.o: input.h
|
scan.o: input.h
|
||||||
scan.o: interface.h
|
scan.o: interface.h
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "idf.h"
|
#include "idf.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
|
#include "file_info.h"
|
||||||
|
|
||||||
#define EOS '\0'
|
#define EOS '\0'
|
||||||
#define overflow() (fatal("actual parameter buffer overflow"))
|
#define overflow() (fatal("actual parameter buffer overflow"))
|
||||||
|
@ -141,6 +142,7 @@ copyact(ch1, ch2, level)
|
||||||
#endif __MATCHING_PAR__
|
#endif __MATCHING_PAR__
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
|
LineNumber++;
|
||||||
while (LoadChar(ch), ch == '#') {
|
while (LoadChar(ch), ch == '#') {
|
||||||
/* This piece of code needs some
|
/* This piece of code needs some
|
||||||
explanation: consider the call of
|
explanation: consider the call of
|
||||||
|
@ -208,6 +210,7 @@ copyact(ch1, ch2, level)
|
||||||
else
|
else
|
||||||
if (ch == '\n') {
|
if (ch == '\n') {
|
||||||
lexerror("newline in string");
|
lexerror("newline in string");
|
||||||
|
LineNumber++;
|
||||||
copy(match);
|
copy(match);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,6 +223,7 @@ replace.o: pathlength.h
|
||||||
replace.o: textsize.h
|
replace.o: textsize.h
|
||||||
scan.o: charoffset.h
|
scan.o: charoffset.h
|
||||||
scan.o: class.h
|
scan.o: class.h
|
||||||
|
scan.o: file_info.h
|
||||||
scan.o: idf.h
|
scan.o: idf.h
|
||||||
scan.o: input.h
|
scan.o: input.h
|
||||||
scan.o: inputtype.h
|
scan.o: inputtype.h
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "idf.h"
|
#include "idf.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
|
#include "file_info.h"
|
||||||
|
|
||||||
#define EOS '\0'
|
#define EOS '\0'
|
||||||
#define overflow() (fatal("actual parameter buffer overflow"))
|
#define overflow() (fatal("actual parameter buffer overflow"))
|
||||||
|
@ -138,6 +139,7 @@ copyact(ch1, ch2, level)
|
||||||
#endif __MATCHING_PAR__
|
#endif __MATCHING_PAR__
|
||||||
|
|
||||||
case '\n':
|
case '\n':
|
||||||
|
LineNumber++;
|
||||||
LoadChar(ch);
|
LoadChar(ch);
|
||||||
while (ch == '#') {
|
while (ch == '#') {
|
||||||
/* This piece of code needs some
|
/* This piece of code needs some
|
||||||
|
@ -207,6 +209,7 @@ copyact(ch1, ch2, level)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (ch == '\n') {
|
if (ch == '\n') {
|
||||||
|
LineNumber++;
|
||||||
error("newline in string");
|
error("newline in string");
|
||||||
copy(match);
|
copy(match);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue