Home » U++ Library support » U++ Core » CParser do not check for invalid strings that span lines
Re: CParser do not check for invalid strings that spam lines [message #42878 is a reply to message #42873] |
Sat, 12 April 2014 19:45 |
|
mirek
Messages: 13984 Registered: November 2005
|
Ultimate Member |
|
|
mingodad wrote on Sat, 12 April 2014 10:48Hello !
Working with witz templates I found error messages a bit misleading when I forgot to put an end quote on one string, following the problem I found several problems (it got better but the error message has a wrong column info on my case it is 2 bytes upfront):
1- CParser do not check for invalid strings that spam multiple lines (see fix bellow):
/////////
--- /home/mingo/upp/uppsrc/Core/parser.cpp
+++ /tmp/parser-0.cpp
@@ -327,7 +327,7 @@
}
}
else {
- if(*term < ' ') {
+ if(*term < ' ' || *term == '\n') {
As '\n' is clearly < ' ', this is unlikely to change anything
Anyway, the problem was something else: ReadString has bool parameter that allows it to ignore unterminated String errors. It was added in order to be able to deal with some broken files situations, unfortunately it was set to 'ignore problems' as default.
This was kind of stupid decision, so I have been bold enought to do a backward incompatible change, making checking mode the default. I hope it is very unlikely that this would cause any problems...
(will check witz stuff later)
Mirek
|
|
|
|
|
CParser do not check for invalid strings that span lines
By: mingodad on Sat, 12 April 2014 12:48
|
|
|
Re: CParser do not check for invalid strings that spam lines
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mirek on Sat, 12 April 2014 19:45
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mingodad on Sat, 12 April 2014 21:21
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mirek on Sun, 13 April 2014 08:20
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mingodad on Sun, 13 April 2014 09:42
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mirek on Sun, 13 April 2014 19:44
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mingodad on Sun, 13 April 2014 19:53
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mirek on Sun, 13 April 2014 20:49
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mingodad on Sun, 13 April 2014 21:19
|
|
|
Re: CParser do not check for invalid strings that spam lines
By: mirek on Mon, 14 April 2014 13:36
|
|
|
Re: CParser do not check for invalid strings that spam lines
|
|
|
Re: CParser do not check for invalid strings that span lines
By: mirek on Sun, 13 April 2014 20:46
|
|
|
Re: CParser do not check for invalid strings that span lines
By: mingodad on Mon, 14 April 2014 12:16
|
|
|
Re: CParser do not check for invalid strings that span lines
By: mirek on Mon, 14 April 2014 13:37
|
|
|
Re: CParser do not check for invalid strings that span lines
By: mirek on Sat, 26 April 2014 12:00
|
Goto Forum:
Current Time: Wed Jun 12 17:47:50 CEST 2024
Total time taken to generate the page: 0.02459 seconds
|