URI: 
       makefile.st - enscript - GNU Enscript
  HTML git clone git://thinkerwim.org/enscript.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       makefile.st (1539B)
       ---
            1 /**
            2  * Name: makefile
            3  * Description: Make program's definition files.
            4  * Author: Markku Rossi <mtr@iki.fi>
            5  */
            6 
            7 state sh_eat_to_apostrophe extends Highlight
            8 {
            9   /\'/ {
           10     language_print ($0);
           11     return;
           12   }
           13 }
           14 
           15 state sh_eat_to_grave extends Highlight
           16 {
           17   /`/ {
           18     language_print ($0);
           19     return;
           20   }
           21 }
           22 
           23 state makefile extends HighlightEntry
           24 {
           25   /* Comments. */
           26   /#/ {
           27     comment_face (true);
           28     language_print ($0);
           29     call (eat_one_line);
           30     comment_face (false);
           31   }
           32   /* An escaped double quote, this doesn't start a string constant. */
           33   /\\\"/ {
           34     language_print ($0);
           35   }
           36 
           37   /* String constants. */
           38   /\"/ {
           39     string_face (true);
           40     language_print ($0);
           41     call (c_string);
           42     string_face (false);
           43   }
           44 
           45   /* Shell apostrophe quote. */
           46   /\'/ {
           47     string_face (true);
           48     language_print ($0);
           49     call (sh_eat_to_apostrophe);
           50     string_face (false);
           51   }
           52 
           53   /* Shell grave quote. */
           54   /`/ {
           55     string_face (true);
           56     language_print ($0);
           57     call (sh_eat_to_grave);
           58     string_face (false);
           59   }
           60 
           61   /* Variable references. */
           62 
           63   /\$\(/ {
           64     language_print ($0);
           65     reference_face (true);
           66     str = match_balanced_block (/\(/, /\)/);
           67     reference_face (false);
           68     language_print (str);
           69   }
           70 
           71   /\${/ {
           72     language_print ($0);
           73     reference_face (true);
           74     str = match_balanced_block (/{/, /}/);
           75     reference_face (false);
           76     language_print (str);
           77   }
           78 
           79   /* Targets. */
           80   /^[^ \t\r\n]+:/ {
           81     keyword_face (true);
           82     language_print ($0);
           83     keyword_face (false);
           84   }
           85 }
           86 
           87 
           88 /*
           89 Local variables:
           90 mode: c
           91 End:
           92 */