1 /// The configuration file of dil.
2 ///
3 /// The file is searched for in the following order:
4 /// $(OL
5 ///   $(LI The file path set in the environment variable DILCONF.)
6 ///   $(LI The current working directory.)
7 ///   $(LI The directory set in the environment variable HOME.)
8 ///   $(LI The executable's directory.)
9 /// )
10 /// The program will fail with an error msg if this file couldn't be found.$(BR)
11 ///
12 /// Any environment variable used inside a string is expanded to its value.
13 /// The variables BINDIR and DATADIR are set by dil. Examples:
14 /// $(UL
15 ///   $(LI ${HOME} -> the home directory (e.g. "/home/name" or "C:\Documents and Settings\name").)
16 ///   $(LI ${BINDIR} -> the absolute path to the executable's directory (e.g. "/home/name/dil/bin" or "C:\dil\bin").)
17 ///   $(LI ${DATADIR} -> the data directory of dil (e.g. "/home/name/dil/data" or "C:\dil\data").)
18 /// )
19 ///
20 /// Relative paths are resolved and made absolute using the current working directory.
21 module dilconf;
22 
23 /// Files needed by dil are located in this directory.
24 var DATADIR = "${BINDIR}/../data/";
25 
26 /// Predefined version identifiers.
27 var VERSION_IDS = ["X86", "linux", "LittleEndian"];
28 // "X86_64", "Windows", "Win32", "Win64", "BigEndian"
29 
30 /// An array of import paths to look for modules.
31 var IMPORT_PATHS = []; /// E.g.: ["src/", "import/"]
32 
33 /// DDoc macro file paths.
34 ///
35 /// Macro definitions in ddoc_files[n] override the ones in ddoc_files[n-1].$(BR)
36 var DDOC_FILES = ["${DATADIR}/predefined.ddoc"]; /// E.g.: ["src/mymacros.ddoc", "othermacros.ddoc"]
37 
38 /// Path to the language file.
39 var LANG_FILE = "${DATADIR}/lang_en.d";
40 /// Path to the xml map.
41 var XML_MAP = "${DATADIR}/xml_map.d";
42 /// Path to the html map.
43 var HTML_MAP = "${DATADIR}/html_map.d";
44 
45 /// Customizable formats for error messages.
46 ///
47 /// $(UL
48 ///   $(LI 0: file path to the source text.)
49 ///   $(LI 1: line number.)
50 ///   $(LI 2: column number.)
51 ///   $(LI 3: error message.)
52 /// )
53 var LEXER_ERROR = "{0}({1},{2})L: {3}";
54 var PARSER_ERROR = "{0}({1},{2})P: {3}"; /// ditto
55 var SEMANTIC_ERROR = "{0}({1},{2})S: {3}"; /// ditto
56 
57 /// The width of the tabulator character set in your editor.
58 ///
59 /// Important for calculating correct column numbers for compiler messages.
60 var TAB_WIDTH = 4;