Skip to content

Commit

Permalink
Rename things in grammar to reflect new name of the game
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Apr 28, 2023
1 parent f9afeca commit d737e33
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions RationaleMCP/0031/grammar.md
Expand Up @@ -4,7 +4,7 @@ The starting point for this Base Modelica grammar is the ANTLR grammar for Model

The intention is to develop the Base Modelica grammar as a modification (mainly consisting of restrictions) of the full Modelica grammar, and to make the differences clearly visible in this document. Hence, rather than just erasing the parts of the Modelica grammar that shouldn't be brought to Base Modelica, these parts will be marked with a strikeout.

The start rule of the Base Modelica grammar below is [_flat-modelica_](#Start-rule).
The start rule of the Base Modelica grammar below is [_base-modelica_](#Start-rule).


## B1 Lexical conventions
Expand Down Expand Up @@ -63,7 +63,7 @@ The _S-CHAR_ accepts Unicode other than " and \\:

## Start rule
> _flat-modelica_\
> _base-modelica_\
>   _VERSION-HEADER_\
>   **package** _IDENT_\
>    ( _class-definition_ **;**\
Expand All @@ -73,15 +73,15 @@ The _S-CHAR_ accepts Unicode other than " and \\:
>   **end** _IDENT_ **;**
Here, the _VERSION-HEADER_ is a Base Modelica variant of the not yet standardized language version header for Modelica proposed in [MCP-0015](https://github.com/modelica/ModelicaSpecification/tree/MCP/0015/RationaleMCP/0015):
> _VERSION-HEADER_`^\U+FEFF?//![ ]flat[ ][0-9]+[.][0-9]+[r.][0-9]+$`
> _VERSION-HEADER_`^\U+FEFF?//![ ]base[ ][0-9]+[.][0-9]+[r.][0-9]+$`
The `\U+FEFF?` at the very beginning is an optional byte order mark.

The _IDENT_ in the _flat-modelica_ rule must be the same identifier as in the _long-class-specifier_ following **model**.
The _IDENT_ in the _base-modelica_ rule must be the same identifier as in the _long-class-specifier_ following **model**.

As an example of the _flat-modelica_ rule, this is a minimal valid Base Modelica source:
As an example of the _base-modelica_ rule, this is a minimal valid Base Modelica source:
```
//! flat 3.5.0
//! base 3.5.0
package _F
model _F
end _F;
Expand Down

0 comments on commit d737e33

Please sign in to comment.