Make sure the program's symbols can be dlsym'd as well.
[oota-llvm.git] / tools / llvmc / ConfigLexer.h
index 5a3e9e9f74f44132e2ce787e698895efd458c9ce..e11c6e135348ed8bd4162c0dd7112f7a8f8e4a98 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <string>
 #include <istream>
+#include <cassert>
 
 namespace llvm {
 
@@ -22,10 +23,11 @@ struct ConfigLexerInfo
 {
   int64_t     IntegerVal;
   std::string StringVal;
+  bool in_value;
+  unsigned lineNum;
 };
 
-extern ConfigLexerInfo ConfigLexerData;
-extern unsigned ConfigLexerLine;
+extern ConfigLexerInfo ConfigLexerState;
 
 class InputProvider {
   public:
@@ -49,29 +51,54 @@ enum ConfigLexerTokens {
   EOFTOK = 0,   ///< Returned by Configlex when we hit end of file
   EOLTOK,       ///< End of line
   ERRORTOK,     ///< Error token
-  OPTION,       ///< A command line option
-  SEPARATOR,    ///< A configuration item separator
+  ARGS_SUBST,   ///< THe substitution item %args%
+  ASSEMBLY,     ///< The value "assembly" (and variants)
+  ASSEMBLER,    ///< The name "assembler" (and variants)
+  BYTECODE,     ///< The value "bytecode" (and variants)
+  COMMAND,      ///< The name "command" (and variants)
+  DEFS_SUBST,   ///< The substitution item %defs%
   EQUALS,       ///< The equals sign, =
-  TRUETOK,      ///< A boolean true value (true/yes/on)
   FALSETOK,     ///< A boolean false value (false/no/off)
+  FOPTS_SUBST,  ///< The substitution item %fOpts%
+  IN_SUBST,     ///< The substitution item %in%
+  INCLS_SUBST,  ///< The substitution item %incls%
   INTEGER,      ///< An integer 
+  LANG,         ///< The name "lang" (and variants)
+  LIBPATHS,     ///< The name "libpaths" (and variants)
+  LIBS,         ///< The name "libs" (and variants)
+  LIBS_SUBST,   ///< The substitution item %libs%
+  LINKER,       ///< The name "linker" (and variants)
+  MOPTS_SUBST,  ///< The substitution item %Mopts%
+  NAME,         ///< The name "name" (and variants)
+  OPT_SUBST,    ///< The substitution item %opt%
+  OPTIMIZER,    ///< The name "optimizer" (and variants)
+  OPTION,       ///< A command line option
+  OPT1,         ///< The name "opt1" (and variants)
+  OPT2,         ///< The name "opt2" (and variants)
+  OPT3,         ///< The name "opt3" (and variants)
+  OPT4,         ///< The name "opt4" (and variants)
+  OPT5,         ///< The name "opt5" (and variants)
+  OUT_SUBST,    ///< The output substitution item %out%
+  OUTPUT,       ///< The name "output" (and variants)
+  PREPROCESSES, ///< The name "preprocesses" (and variants)
+  PREPROCESSOR, ///< The name "preprocessor" (and variants)
+  REQUIRED,     ///< The name "required" (and variants)
+  SEPARATOR,    ///< A configuration item separator
+  SPACE,        ///< Space between options
+  STATS_SUBST,  ///< The stats substitution item %stats%
   STRING,       ///< A quoted string
-  IN_SUBST,     ///< The input substitution item @in@
-  OUT_SUBST,    ///< The output substitution item @out@
-  LANG,         ///< The item "lang" (and case variants)
-  PREPROCESSOR, ///< The item "preprocessor" (and case variants)
-  TRANSLATOR,   ///< The item "translator" (and case variants)
-  OPTIMIZER,    ///< The item "optimizer" (and case variants)
-  ASSEMBLER,    ///< The item "assembler" (and case variants)
-  LINKER,       ///< The item "linker" (and case variants)
-  NAME,         ///< The item "name" (and case variants)
-  NEEDED,       ///< The item "needed" (and case variants)
-  COMMAND,      ///< The item "command" (and case variants)
-  PREPROCESSES, ///< The item "preprocesses" (and case variants)
-  GROKS_DASH_O, ///< The item "groks_dash_O" (and case variants)
-  OPTIMIZES,    ///< The item "optimizes" (and case variants)
+  TARGET_SUBST, ///< The substitition item %target%
+  TIME_SUBST,   ///< The substitution item %time%
+  TRANSLATES,   ///< The name "translates" (and variants)
+  TRANSLATOR,   ///< The name "translator" (and variants)
+  TRUETOK,      ///< A boolean true value (true/yes/on)
+  VERBOSE_SUBST,///< The substitution item %verbose%
+  VERSION_TOK,  ///< The name "version" (and variants)
+  WOPTS_SUBST,  ///< The %WOpts% substitution
 };
 
+extern ConfigLexerTokens Configlex();
+
 }
 
 #endif