35 #include "llvm/IR/Function.h"
36 #include "llvm/IR/Instructions.h"
37 #include "llvm/IR/LLVMContext.h"
38 #include "llvm/IR/Module.h"
39 #include "llvm/Support/CommandLine.h"
40 #include "llvm/Support/raw_ostream.h"
41 #include "llvm/Pass.h"
44 using namespace tesla;
48 cl::opt<string>
ManifestName(cl::desc(
"[manifest file]"),
49 cl::Positional, cl::Optional);
55 cl::opt<Command>
UserCommand(cl::desc(
"Command to execute"), cl::Required,
58 "Print short string representation of all automata"),
62 cl::opt<Automaton::Type>
Determinism(cl::desc(
"automata determinism:"),
64 clEnumValN(Automaton::Unlinked,
"u",
"unlinked NFA"),
65 clEnumValN(Automaton::Linked,
"l",
"linked NFA"),
66 clEnumValN(Automaton::Deterministic,
"d",
"DFA"),
68 cl::init(Automaton::Unlinked));
71 main(
int argc,
char *argv[]) {
72 cl::ParseCommandLineOptions(argc, argv);
74 auto& out = llvm::outs();
75 auto& err = llvm::errs();
83 err <<
"Unable to read manifest '" <<
ManifestName <<
"'\n";
93 out << A->
String() <<
"\n\n";
98 google::protobuf::ShutdownProtobufLibrary();