>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:

Lars> The escaping was not just bad, it was plain wrong. run lyx with
Lars> -dbg key,keymap and you can see yourself. Why demand escaping
Lars> when it is not needed.

The escaping was right with LyXLex, AFAIK.

Lars> | - the concerns I have with the non robustness of your
Lars> regexp-based | parser remain. I understand that regexps are fun,
Lars> but...

Lars> if the line match it match, else it does not match. As for
Lars> robustness, it does not crash.

Sure, if I add a space at the beginning of the line for some reason,
it does not get parsed. On the orhet hand, I can add any junk at the
end of the line, and it will be ignored. Talk about robustness... I
know the regexp can be made better,

Lars> | - the other cdef files have not been modified, and thus the
Lars> problem | remain for them

Lars> Note that the actual contents of the .cdef files have not been
Lars> used until I made my changes yesterday.

Yes, but they were used before you ditched lyxlex, I believe.

Lars> | - the current syntax does not make sense, since we have
Lars> non-escaped " | characters inside "" groups.

Lars> So? that matches ' "[^ ]" '

And maybe is it just that I do not know regexp well enough, but how
are you sure that the match for a string like "\"{e}" will not be just
"\"? Are _all_ regexp implementations required to do this? 

Lars> | - If you do not like those escape in the old files, we can in
Lars> fact | just forget about the quotes and it should remove the
Lars> need for | quoting (does it? if not this is a bug in lyxlex).

Lars> Yes that was one of my comments, why use two other chars as
Lars> delimiters.

What I definitely do not like about your solution is that cdef file do
not have a syntax anymore (unless you count `anything that matches my
regexp' as a syntax). In fact, the only way to document the syntax is
probably to give the regexp...

Lars> | Why not just revert to the old parser?

Lars> Wrong use of lyxlex. To use lyxlex as a glorified tokenizer is
Lars> not right.

Why? A tokenizer is just what is needed here. If you want nice tokens,
just modify the syntax to be
  Chardef 192     "\\`{A}"
and you have nice tokens to play with...

JMarc

Reply via email to