Commit dc3d4d6a7282e94d0457f6868a68fc6766a194b4
1 parent
b4948e20
Proposition correction gram.txt
Showing
1 changed file
with
9 additions
and
0 deletions
Show diff stats
scripts/gram.txt
... | ... | @@ -13,6 +13,7 @@ Bienvenue dans l'outil d'aide au codage |
13 | 13 | Traducteur version 1.0, B. CONRARD |
14 | 14 | Grammaire du 14/5/14 modifie pour IMA2A |
15 | 15 | modifié pour ROUSSEL et SUN |
16 | +modifié par GBONTOUX le 29/05/17 | |
16 | 17 | |
17 | 18 | [instruction]:inst |
18 | 19 | ; {SOURCE}{inst} |
... | ... | @@ -79,6 +80,14 @@ eti{NUM0}: |
79 | 80 | [blanc]* "," [blanc]* [VariableIO]:var [blanc]* [SymboleAffectation] [blanc]* [Expression]:exp [blanc]* |
80 | 81 | {exp} OUT {var},R16 |
81 | 82 | |
83 | +[blanc]* "," [blanc]* [Tableau]:var [Expression]:ind [blanc]* "]" [blanc]* [SymboleAffectation] [blanc]* [Expression]:exp [blanc]* | |
84 | +{ind} LDI R26,low({var}) | |
85 | + LDI R27,high({var}) | |
86 | + CLR R17 | |
87 | + ADD R26,R16 | |
88 | + ADC R27,R17 | |
89 | +{exp} ST X,R16 | |
90 | + | |
82 | 91 | [blanc]* "," [blanc]* [Variable]:var [blanc]* [SymboleAffectation] [blanc]* [Expression]:exp [blanc]* |
83 | 92 | {exp} STS {var},R16 |
84 | 93 | ... | ... |