From 8f66b4af6605290f72327dcb173cc7fccb3e73ca Mon Sep 17 00:00:00 2001 From: dgelessus <dgelessus@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:35:45 +0100 Subject: [PATCH] Print conflicts only once --- .../java/org/sablecc/sablecc/SableCC.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/sablecc/sablecc/SableCC.java b/src/main/java/org/sablecc/sablecc/SableCC.java index 098a580..30800ad 100644 --- a/src/main/java/org/sablecc/sablecc/SableCC.java +++ b/src/main/java/org/sablecc/sablecc/SableCC.java @@ -252,21 +252,10 @@ public class SableCC { System.out.println("Generating utility classes."); tree.apply(new GenUtils(ast_ids)); - try { - System.out.println("Generating the lexer."); - tree.apply(new GenLexer(ids)); - } catch (RuntimeException e) { - System.out.println(e.getMessage()); - throw e; - } + System.out.println("Generating the lexer."); + tree.apply(new GenLexer(ids)); - try { - System.out.println("Generating the parser."); - tree.apply(new GenParser(ids, alt_ids, transform_ids, ast_ids - .getFirstAstProduction(), processInlining, prettyPrinting)); - } catch (RuntimeException e) { - System.out.println(e.getMessage()); - throw e; - } + System.out.println("Generating the parser."); + tree.apply(new GenParser(ids, alt_ids, transform_ids, ast_ids.getFirstAstProduction(), processInlining, prettyPrinting)); } } -- GitLab