Skip to content

Commit

Permalink
op start
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexiscomete committed Feb 29, 2024
1 parent aa67e12 commit 283da12
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Grammaire.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,20 @@ Si j'ai oublié des règles, n'hésitez pas à l'indiquer.
<string> ::= '"' {(* - ('"' | \n)) | `\\"`} '"'
```

La différence entre `float` et `int` ne se fait pas dans la grammaire LL1, c'est bien ici le Lexer qui s'occupe de tout. Ainsi, l'ambiguïté n'est pas importante.

## Opérations

Le non-terminal `value` est considéré comme un acquis pour le moment. Il sera défini plus tard.

```
<take_prio> ::= "(" TODO ")" | <value>
<tp> ::= <take_prio>
<mult> ::= <tp> * <tp>
<div> ::= <tp> / <tp>
<md> ::= <mult> | <div>
<tp1> ::= ...
<plus> ::= <tp> + <tp>
```

EN COURS

0 comments on commit 283da12

Please sign in to comment.