1. Anton Golov
  2. Toy C#-ish compiler

Source

Toy C#-ish compiler / ParseUtils.hs

module ParseUtils where

import ParseLib.Abstract

import CSharpLex
import CSharpGram

start :: Parser s a -> [s] -> a
start p = fst . head . filter (null . snd) . parse p

-- For easy debugging
ls = start lexicalScanner
qp p = start p . ls
pe = qp pExpr
ps = qp pStat
pm = qp pMember
pc = qp pClass