Skip to content

Commit 1d098f9

Browse files
author
Diego Imbert
committed
Initial commit
0 parents  commit 1d098f9

13 files changed

Lines changed: 135 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode
2+
dist-newstyle
3+
.stack-work

‎README.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# TP 2 de language formel
2+
3+
> Ce programme utilise le build system `stack 2.5.1` et le compilateur `ghc 8.10.4`.
4+
> Ces outils et les dépendances étant longs à télecharger, je fournirais le TP terminé et pré-compilé dans `./bin`.
5+
6+
## Lancer le programme
7+
8+
Dans la racine du projet, ```./bin/stack-automata path/to/automata expression```
9+
10+
## Structure du projet
11+
12+
La fonction main se trouve dans `./app`.
13+
`./src` contient des modules utilisés par main.
14+
Le dossier `automatas` contient des automates de test.
15+
Les options de compilations et les dépendances sont dans `package.yml`.

‎Setup.hs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain

‎app/Main.hs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Main where
2+
3+
import Lib
4+
5+
main :: IO ()
6+
main = someFunc

‎automatas/anan.ap‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
0 a ZZ A.ZZ 0
2+
0 a A A.A 0
3+
0 a A % 1
4+
1 a A % 1
5+
1 % ZZ % 22
6+
A 22

‎automatas/anbn.ap‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
0 a Z A.Z 0
2+
0 a A A.A 0
3+
0 b A % 1
4+
1 b A % 1
5+
1 % Z % 2
6+
A 2

‎automatas/anbn.gr‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
S a.S.b
2+
S %
3+

‎automatas/astarbstar.gr‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
S A.B
2+
A a.A
3+
B B.b
4+
A %
5+
B %
6+

‎package.yml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: stack-automata
2+
version: 0.1.0.0
3+
github: "RedRikudo/StackAutomata"
4+
author: "Diego Imbert"
5+
maintainer: "imbert.diego05000@gmail.com"
6+
7+
dependencies:
8+
- base >= 4.14 && < 5
9+
10+
library:
11+
source-dirs: src
12+
13+
executables:
14+
stack-automata-exe:
15+
main: Main.hs
16+
source-dirs: app
17+
ghc-options:
18+
- -threaded
19+
- -rtsopts
20+
- -with-rtsopts=-N
21+
- -Wall
22+
- -O3
23+
dependencies:
24+
- stack-automata

‎src/Lib.hs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Lib where
2+
3+
someFunc :: IO ()
4+
someFunc = putStrLn "Hello Automatas! :D"

0 commit comments

Comments
 (0)