<commit_before>#                                                      -*- Yaml -*-
#
---

# ---------------- #
# AST parameters.  #
# ---------------- #

# The base directory to prepend to all the file names generated in the
# generated Makefile snippet.  If this ast-nodes.mk is to be included
# by ast/Makefile.am, then define to empty.  If it is included by its
# parent Makefile.am, define to "ast/".
ast_basedir: "ast/"

# The name of the directory/namespace that contains our auxiliary C++
# library.
auxlib: "libport"

# The name of the directory/namespace that contains the cloner.
clonerlib: "ast"

# The generator will accept these types as is, without looking for a
# particular header.  Also, they are handled by copy.
atomic_types:
  - "bool"
  - "int"
  - "unsigned"
  - "ufloat"

# Likewise, but these types are handled by references, because of
# their size.
# compound_types:
# - "DecsList::decs_type"

# In most cases, the name of the header to include can be computed
# from the name of the type.  Below are the exceptions.
includes_map:
  "exec_exps_type": '"ast/fwd.hh"'
  "exp_pair_type": '"ast/exp.hh"'
  "exp_pairs_type": '"ast/exp.hh"'
  "exps_type": '"ast/exp.hh"'
  "flavor_type": '"ast/flavor.hh"'
  "flow_exception_kind": '"ast/flow-exception.hh"'
  "libport::Symbol": '<libport/symbol.hh>'
  "object::rObject": '"object/object.hh"'
  "std::string": "<string>"
  "symbols_type": '"ast/fwd.hh"'
  "ufloat": '<libport/ufloat.h>'

# FIXME: Can't we compute this list from atomic_types?  Or simply, one
# cannot visit something which is not a defined ast node?
# Used by the cloner.
non_visitable_types:
  - "bool"
  - "flavor_type"
  - "flow_exception_kind"
  - "libport::Symbol"
  - "loc"
  - "object::rObject"
  - "std::string"
  - "ufloat"

# In the cloner, these require "recurse_collection".
collections:
  - "exec_exps_type"
  - "exps_type"
  - "symbols_type"

# The function to clear a list of pointers.
deep_clear: "libport::deep_clear"

# The beginning of visitor.hh, for includes.
visitor_hh_prologue: |2

  # include <functional>

  # include <boost/preprocessor/array.hpp>
  # include <boost/preprocessor/repeat.hpp>

  # include <libport/select-const.hh>

  # include "ast/fwd.hh"

# The beginning of default-visitor.hh, for includes.
default_visitor_hh_prologue: |2

  # include <functional>
  # include <ostream>
  # include "ast/visitor.hh"
  # include "ast/fwd.hh"
  # include <libport/select-const.hh>

# The beginning of fwd.hh, for includes.
fwd_hh_prologue: |2

  # include <list>
  # include <vector>

  # include <libport/fwd.hh>
  # include <libport/separator.hh>

# The end of the fwd.hh file, in the namespace.
fwd_hh_epilogue: |2

    // List types.
    typedef std::list<Exp*> exps_type;
    typedef std::pair<Exp*, Exp*> exp_pair_type;
    typedef std::list<exp_pair_type> exp_pairs_type;
    // FIXME: Should not be pointers, but the machinery is not ready
    // for that.
    typedef std::list<libport::Symbol*> symbols_type;

printer_cc_prologue: |2

  #include <libport/foreach.hh>
  #include <libport/escape.hh>
  #include <libport/indent.hh>
  #include <libport/pair.hh>

  #include <kernel/userver.hh>
---

# ----------- #
# AST Nodes.  #
# ----------- #<commit_msg>Cleanup.<commit_after>#                                                      -*- Yaml -*-
#
---

# ---------------- #
# AST parameters.  #
# ---------------- #

# The base directory to prepend to all the file names generated in the
# generated Makefile snippet.  If this ast-nodes.mk is to be included
# by ast/Makefile.am, then define to empty.  If it is included by its
# parent Makefile.am, define to "ast/".
ast_basedir: "ast/"

# The name of the directory/namespace that contains our auxiliary C++
# library.
auxlib: "libport"

# The name of the directory/namespace that contains the cloner.
clonerlib: "ast"

# The generator will accept these types as is, without looking for a
# particular header.  Also, they are handled by copy.
atomic_types:
  - "bool"
  - "int"
  - "unsigned"
  - "ufloat"

# Likewise, but these types are handled by references, because of
# their size.
# compound_types:
# - "DecsList::decs_type"

# In most cases, the name of the header to include can be computed
# from the name of the type.  Below are the exceptions.
includes_map:
  "exec_exps_type":      '"ast/fwd.hh"'
  "exp_pair_type":       '"ast/exp.hh"'
  "exp_pairs_type":      '"ast/exp.hh"'
  "exps_type":           '"ast/exp.hh"'
  "flavor_type":         '"ast/flavor.hh"'
  "flow_exception_kind": '"ast/flow-exception.hh"'
  "libport::Symbol":     '<libport/symbol.hh>'
  "object::rObject":     '"object/object.hh"'
  "slot_type":           '"ast/fwd.hh"'
  "slots_type":          '"ast/fwd.hh"'
  "std::string":         '<string>'
  "symbols_type":        '"ast/fwd.hh"'
  "ufloat":              '<libport/ufloat.h>'

# FIXME: Can't we compute this list from atomic_types?  Or simply, one
# cannot visit something which is not a defined ast node?
# Used by the cloner.
non_visitable_types:
  - "bool"
  - "flavor_type"
  - "flow_exception_kind"
  - "libport::Symbol"
  - "loc"
  - "object::rObject"
  - "std::string"
  - "ufloat"

# In the cloner, these require "recurse_collection".
collections:
  - "exec_exps_type"
  - "exps_type"
  - "symbols_type"

# The function to clear a list of pointers.
deep_clear: "libport::deep_clear"

# The beginning of visitor.hh, for includes.
visitor_hh_prologue: |2

  # include <functional>

  # include <boost/preprocessor/array.hpp>
  # include <boost/preprocessor/repeat.hpp>

  # include <libport/select-const.hh>

  # include "ast/fwd.hh"

# The beginning of default-visitor.hh, for includes.
default_visitor_hh_prologue: |2

  # include <functional>
  # include <ostream>
  # include "ast/visitor.hh"
  # include "ast/fwd.hh"
  # include <libport/select-const.hh>

# The beginning of fwd.hh, for includes.
fwd_hh_prologue: |2
  # include <list>
  # include <vector>

  # include <libport/fwd.hh>
  # include <libport/separator.hh>

# The end of the fwd.hh file, in the namespace.
fwd_hh_epilogue: |2

    // List types.
    typedef std::list<Exp*> exps_type;
    typedef std::pair<Exp*, Exp*> exp_pair_type;
    typedef std::list<exp_pair_type> exp_pairs_type;
    // FIXME: Should not be pointers, but the machinery is not ready
    // for that.
    typedef std::list<libport::Symbol*> symbols_type;

printer_cc_prologue: |2

  #include <libport/foreach.hh>
  #include <libport/escape.hh>
  #include <libport/indent.hh>
  #include <libport/pair.hh>

  #include <kernel/userver.hh>
---

# ----------- #
# AST Nodes.  #
# ----------- #
{'fraction_non_alphanumeric': 0.14768252044834898, 'fraction_numerical': 0.001514692517418964, 'mean_word_length': 3.026219512195122, 'pattern_counts': {'":': 24, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7081326', 'n_tokens_mistral': 2336, 'n_tokens_neox': 2275, 'n_words': 634}