[cmake-developers] Branches on next
Matthew Woehlke
mw_triad at users.sourceforge.net
Wed Feb 12 11:46:39 EST 2014
On 2014-02-11 23:03, Ben Boeckel wrote:
> On Tue, Feb 11, 2014 at 19:16:49 -0500, Matthew Woehlke wrote:
>> On 2014-02-11 17:54, Ben Boeckel wrote:
>>> ExpandVariablesInString is the part which takes a string which may have
>>> variables in it and dereferences them.
>>
>> Yes, that's why your changes are probably not all that helpful to
>> understanding CMake's parsing... one must first understand the
>> initial parse pass, which I assume is still in lex (unless you
>> rewrote it too and forgot to mention it ;-), which I doubt).
>
> That code isn't even on the radar for expensive code. It probably could
> be replaced with smaller code other than lex/yacc, but it's not worth
> the time if performance is the goal (removing lines, however…). Anything
> other than comments and blank lines is always in the form:
>
> <command> "(" <argstring> ")" <newline>
>
> which is pretty fast (the parser is also set up once per file; the EVIS
> lex/yacc parser was set up and torn down for *each* expansion which is
> generally per-line which contains any of "@$\\").
Related: does the first pass then completely ignore these characters
(and also genex's AFAICT?) and only perform argument splitting based on
whitespace and '"'?
I'm wondering, since I don't try to tokenize expansions anyway, if I can
just get rid of that part of my parsing without harm...
--
Matthew
More information about the cmake-developers
mailing list