| Line | |
|---|
| 1 | #! /usr/bin/perl |
|---|
| 2 | |
|---|
| 3 | use locale; |
|---|
| 4 | use strict; |
|---|
| 5 | |
|---|
| 6 | my $file = shift; |
|---|
| 7 | |
|---|
| 8 | if ($file eq "") { |
|---|
| 9 | print "Podaj nazwê pliku.\n"; |
|---|
| 10 | exit(0); |
|---|
| 11 | } |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | `makeLabels.pl > labels.sym`; |
|---|
| 15 | |
|---|
| 16 | `lexmakelab labels`; |
|---|
| 17 | |
|---|
| 18 | print "Pobieram informacje ze s³ownika.........................."; |
|---|
| 19 | |
|---|
| 20 | `cut -d \\; -f 1 <$file > temp1`; |
|---|
| 21 | |
|---|
| 22 | `sort -u < temp1 > temp2`; |
|---|
| 23 | |
|---|
| 24 | print "OK\n"; |
|---|
| 25 | |
|---|
| 26 | print "Kompilujê automat........................................"; |
|---|
| 27 | |
|---|
| 28 | `lexcomplex -l labels.lab -S labels.scl <temp2 > temp1`; |
|---|
| 29 | |
|---|
| 30 | print "OK\n"; |
|---|
| 31 | |
|---|
| 32 | print "Usuwam epsilon-przejscia................................."; |
|---|
| 33 | |
|---|
| 34 | `fsmrmepsilon temp1> temp2`; |
|---|
| 35 | |
|---|
| 36 | print "OK\n"; |
|---|
| 37 | |
|---|
| 38 | print "Determinizujê automat...................................."; |
|---|
| 39 | |
|---|
| 40 | `fsmdeterminize temp2 > temp1`; |
|---|
| 41 | |
|---|
| 42 | print "OK\n"; |
|---|
| 43 | |
|---|
| 44 | print "Minimalizujê automat....................................."; |
|---|
| 45 | |
|---|
| 46 | `fsmminimize temp1> temp2`; |
|---|
| 47 | |
|---|
| 48 | print "OK\n"; |
|---|
| 49 | |
|---|
| 50 | print "Konwertujê automat do formatu fsa........................"; |
|---|
| 51 | |
|---|
| 52 | `fsmprint -i labels.lab temp2> temp1`; |
|---|
| 53 | |
|---|
| 54 | `../fsm2aut temp1> temp2`; |
|---|
| 55 | |
|---|
| 56 | `../aut2fsa < temp2> cor.dic`; |
|---|
| 57 | |
|---|
| 58 | print "OK\n"; |
|---|
| 59 | |
|---|
| 60 | print "Czyszczê pliki pomocnicze................................"; |
|---|
| 61 | |
|---|
| 62 | `rm temp2`; |
|---|
| 63 | `rm temp1`; |
|---|
| 64 | `rm labels.*`; |
|---|
| 65 | |
|---|
| 66 | print "OK\n"; |
|---|
| 67 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.