Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-Sagaydak authored Mar 1, 2024
1 parent 0f962f1 commit f0efb02
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@

```sql
DECLARE
product_price CONSTANT INTEGER = 150;
expense_1_amount CONSTANT INTEGER := -50;
product_price CONSTANT INTEGER = +150;
```

```sql
Expand Down Expand Up @@ -173,24 +172,22 @@ DECLARE productPrice3 CONSTANT INTEGER := 150; DECLARE expense_amount_4 CONSTANT

### Грамматика

G[Z] = { V<sub>T</sub>, V<sub>N</sub>, P, Z }
G[&lt;ЦК&gt; = &lt;целочисленная константа&gt;]:

Z = <целочисленная константа>
V<sub>T</sub> = { ‘a’…’z’, ‘A’…’Z’, ‘0’…’9’, ‘:’, ‘;’, ‘+’, ‘-‘, ‘=’, ‘_’ }

V<sub>T</sub> = { ‘DECLARE’, ‘INTEGER’, ‘CONSTANT’, ‘a’…’z’, ‘A’…’Z’, ‘0’…’9’, ‘:’, ‘;’, ‘+’, ‘-‘, ‘=’, ‘_’ }

V<sub>N</sub> = { <целочисленная константа>, <выражение>, <константа>, <присваивание>, <число>, <знак>, <Б>, <Ц> }
V<sub>N</sub> = { &lt;ЦК&gt;, &lt;константа&gt;, &lt;присваивание&gt;, &lt;число&gt;, З, Б, Ц, E, ID }

P = {
1. <целочисленная константа> → ‘DECLARE’ ( <выражение> )<sup>+</sup>
2. <выражение>&lt;id&gt; <константа> <число> ’;’
3. &lt;id&gt;<Б> ( <Б> | <Ц> | ‘_)<sup>*</sup>
4. <константа> → ‘CONSTANT’ ’INTEGER’ <присваивание>
5. <число>[ <знак> ] ( <Ц> )<sup>+</sup>
6. <присваивание>[ ‘:’ ] '='
7. <знак>{ ‘+’ | ‘-‘ }
8. <Б> → ‘a’ | ‘b’ | … | ‘z’ | ‘A’ | ‘B’ | … | ‘Z’
9. <Ц> → ‘0’ | ‘1’ | … | ‘9’
1. &lt;ЦК&gt; → ‘DECLARE’ E
2. EID &lt;константа&gt; &lt;число&gt; ’;’
3. IDБ { Б | Ц | ‘_}<br>
4. &lt;константа&gt; → ‘CONSTANT’ ’INTEGER’ &lt;присваивание&gt;
5. &lt;число&gt;З [ Ц ]
6. &lt;присваивание&gt;‘:=’ | ‘=’
7. З → ‘+’ | ‘-‘ | ε
8. Б → ‘a’ | ‘b’ | … | ‘z’ | ‘A’ | ‘B’ | … | ‘Z’
9. Ц → ‘0’ | ‘1’ | … | ‘9’

}

Expand Down

0 comments on commit f0efb02

Please sign in to comment.