[Omake] [Ping Jason] Why do we tokenize comments?

Aleksey Nogin nogin at cs.caltech.edu
Thu Feb 16 21:04:15 PST 2006


On 16.02.2006 20:43, Jason Hickey wrote:

> Comments must be tokenized for 
> the usual reason that the make language is not context-free.  For 
> example, while the following is currently bugged, it is _supposed_ to do 
> what you expect.
> 
>    clean:
>       rm *.o *.a .#* *.lib

May be. Although

rm *.o *.a $".#*" *.lib

does work (even with my patch). I guess it boils down to what semantics 
is more convenient. After all,

clean:
    rm -f *.o   # I really want them gone!

is also not that unreasonable.

> The lexer does not usually discard input.
> 
>    X = $"""
>    # Hello world
>    """

This works correctly and my patch does not break it.

Well, I guess this is something we'll have to consider a bit more 
carefully. I've filed http://bugzilla.metaprl.org/show_bug.cgi?id=564 on 
this.

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin at cs.caltech.edu (office), aleksey at nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200


More information about the OMake-Devel mailing list