use typename
[prop.git] / prop-src / aggen.cc
blobb52e4084a40006fd3f448865210ea74071672ff8
1 ///////////////////////////////////////////////////////////////////////////////
2 // This file is generated automatically using Prop (version 2.3.6),
3 // last updated on Nov 2, 1999.
4 // The original source file is "aggen.pcc".
5 ///////////////////////////////////////////////////////////////////////////////
7 #line 1 "aggen.pcc"
8 ///////////////////////////////////////////////////////////////////////////////
9 //
10 // This file implements the attribute grammar generator.
12 ///////////////////////////////////////////////////////////////////////////////
13 #include "basics.h"
14 #include "ir.h"
15 #include "codegen.h"
16 #include "classdef.h"
17 #include "aggen.h"
19 ///////////////////////////////////////////////////////////////////////////////
21 // Class to represent an attribute grammar class
23 ///////////////////////////////////////////////////////////////////////////////
24 AttributeGrammarClass::AttributeGrammarClass
25 (Id name, Inherits i, TyQual q, Decls decls)
26 : SyntaxClass(ATTRIBUTE_GRAMMAR_CLASS,name,i,q,decls)
28 AttributeGrammarClass::~AttributeGrammarClass() {}
30 ///////////////////////////////////////////////////////////////////////////////
32 // Method to generate the class interface
34 ///////////////////////////////////////////////////////////////////////////////
35 void AttributeGrammarClass::gen_class_interface(CodeGen& C)
36 { SyntaxClass::gen_class_interface(C);
39 ///////////////////////////////////////////////////////////////////////////////
41 // Method to generate the class implementation
43 ///////////////////////////////////////////////////////////////////////////////
44 void AttributeGrammarClass::gen_class_implementation
45 (CodeGen& C, Tys tys, DefKind k)
47 SyntaxClass::gen_class_implementation(C,tys,k);
50 ///////////////////////////////////////////////////////////////////////////////
52 // Constructor/destructor of the attribute grammar compiler
54 ///////////////////////////////////////////////////////////////////////////////
55 AttributeGrammarCompiler::AttributeGrammarCompiler() {}
56 AttributeGrammarCompiler::~AttributeGrammarCompiler() {}
58 ///////////////////////////////////////////////////////////////////////////////
60 // Method to generate the attribute grammar
62 ///////////////////////////////////////////////////////////////////////////////
63 void AttributeGrammarCompiler::gen_attribute_grammar(Id id, GramExp e)
64 { AttributeGrammarClass * C =
65 (AttributeGrammarClass*)
66 ClassDefinition::lookup_class(
67 ClassDefinition::ATTRIBUTE_GRAMMAR_CLASS,id);
68 if (C) C->gen_parser(*this,e);
70 #line 63 "aggen.pcc"
72 ------------------------------- Statistics -------------------------------
73 Merge matching rules = yes
74 Number of DFA nodes merged = 0
75 Number of ifs generated = 0
76 Number of switches generated = 0
77 Number of labels = 0
78 Number of gotos = 0
79 Adaptive matching = enabled
80 Fast string matching = disabled
81 Inline downcasts = enabled
82 --------------------------------------------------------------------------