Rev | Line | |
---|
[f1563c0] | 1 | #! /usr/bin/perl |
---|
| 2 | |
---|
| 3 | use locale; |
---|
| 4 | use strict; |
---|
| 5 | |
---|
| 6 | my $file = shift; |
---|
| 7 | my $filename; |
---|
| 8 | |
---|
| 9 | if ($file eq "") { |
---|
| 10 | print "Podaj nazwê pliku.\n"; |
---|
| 11 | exit(1); |
---|
| 12 | } |
---|
| 13 | |
---|
| 14 | if ($file =~ /(.*)\.dic/) |
---|
| 15 | { |
---|
| 16 | $filename = $1; |
---|
| 17 | } |
---|
| 18 | else |
---|
| 19 | { |
---|
| 20 | print "The input file must have .dic extension."; |
---|
| 21 | exit(1); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | `makeLabels.pl > labels.sym`; |
---|
| 25 | |
---|
| 26 | `lexmakelab labels`; |
---|
| 27 | |
---|
| 28 | print "Kanonizujê opisy........................................."; |
---|
| 29 | |
---|
| 30 | #`canon.pl <$file >temp2`; |
---|
| 31 | |
---|
| 32 | print "Kompilujê automat........................................"; |
---|
| 33 | |
---|
| 34 | `lexcomplex -l labels.lab -S labels.scl <$file > temp1`; |
---|
| 35 | |
---|
| 36 | print "OK\n"; |
---|
| 37 | |
---|
| 38 | print "Usuwam epsilon-przejscia................................."; |
---|
| 39 | |
---|
| 40 | `fsmrmepsilon temp1> temp2`; |
---|
| 41 | |
---|
| 42 | print "OK\n"; |
---|
| 43 | |
---|
| 44 | print "Determinizujê automat...................................."; |
---|
| 45 | |
---|
| 46 | `fsmdeterminize temp2 > temp1`; |
---|
| 47 | |
---|
| 48 | print "OK\n"; |
---|
| 49 | |
---|
| 50 | print "Minimalizujê automat....................................."; |
---|
| 51 | |
---|
| 52 | `fsmminimize temp1> temp2`; |
---|
| 53 | |
---|
| 54 | print "OK\n"; |
---|
| 55 | |
---|
| 56 | print "Konwertujê automat do formatu fsa........................"; |
---|
| 57 | |
---|
| 58 | `fsmprint -i labels.lab temp2> temp1`; |
---|
| 59 | |
---|
| 60 | `cp temp1 pofsmprint`; |
---|
| 61 | |
---|
| 62 | `../fsm2aut temp1> temp2`; |
---|
| 63 | |
---|
| 64 | `./aut2fsa.nowy < temp2> $filename.bin`; |
---|
| 65 | |
---|
| 66 | print "OK\n"; |
---|
| 67 | |
---|
| 68 | print "Czyszczê pliki pomocnicze................................"; |
---|
| 69 | |
---|
| 70 | `rm temp2`; |
---|
| 71 | `rm temp1`; |
---|
| 72 | #`rm labels.*`; |
---|
| 73 | |
---|
| 74 | print "OK\n"; |
---|
| 75 | |
---|
Note: See
TracBrowser
for help on using the repository browser.