[Omake] Omake for the D programming language SCANNER

Susanne Lietz nanali at wanadoo.fr
Thu Feb 14 03:14:49 PST 2008


Hello, I am a OMake newbie and I am trying to use this  tool  for D.
One of the problems I can't solve is to implement the SCANNER 

D has a module concept similar to Modula, except that D don't support 
nested modules.
D is  simmilar to C++ exept that D has no preprocessor.

Okay : Here some possible import statements.

import dwt.all,   // all.d in directory dwt.
public import  dwt.widgets.button;  // file button.d in directory 
dwt/widgets
possible is also :
private import dwt.all, dwt.widgets.button;
//and
private import ConvertFloat = tango.text.convert.Float;
//Unfortunately this not the end of how we can define import statements
// F;I; Renamed and Selective Imports
//When renaming and selective importing are combined, we have :
import io = std.stdio : foo = writefln;

the complete def : 
http://www.digitalmars.com/d/2.0/module.html#ImportDeclaration

However , I doubt that I am able to implement the SCANNER using awk(). 
But probabely I am wrong.
What do you think ?
Are there other ways to implement the dependencie-solving ? In case that 
: Exists samples ?
Many thanks in advance ,
Borke

# this will not work
 .SCANNER: %.obj: %.d
        section
            # Scan the file
            deps[] =
            awk($<)
            case $'^import'
                deps[] += $2
                export







More information about the Omake mailing list