Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2024_compilation_bauquin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BAUQUIN Niels
2024_compilation_bauquin
Commits
cb4c2bd6
Commit
cb4c2bd6
authored
1 year ago
by
BAUQUIN Niels
Browse files
Options
Downloads
Patches
Plain Diff
zqfeqsg
parent
9aedd869
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/l.cfg
+50
-7
50 additions, 7 deletions
src/l.cfg
with
50 additions
and
7 deletions
src/l.cfg
+
50
−
7
View file @
cb4c2bd6
...
...
@@ -11,9 +11,37 @@ Tokens
espaces
=
(' ' | 13 | 10)+;
commentaire
=
'#'
[[0 .. 0xffff] - [10 + 13]]* (10 | 13 | 10 13);
plus
=
'+'
;
nombre
=
chiffre+;
ou
=
'|'
;
et = '&';
egal
=
'='
;
inf = '<';
infegal
=
'<='
;
sup = '>';
supegal
=
'>='
;
plus = '+';
moins
=
'-'
;
mul = '*';
div
=
'/'
;
non = '!';
gpar
=
'('
;
dpar = ')';
vrai
=
'vrai'
;
faux = 'faux';
tantque
=
'tantque'
;
faire = 'faire';
pvirg
=
';'
;
si = 'si';
alors
=
'alors'
;
sinon = 'sinon';
retour
=
'retour'
;
gacc = '{';
dacc
=
'}'
;
epsilon = ;
id
=
alpha[alpha + chiffre]+;
gcro
=
'['
;
dcro = ']';
virg
=
','
;
Ignored
Tokens
...
...
@@ -21,12 +49,27 @@ espaces, commentaire;
Productions
//
l'axiome
exp
=
{ou} exp ou exp1 | {exp1} exp1;
exp1
=
{et} exp1 et exp2 | {exp2} exp2;
exp2
=
{egal} exp2 egal exp3 | {inf} exp2 inf exp3 | {exp3} exp3;
exp3
=
{plus} exp3 plus exp4 | {moins} exp3 moins exp4 | {exp4} exp4;
exp4
=
{mul} exp4 mul exp5 | {div} exp4 div exp5 | {exp5} exp5;
exp5
=
{non} non exp5 | {exp6} exp6;
exp6
=
{parenthesis} gpar exp dpar | {nombre} nombre | {vrai} vrai | {faux} faux ;
ins
=
{affectation} var egal exp |
{fairetantque}
tantque
exp
faire
bloc
|
{fonction}
id
gpar
lexp
dpar
|
{sisinon}
si
exp
alors
[alors1]
:
bloc
sinon
[sinon1]
:
bloc
|
{sialors}
si
exp
alors
bloc
|
{retour}
retour
exp
pvirg
;
bloc
=
{accolades} gacc lins dacc;
lins
=
{lins} ins lins | {epsilon} epsilon;
programme
=
exp ;
lexp
=
{lexp2} lexp2 | {epsilon} epsilon;
lexp2
=
{virgule} exp virg lexp2 | {exp} exp;
exp
=
{plus}
exp
plus
nombre
|
{nb}
nombre
;
var
=
{id} id | {crochets} id gcro exp dcro;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment