Greetings all, Ditching lex but keeping yacc is an interesting suggestion. I don't know lex at all, and agree that it should be possible to re-write the analyser in C/C++.
Neal, it looks like you made some changes to conf_lexer.cxx as part of your win32 port, without changing conf_lexer.lxx -- is that correct? If they are already out of sync, that is more reason to ditch lex. That said, it isn't clear that the problem is in the lexer... The parser defines a simple expression as ending in a T_NEWLINE. I've applied a simple hack (to the .lxx and manually to the .cxx) to make the lexer pretend there is a T_NEWLINE just before the EOF. Properly terminated files will be seen as having an extra blank line at the end, but that is harmless. This hack will only fix the problem if no "include"s are used, but shouldn't cause problems if they are used. It should be possible to hack the hack, but we should possibly make more structural changes... FWIW, the problem didn't cause a core dump. It just caused an error message to be printed to stdout (instead of stderr) and the web server tried to parse it as a header. Cheers, Lachlan On Thu, 20 Nov 2003 03:51, Gilles Detillieux wrote: > Yeah, if a line without a \n is going to cause the whole config > parser to core dump, we really do need to address this problem. If > there are no currently active developers who are comfortable enough > in lex/flex to address this issue, then we may want to reconsider > the need for using this tool in the first place. What we have now > seems to be pretty unmaintainable. Am I missing something here, or > is lex really overkill for this parser? I don't think the lexical > analysis portion of the config parsing is particularly complex, and > could probably be done quite easily, and with more control, in > C/C++ code. If we still need yacc/bison for the higher-level > parsing, that's another matter, but at least we seem to need more > control over what gets fed into that parsing engine. -- [EMAIL PROTECTED] ht://Dig developer DownUnder (http://www.htdig.org) ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ ht://Dig Developer mailing list: [EMAIL PROTECTED] List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-dev