File: data.cc

package info (click to toggle)
icmake 13.05.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,132 kB
  • sloc: cpp: 11,595; fortran: 883; makefile: 853; sh: 546; pascal: 342
file content (39 lines) | stat: -rw-r--r-- 1,121 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "scanner.ih"


                           //    directive         ident: [1]
Pattern Scanner::s_matchIdent{ "#\\w+"   "\\s+"  "(\\S+)" };

                              //    directive
Pattern Scanner::s_matchDirective{ "#\\S+"   };

                            //                           [3] is the var.name
                            //   no \              ${     defVar         }
Pattern Scanner::s_matchDefVar{ "([^\\\\]|^)"  "(\\$\\{" "((\\w|_)+)" "\\})" };
//                               1              2         34

char const *Scanner::s_tokenName[] =
{
    "ALL_DONE",
    "SPACE",
    "TEXT",
    "NL",
    "NEXT",
    "AT_EOF",
};

//////////////////


//                         // update if enum Directive (scanner.h) changes
// Scanner::Token (Scanner::*Scanner::s_startDirective[])() =
// {
//     &Scanner::ignore,
//     &Scanner::define,
// };

    // Following #define [1] is the defined word, [3] is the rest.
    // after matching, remove the //... comment from [3] 

                              //        1     2    3
//Pattern Scanner::s_directive{ "#\\w+\\s+(\\S+)(\\s+(.*)?)?" };