Changeset 6 for trunk/YamlReference/yaml2yeast-test
- Timestamp:
- 04/06/08 04:24:28 (9 months ago)
- Files:
-
- 1 modified
-
trunk/YamlReference/yaml2yeast-test/Main.hs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/YamlReference/yaml2yeast-test/Main.hs
r3 r6 75 75 | WithN -- ^ Production requiring $n$ argument. 76 76 | WithC -- ^ Production requiring $c$ argument. 77 | WithS -- ^ Production requiring $s$ argument.78 77 | WithT -- ^ Production requiring $t$ argument. 79 78 | WithNC -- ^ Production requiring $n$ and $c$ arguments. 80 | WithNS -- ^ Production requiring $n$ and $s$ arguments.81 79 | WithNT -- ^ Production requiring $n$ and $t$ arguments. 82 80 deriving Eq … … 90 88 WithN -> " n" 91 89 WithC -> " c" 92 WithS -> " s"93 90 WithT -> " t" 94 91 WithNC -> " n c" 95 WithNS -> " n s"96 92 WithNT -> " n t" 97 93 … … 118 114 testType file = do withN <- isWith "n" file 119 115 withC <- isWith "c" file 120 withS <- isWith "s" file121 116 withT <- isWith "t" file 122 case (withN, withC, withS, withT) of 123 (False, False, False, False) -> return Plain 124 (True, False, False, False) -> return WithN 125 (False, False, True, False) -> return WithS 126 (False, True, False, False) -> return WithC 127 (False, False, False, True) -> return WithT 128 (True, True, False, False) -> return WithNC 129 (True, False, True, False) -> return WithNS 130 (True, False, False, True) -> return WithNT 131 (_, _, _, _) -> error $ file ++ ": unknown parameters combination" 117 case (withN, withC, withT) of 118 (False, False, False) -> return Plain 119 (True, False, False) -> return WithN 120 (False, True, False) -> return WithC 121 (False, False, True) -> return WithT 122 (True, True, False) -> return WithNC 123 (True, False, True) -> return WithNT 124 (_, _, _) -> error $ file ++ ": unknown parameters combination" 132 125 133 126 -- | @testProduction file@ extracts the production name from a test input … … 178 171 WithN -> tokenizerWithN (testProduction inputFile) (testParameter "n" inputFile) 179 172 WithC -> tokenizerWithC (testProduction inputFile) (testParameter "c" inputFile) 180 WithS -> tokenizerWithS (testProduction inputFile) (testParameter "s" inputFile)181 173 WithT -> tokenizerWithT (testProduction inputFile) (testParameter "t" inputFile) 182 174 WithNC -> tokenizerWithNC (testProduction inputFile) (testParameter "n" inputFile) (testParameter "c" inputFile) 183 WithNS -> tokenizerWithNS (testProduction inputFile) (testParameter "n" inputFile) (testParameter "s" inputFile)184 175 WithNT -> tokenizerWithNT (testProduction inputFile) (testParameter "n" inputFile) (testParameter "t" inputFile) 185 176 case result of
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)