From 6cf98102128c2f9d3757a12e6916fcb63cba362b Mon Sep 17 00:00:00 2001 From: Adrian Pop Date: Thu, 12 Sep 2019 14:27:32 +0200 Subject: [PATCH] use the section names from the spec, better clean in the Makefile --- grammar/{Lexer.g => B1_lexical_conventions.g} | 2 +- grammar/{Parser_stored_definition.g => B21_stored_definition.g} | 2 +- grammar/{Parser_class_definition.g => B22_class_definition.g} | 2 +- grammar/{Parser_extends.g => B23_extends.g} | 2 +- grammar/{Parser_component_clause.g => B24_component_clause.g} | 2 +- grammar/{Parser_modification.g => B25_modification.g} | 2 +- grammar/{Parser_equations.g => B26_equations.g} | 2 +- grammar/{Parser_expressions.g => B27_expressions.g} | 2 +- grammar/Makefile | 2 +- grammar/Modelica.g | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) rename grammar/{Lexer.g => B1_lexical_conventions.g} (96%) rename grammar/{Parser_stored_definition.g => B21_stored_definition.g} (78%) rename grammar/{Parser_class_definition.g => B22_class_definition.g} (97%) rename grammar/{Parser_extends.g => B23_extends.g} (88%) rename grammar/{Parser_component_clause.g => B24_component_clause.g} (92%) rename grammar/{Parser_modification.g => B25_modification.g} (96%) rename grammar/{Parser_equations.g => B26_equations.g} (98%) rename grammar/{Parser_expressions.g => B27_expressions.g} (98%) diff --git a/grammar/Lexer.g b/grammar/B1_lexical_conventions.g similarity index 96% rename from grammar/Lexer.g rename to grammar/B1_lexical_conventions.g index 0e2488acc..ec398739d 100644 --- a/grammar/Lexer.g +++ b/grammar/B1_lexical_conventions.g @@ -1,4 +1,4 @@ -lexer grammar Lexer; +lexer grammar B1_lexical_conventions; // Whitespace and comments diff --git a/grammar/Parser_stored_definition.g b/grammar/B21_stored_definition.g similarity index 78% rename from grammar/Parser_stored_definition.g rename to grammar/B21_stored_definition.g index f71c77f83..9123b5efe 100644 --- a/grammar/Parser_stored_definition.g +++ b/grammar/B21_stored_definition.g @@ -1,4 +1,4 @@ -parser grammar Parser_stored_definition; +parser grammar B21_stored_definition; // Stored Definition - Within diff --git a/grammar/Parser_class_definition.g b/grammar/B22_class_definition.g similarity index 97% rename from grammar/Parser_class_definition.g rename to grammar/B22_class_definition.g index 2da04b8f1..4b5cda4c0 100644 --- a/grammar/Parser_class_definition.g +++ b/grammar/B22_class_definition.g @@ -1,4 +1,4 @@ -parser grammar Parser_class_definition; +parser grammar B22_class_definition; // Class Definition diff --git a/grammar/Parser_extends.g b/grammar/B23_extends.g similarity index 88% rename from grammar/Parser_extends.g rename to grammar/B23_extends.g index ee043adf1..0ec2829d8 100644 --- a/grammar/Parser_extends.g +++ b/grammar/B23_extends.g @@ -1,4 +1,4 @@ -parser grammar Parser_extends; +parser grammar B23_extends; // Extends diff --git a/grammar/Parser_component_clause.g b/grammar/B24_component_clause.g similarity index 92% rename from grammar/Parser_component_clause.g rename to grammar/B24_component_clause.g index 6ef3cba54..48f0651c6 100644 --- a/grammar/Parser_component_clause.g +++ b/grammar/B24_component_clause.g @@ -1,4 +1,4 @@ -parser grammar Parser_component_clause; +parser grammar B24_component_clause; // Component Clause diff --git a/grammar/Parser_modification.g b/grammar/B25_modification.g similarity index 96% rename from grammar/Parser_modification.g rename to grammar/B25_modification.g index ff74f8806..04b534663 100644 --- a/grammar/Parser_modification.g +++ b/grammar/B25_modification.g @@ -1,4 +1,4 @@ -parser grammar Parser_modification; +parser grammar B25_modification; // Modification diff --git a/grammar/Parser_equations.g b/grammar/B26_equations.g similarity index 98% rename from grammar/Parser_equations.g rename to grammar/B26_equations.g index 27e82ab6a..236c12707 100644 --- a/grammar/Parser_equations.g +++ b/grammar/B26_equations.g @@ -1,4 +1,4 @@ -parser grammar Parser_equations; +parser grammar B26_equations; // Equations diff --git a/grammar/Parser_expressions.g b/grammar/B27_expressions.g similarity index 98% rename from grammar/Parser_expressions.g rename to grammar/B27_expressions.g index a17454191..c5b34a4a1 100644 --- a/grammar/Parser_expressions.g +++ b/grammar/B27_expressions.g @@ -1,4 +1,4 @@ -parser grammar Parser_expressions; +parser grammar B27_expressions; // Expressions diff --git a/grammar/Makefile b/grammar/Makefile index 2b8616509..5c2ca60b5 100644 --- a/grammar/Makefile +++ b/grammar/Makefile @@ -9,4 +9,4 @@ all: $(ALL_G4) mv $@.tmp $@ clean: - rm -rf *Listener*.java ModelicaLexer.java ModelicaParser.java Modelica_*.java *.tokens *.interp *.g4 \ No newline at end of file + rm -rf *Listener*.java ModelicaLexer.java ModelicaParser.java Modelica_*.java *.tokens *.interp *.g4 *.class \ No newline at end of file diff --git a/grammar/Modelica.g b/grammar/Modelica.g index 82ed514ec..fcb707b94 100644 --- a/grammar/Modelica.g +++ b/grammar/Modelica.g @@ -5,7 +5,7 @@ options { } -import Lexer, Parser_stored_definition, Parser_class_definition, Parser_extends, Parser_component_clause, Parser_modification, Parser_equations, Parser_expressions; +import B1_lexical_conventions, B21_stored_definition, B22_class_definition, B23_extends, B24_component_clause, B25_modification, B26_equations, B27_expressions; start_rule: stored_definition;