equal
deleted
inserted
replaced
1 module PascalParser ( |
1 module PascalParser ( |
2 pascalUnit |
2 pascalUnit, |
|
3 mainResultInit |
3 ) |
4 ) |
4 where |
5 where |
5 |
6 |
6 import Text.Parsec |
7 import Text.Parsec |
7 import Text.Parsec.Token |
8 import Text.Parsec.Token |
10 import Data.Maybe |
11 import Data.Maybe |
11 import Data.Char |
12 import Data.Char |
12 |
13 |
13 import PascalBasics |
14 import PascalBasics |
14 import PascalUnitSyntaxTree |
15 import PascalUnitSyntaxTree |
|
16 |
|
17 |
|
18 mainResultInit :: Phrase |
|
19 mainResultInit = (\(Right a) -> a) $ parse phrase "<built-in>" "main:= 0;" |
15 |
20 |
16 knownTypes :: [String] |
21 knownTypes :: [String] |
17 knownTypes = ["shortstring", "ansistring", "char", "byte"] |
22 knownTypes = ["shortstring", "ansistring", "char", "byte"] |
18 |
23 |
19 pascalUnit :: Parsec String u PascalUnit |
24 pascalUnit :: Parsec String u PascalUnit |