Skip to content

Commit

Permalink
Reformatted DotGParser
Browse files Browse the repository at this point in the history
  • Loading branch information
mechkg committed Apr 11, 2012
1 parent 7dfbb59 commit 695a15a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ object DotGParser extends Parsers with RegexParsers {
def parseTask(file: File) = new Task[DotG, String] {
def runTask(tc: TaskControl) =
(tc.descriptionUpdate("Reading " + file.getPath) >>=| (parseDotG(file))).map {
case Left(err) => Left(Some(err))
case Right(dotg) => Right(dotg)
case Left(err) => Left(Some(err))
case Right(dotg) => Right(dotg)
}
}
}

object Test extends App {
DotGParser.parseDotG(new File("e:/winpetrify/stgshka.g")) match {
case Left(err) => println (err)
case Right(dotg) => println (PetriNetBuilder.buildPetriNet(dotg).unsafePerformIO)
case Left(err) => println(err)
case Right(dotg) => println(PetriNetBuilder.buildPetriNet(dotg).unsafePerformIO)
}
}

0 comments on commit 695a15a

Please sign in to comment.