Learn R Programming

sketch (version 1.1.20.3)

combine_rules: Combine rules for fast transpilation

Description

This function turns an n-pass transpilation into k-pass, where n is the number of rules and k is the number of precedence groups.

Usage

combine_rules(rs, group = rep(1, length(rs)))

Arguments

rs

A list of rewriting rules (each of which is an output from make_rule).

group

A numeric vector; the precedence group. Rules with a higher precedence come before the the ones with lower precedence, and they are processed by the transpiler first. For rules with the same precedence, the natural order (in which they show up) determines which rules get processed first.