don't generate parser_PGM if PGM doesn't exist
@@ -154,7 +154,9 @@ public class Kompile {
CompiledDefinition def = new CompiledDefinition(kompileOptions, parsedDef, kompiledDefinition, files, kem, configInfo.getDefaultCell(configInfo.getRootCell()).klabel());
if (kompileOptions.experimental.genBisonParser || kompileOptions.experimental.genGlrBisonParser) {
+ if (def.configurationVariableDefaultSorts.containsKey("$PGM")) {
new KRead(kem, files, InputModes.PROGRAM).createBisonParser(def.programParsingModuleFor(def.mainSyntaxModuleName(), kem).get(), def.programStartSymbol, files.resolveKompiled("parser_PGM"), kompileOptions.experimental.genGlrBisonParser, kompileOptions.experimental.bisonFile, kompileOptions.experimental.bisonStackMaxDepth);
+ }
for (Production prod : iterable(kompiledDefinition.mainModule().productions())) {
if (prod.att().contains("cell") && prod.att().contains("parser")) {
String att = prod.att().get("parser");
