[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mon, 09 Mar 2009 09:43:10 -0700
Thunderbird 188.8.131.52 (Windows/20081209)
Marco Gerards wrote:
> Kevin Lacquement <address@hidden> writes:
>> Again looking at the script parser, I notices that it uses a
>> Yacc-generated parser, but a hand-written tokenizer. Is there a reason
>> that it doesn't use Lex? Is it due to external dependencies, and if so,
>> is there a way to recreate these deps (library or whatever) within the
>> constraints of the bootloader?
> Right, and I really hate the handwritten parser. It is easy to
> cleanly use bison. Lex, OTOH, isn't easy and clean to use. IIRC it
> depended on file IO, etc. If you know a *clean* way to deal with
> this, I would favor it. Making all kinds of dirty stubs is something
> I don't really like.
I've looked at flex (including its source), and it looks like the
standard library #includes are hardcoded in. I'm going to look into
some alternatives to allow the lexer to be created cleanly without
adding too much of a burden to other developers in the way of project deps.
Alternatively, is there a clean, portable way to make the C compiler
think that the grub headers are actually the system headers? Or
possibly to replace the system header calls in the generated C code?
(Using sed or something similar)
Sic non confunctus, non reficiat.
Description: OpenPGP digital signature
- Parser, Kevin Lacquement, 2009/03/03
- Re: Parser, Marco Gerards, 2009/03/07
- Re: Parser,
Kevin Lacquement <=