KDevelop 1.0beta3 patch - Objective-C support added

Andrew Morton morton at nortelnetworks.com
Wed Sep 29 05:29:10 BST 1999


"Ansley, Michael" wrote:
> 
> >> The _ideal_ fix is to remove '%option yylineno' from
> >> tokenizer.l and to
> >> make 'comment' a QString.  This will allow for indefinitely large
> >> comments and will, according to the flex docs, make a significantly
> >> faster parser (will this offset the cost of the QString?  Dunno).
> 
> It's not just as simple as that, unfortunately.  You have to ensure that you
> have no variable length trailing contexts (vltcs), to ensure that the buffer
> can grow.

Hi, Michael.

Yes, there are other ways in which YY_USES_REJECT gets turned on. 
However the beta2 version of tokenizer.l doesn't use them - I tried
removing '%option yylineno' and the flex output no longer defines
YY_USES_REJECT.  The problem is, this removes lineno()!  The lexer
independently counts newlines, so perhaps with appropriate tweaking
lineNum() could be used.

While I was in there I significantly simplified some of the rules in
tokenizer.l. Probably not very significant though.



More information about the KDevelop mailing list