Skip to content

Commit

Permalink
changed enum_graphs to trees
Browse files Browse the repository at this point in the history
  • Loading branch information
dtischle committed Dec 4, 2023
1 parent 1bf42f6 commit 51b1d40
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ algebra: algebra_head '{' fn_defs '}'
automatic_specifier:
@enum@ |
@count@ |
@enum_graph@
@trees@
;
\end{lstlisting}
The {\tt automatic} keyword specifies the auto generation of the
Expand Down
10 changes: 5 additions & 5 deletions src/signature.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ Algebra *Signature::generate(std::string *n, std::string *mode) {
return generate_count(n);
if (*mode == "enum")
return generate_enum(n);
if (*mode == "enum_graph")
return generate_enum_graph(n);
if (*mode == "trees")
return generate_trees(n);
return NULL;
}

Expand Down Expand Up @@ -421,7 +421,7 @@ Algebra *Signature::generate_enum(std::string *n) {
//------------------------------------------------------------------------------------------------------------


struct Generate_Enum_Graph_Stmts : public Generate_Stmts {
struct Generate_Tree_Stmts : public Generate_Stmts {
private:
// closes nodes for simple tracks
void apply(std::list<Statement::Base*> &l, Para_Decl::Simple *s,
Expand Down Expand Up @@ -564,9 +564,9 @@ struct Generate_Enum_Graph_Stmts : public Generate_Stmts {
};


Algebra *Signature::generate_enum_graph(std::string *n) {
Algebra *Signature::generate_trees(std::string *n) {
return generate_algebra(n, Mode::PRETTY, new Type::External("Rope"),
Generate_Enum_Graph_Stmts());
Generate_Tree_Stmts());
}


Expand Down
2 changes: 1 addition & 1 deletion src/signature.hh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Signature : public Signature_Base {
private:
Algebra *generate_count(std::string *n);
Algebra *generate_enum(std::string *n);
Algebra *generate_enum_graph(std::string *n);
Algebra *generate_trees(std::string *n);
Algebra *generate_algebra(
std::string *n, Mode::Type mode_type, Type::Base *answer_type,
Type::Base *alph, const Generate_Stmts &generate_stmts);
Expand Down

0 comments on commit 51b1d40

Please sign in to comment.