From a24e9a933ff71ff6287d03bb7c0d60e1b1633c48 Mon Sep 17 00:00:00 2001 From: Michael Petter Date: Thu, 25 Mar 2021 11:46:30 +0100 Subject: [PATCH] added an error for duplicate labels --- src/cup/parser.cup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cup/parser.cup b/src/cup/parser.cup index e805de3..ba5bb1c 100644 --- a/src/cup/parser.cup +++ b/src/cup/parser.cup @@ -124,7 +124,9 @@ action code {: if (rhs_pos >= MAX_RHS) throw new Exception("Internal Error: Productions limited to " + MAX_RHS + " symbols and actions"); - + for (int i=0;i