optgen rulenames test.opt
define And {
    Left  Expr
    Right Expr
}

define True {}

define Join {
    Left  Expr
    Right Expr
}

[EliminateEmptyAnd, Normalize]
(And $conditions:[]) => (True)

[EliminateSingletonAnd, Normalize]
(And $conditions:[ $item:* ]) => $item

[CommuteJoin, Explore]
(Join $r:* $s:*) => (Join $s $r)
----
----
// Code generated by optgen; [omitted]

package opt

const (
	startAutoRule RuleName = iota + NumManualRuleNames

	// ------------------------------------------------------------
	// Normalize Rule Names
	// ------------------------------------------------------------
	EliminateEmptyAnd
	EliminateSingletonAnd

	// startExploreRule tracks the number of normalization rules;
	// all rules greater than this value are exploration rules.
	startExploreRule

	// ------------------------------------------------------------
	// Explore Rule Names
	// ------------------------------------------------------------
	CommuteJoin

	// NumRuleNames tracks the total count of rule names.
	NumRuleNames
)
----
----
