ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | List of all members
meta::parser::unary_chain_remover Class Reference

Transforms trees by removing any unary X -> X rules. More...

#include <unary_chain_remover.h>

Inheritance diagram for meta::parser::unary_chain_remover:
meta::parser::tree_transformer meta::parser::const_visitor< std::unique_ptr< node > >

Public Member Functions

std::unique_ptr< nodeoperator() (const leaf_node &) override
 
std::unique_ptr< nodeoperator() (const internal_node &) override
 

Additional Inherited Members

- Public Types inherited from meta::parser::const_visitor< std::unique_ptr< node > >
using result_type = std::unique_ptr< node >
 The result of running the visitor over the tree.
 

Detailed Description

Transforms trees by removing any unary X -> X rules.

These may arise from filtering out trace/empty nodes, for example, and may cause problems in parsing if they persist.

Member Function Documentation

std::unique_ptr< node > meta::parser::unary_chain_remover::operator() ( const leaf_node )
overridevirtual
Returns
the result of running the visitor on the supplied leaf node

Implements meta::parser::tree_transformer.

std::unique_ptr< node > meta::parser::unary_chain_remover::operator() ( const internal_node )
overridevirtual
Returns
the result of running the visitor on the supplied internal node

Implements meta::parser::tree_transformer.


The documentation for this class was generated from the following files: