Re: [code] Another lexer question: line comments (REAL lines comments)

From: Mitchell <m.att.foicica.com>
Date: Tue, 19 Nov 2013 11:17:53 -0500 (Eastern Standard Time)

Hi Michael,

On Wed, 20 Nov 2013, Michael Richter wrote:

> How would I lex a comment that has a comment character which *MUST* start
> in column 1?
>
> As in:
>
> * this is a comment
> * this is not a comment
> foo * this is most definitely not a comment

Use `l.starts_line(pattern)`. See the C lexer's preproc token for an
example.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 19 Nov 2013 - 11:17:53 EST

This archive was generated by hypermail 2.2.0 : Wed 20 Nov 2013 - 06:27:06 EST