Module: Rattler::Compiler::Optimizer::Optimizations

Included in:
Rattler::Compiler::Optimizer, OptimizeChildren
Defined in:
lib/rattler/compiler/optimizer/optimizations.rb

Overview

Optimizations defines the sequence of optimizations to apply to optimize parsers

Instance Method Summary collapse

Instance Method Details

#optimizationsOptimization

Returns the sequence of optimizations to apply to optimize parsers.

Returns:

  • (Optimization)

    the sequence of optimizations to apply to optimize parsers



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/rattler/compiler/optimizer/optimizations.rb', line 11

def optimizations
  @optimizations ||=
    InlineRegularRules >>
    OptimizeChildren >>
    SimplifyRedundantRepeat >>
    RemoveMeaninglessWrapper >>
    SimplifyTokenMatch >>
    FlattenSequence >>
    FlattenChoice >>
    ReduceRepeatMatch >>
    JoinPredicateMatch >>
    JoinPredicateOrMatch >>
    JoinMatchSequence >>
    JoinMatchChoice
end