From 39ead5a1226d8afd95062197710ec39457376bbe Mon Sep 17 00:00:00 2001 From: christophkloeffel Date: Mon, 16 Oct 2023 12:15:48 +0200 Subject: [PATCH] adds tracing for sections --- tests-system/{sections-1 => rbt-section-declaration}/foo.rsl | 0 tests-system/{sections-1 => rbt-section-declaration}/foo.trlc | 0 tests-system/{sections-1 => rbt-section-declaration}/output | 0 .../{sections-1 => rbt-section-declaration}/output.brief | 0 .../{sections-1 => rbt-section-declaration}/output.json | 0 .../{sections-1 => rbt-section-declaration}/output.smtlib | 0 trlc/ast.py | 3 +-- trlc/parser.py | 1 + 8 files changed, 2 insertions(+), 2 deletions(-) rename tests-system/{sections-1 => rbt-section-declaration}/foo.rsl (100%) rename tests-system/{sections-1 => rbt-section-declaration}/foo.trlc (100%) rename tests-system/{sections-1 => rbt-section-declaration}/output (100%) rename tests-system/{sections-1 => rbt-section-declaration}/output.brief (100%) rename tests-system/{sections-1 => rbt-section-declaration}/output.json (100%) rename tests-system/{sections-1 => rbt-section-declaration}/output.smtlib (100%) diff --git a/tests-system/sections-1/foo.rsl b/tests-system/rbt-section-declaration/foo.rsl similarity index 100% rename from tests-system/sections-1/foo.rsl rename to tests-system/rbt-section-declaration/foo.rsl diff --git a/tests-system/sections-1/foo.trlc b/tests-system/rbt-section-declaration/foo.trlc similarity index 100% rename from tests-system/sections-1/foo.trlc rename to tests-system/rbt-section-declaration/foo.trlc diff --git a/tests-system/sections-1/output b/tests-system/rbt-section-declaration/output similarity index 100% rename from tests-system/sections-1/output rename to tests-system/rbt-section-declaration/output diff --git a/tests-system/sections-1/output.brief b/tests-system/rbt-section-declaration/output.brief similarity index 100% rename from tests-system/sections-1/output.brief rename to tests-system/rbt-section-declaration/output.brief diff --git a/tests-system/sections-1/output.json b/tests-system/rbt-section-declaration/output.json similarity index 100% rename from tests-system/sections-1/output.json rename to tests-system/rbt-section-declaration/output.json diff --git a/tests-system/sections-1/output.smtlib b/tests-system/rbt-section-declaration/output.smtlib similarity index 100% rename from tests-system/sections-1/output.smtlib rename to tests-system/rbt-section-declaration/output.smtlib diff --git a/trlc/ast.py b/trlc/ast.py index 080c1cd7..6ce1f882 100644 --- a/trlc/ast.py +++ b/trlc/ast.py @@ -2894,6 +2894,7 @@ def perform_checks(self, mh): class Section(Entity): + # lobster-trace: LRM.Section_Declaration """A section for readability This represents a section construct in TRLC files to group record @@ -2909,13 +2910,11 @@ class Section(Entity): """ def __init__(self, name, location, parent): - # lobster-exclude: Constructor only declares variables super().__init__(name, location) assert isinstance(parent, Section) or parent is None self.parent = parent def dump(self, indent=0): # pragma: no cover - # lobster-exclude: Debugging feature self.write_indent(indent, "Section %s" % self.name) if self.parent is None: self.write_indent(indent + 1, "Parent: None") diff --git a/trlc/parser.py b/trlc/parser.py index dfeb1226..863c1ec4 100644 --- a/trlc/parser.py +++ b/trlc/parser.py @@ -1322,6 +1322,7 @@ def parse_check_block(self): return n_check_block def parse_section_declaration(self): + # lobster-trace: LRM.Section_Declaration self.match_kw("section") self.match("STRING") if self.section: