Rewrites a context-free grammar to read better without changing the language of any variable. It holds the rewrite rules with their proofs, a cost model that ranks candidates, and a search over right-hand sides.
readableGrammar, semanticReadability, traceReadability)readableGrammarSearch, semanticReadabilitySearch)cartesianRhsSeeds)optimizeRhs)findRedundantProduction, verifyRedundancy)A -> A A and A -> A of a variable that also has A -> ε and appends A to its other productions. (normalizeConcatenationClosure)lowerGrammarRhs)grammarMetrics, grammarReadabilityCost)rhsEmpty, rhsEpsilon, rhsTerminal, rhsVariable, rhsUnion, rhsConcat, grammarRhsExpression)dumpRhs, dumpReadability)RhsExpression)RewriteProof)ReadabilityTraceStep, traceReadability)RedundancyCertificate, RedundancySearch, DEFAULT_REDUNDANCY_SEARCH)ReadableGrammarOptions, ReadableGrammarResult, ReadabilityNote, ReadabilityTraceStep)GrammarMetrics, ReadabilityCost, RhsOptimization, RHS_ALTERNATIVE_COST_PROFILES)rhsExpressionDecoder, grammarMetricsDecoder, rewriteProofDecoder, redundancyCertificateDecoder, rhsOptimizationDecoder, loweredGrammarDecoder, concatenationClosureResultDecoder, readableGrammarResultDecoder, cartesianSeedCandidateDecoder, cartesianSeedResultDecoder, concatenationClosureEvidenceDecoder, extendedClosureProductionDecoder, grammarReadabilityDecoder, readabilityCostDecoder, readabilityNoteDecoder, readabilityStepDecoder, readableGrammarOptionsDecoder, redundancySearchDecoder, redundancySearchOptionsDecoder, rewriteEvidenceDecoder, rhsCandidateDecoder, rhsCostProfileDecoder, rhsOperatorCostsDecoder)GrammarRewriteKind, PreservedLanguages, ReadabilityBranch, ReadabilityNoteCode, RewriteProofKind, RewriteRuleId, RhsCostProfileId, RhsImprovement, RhsOperator, SemanticMatchKind)