![]() |
|
|
|
|
1
27th September 05:51
External User
Posts: 1
|
I've finally made some time to work on the OpenToken release.
I've created a new web page http://www.stephe-leake.org/ada/opentoken.html It has a tarball of the version 3.1w ('w' for working) sources. These are also in the ada-france monotone server. The web page also has a list of changes. I've merged the version I used in webcheck (which required significant changes in the HTML parser), and in my work (which uncovered some other bugs). Both of those projects are now using this OpenToken package. It includes fixes for the two Debian bugs against OpenToken. Please look it over, and let me know if you'd like something changed. If I get no responses in two weeks, I'll declare this release final, and just drop the 'w'. If someone could provide dates for the previous OpenToken releases, that would be fun. -- -- Stephe |
|
|
|
|
3
13th October 00:51
External User
Posts: 1
|
AdaMagica <christoph.grein@eurocopter.com> writes:
The line feed characters are dropped from the lexeme, on Windows. I've added a test that shows the problem. I don't suppose you have an idea of how to fix it? It will be interesting to figure out how to make that test portable between Windows and Gnu/Linux. The easiest way to identify which line ending to use that I know of is to look at GNAT.Directory_Operations.Dir_Separator; it's '\' for CR LF, '/' for LF. Don't know how to deal with Mac! The Ada standard intended System.Name to deal with this, but in GNAT that's always SYSTEM_NAME_GNAT, so that's no help. Anyone have a better idea? If you mean http://www.telepath.com/~dennison/Te...OpenToken.html, there are a couple of dates there, thanks: 8/13/00 - Version 3.0b is now available. 1/27/00 - Version 2.0 is now available. -- -- Stephe |
|
|
5
13th October 00:51
External User
Posts: 1
|
You could do what I did in the Simple Components for Ada parser. I
decoupled sources from the parser itself. The source is an abstract object that provides basic operations like "get next line" and "forward to the next line". The obvious advantage is that you need not to care about LF, CR in the parser, and can use files, streams, strings, GUI text buffers, etc, as a source to the same parser. My 2 cents. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de |
|
|
10
13th October 00:52
External User
Posts: 1
|
What is wrong with that? I do it exactly same way for text files.
Well, provided there is no concern to make it compatible with how Ada RM defines "a line" (I am not sure that "LRM line" always same as "OS line"). Another issue could be compatibility with the GUI text editor. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de |
|