Home » U++ Library support » U++ Core » CParser enhancements
CParser enhancements [message #25752] |
Wed, 10 March 2010 16:30  |
cbpporter
Messages: 1427 Registered: September 2007
|
Ultimate Contributor |
|
|
First a short question: is there a class like MemStream, but which owns it's memory, grows with every Put and has a capacity. Basically a Vector<char> but with all the PutNN variants so I can add ints and doubles to it?
I couldn't find any and I'll implement one latter Today.
Now, for the real subject: I've attached some little enhancements to CParser. Basically just support for getting the column. It is 1 based. There is also a GetCharSpaces function, which should maybe have a better name.
Also, I'll need a CParser with optional space skipping which does not skip over end lines. So after a Spaces(), Char('\n') can be true. I'll inherit from CParser and override Spaces0 after I get nightly build with this patch.
I have a strange deja vu about this path, like I already posted it. I hope it's not a double post .
-
Attachment: Parser.h
(Size: 4.24KB, Downloaded 255 times)
-
Attachment: parser.cpp
(Size: 9.56KB, Downloaded 282 times)
|
|
|
|
|
|
|
|
|
Re: CParser enhancements [message #25781 is a reply to message #25761] |
Thu, 11 March 2010 15:14  |
cbpporter
Messages: 1427 Registered: September 2007
|
Ultimate Contributor |
|
|
I'm following you example of the pointer difference, but on a function by function basis (like ReadId), to avoid all those increments.
I'll fork CParser for now into RParser. Anwyay, the addition of column info is IMO a welcome addition to the handy little CParser.
|
|
|
Goto Forum:
Current Time: Wed May 14 10:56:56 CEST 2025
Total time taken to generate the page: 0.01209 seconds
|