1 ///////////////////////////////////////////////////////////////////////////////
3 // This file describes the interface to the Prop compiler.
5 ///////////////////////////////////////////////////////////////////////////////
7 #ifndef prop_compiler_h
8 #define prop_compiler_h
10 #include "matchcom.h" // pattern matching compiler
11 #include "rwgen.h" // rewriting compiler
12 #include "datagen.h" // data structure compiler
13 #include "infgen.h" // inference compiler
14 #include "parsegen.h" // parser generator
15 #include "setlgen.h" // set language compiler
16 // #include "bitfield.h" // bit fields/pattern compiler
17 // #include "dataflow.h" // dataflow compiler
18 // #include "constraint.h" // constraint compiler
19 #include "metasyntax.h" // metasyntax compiler
20 #include "grsgen.h" // graph rewriting compiler
21 #include "aggen.h" // attribute grammar compiler
22 #include "rwmix.h" // TRS partial evaluator
25 ///////////////////////////////////////////////////////////////////////////////
26 // The compiler is constructed by combining various modules together.
27 ///////////////////////////////////////////////////////////////////////////////
29 : virtual public CodeGen
, // code generator
30 virtual public DatatypeCompiler
, // datatype compiler
31 virtual public MatchCompiler
, // pattern matching compiler
32 virtual public RewritingCompiler
, // rewriting compiler
33 virtual public RewriteMix
, // rewriting system partial evaluator
34 virtual public InferenceCompiler
, // inference compiler
35 virtual public ParserCompiler
, // parser compiler
36 virtual public SETLCompiler
, // setl compiler
37 // virtual public BitfieldCompiler, // bit field compiler
38 // virtual public DataflowCompiler, // dataflow compiler
39 // virtual public ConstraintCompiler, // constraint compiler
40 virtual public MetaSyntaxCompiler
, // meta syntax compiler
41 virtual public AttributeGrammarCompiler
, // AG compiler
42 virtual public GraphRewritingCompiler
// grs compiler
44 Compiler (const Compiler
&); // no copy constructor
45 void operator = (const Compiler
&); // no assignment
47 TextBuffer header
; // header information
50 ////////////////////////////////////////////////////////////////////////////
51 // Constructor and destructor
52 ////////////////////////////////////////////////////////////////////////////
53 Compiler(TyOpt opt
, int embedded_tags
);
58 ////////////////////////////////////////////////////////////////////////////
59 // Methods to generate a Prop declaration.
60 ////////////////////////////////////////////////////////////////////////////
61 void generate (Decls
); // generate code
62 void emit_header (const char *, int);
63 void emit_header_text ();
64 ostream
& print_report (ostream
&); // print report
65 void print_definitions_as_GDL (); // print definitions as GDL
68 ////////////////////////////////////////////////////////////////////////////
69 // Miscellaneous methods
70 ////////////////////////////////////////////////////////////////////////////
71 void gen (Decl
, Bool
= true, Bool
= true);
73 virtual va_list printer (char, va_list);