Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 803d2dabfb
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (33 sloc) 0.757 kB
(ns doroty
(:gen-class)
(:use [clarsec]
[ast]
[de.kotka.monad])
)
(def stringLit
(>>== stringLiteral make-string-lit))
(def number
(>>== natural make-number-lit))
(def reference
(>>== identifier make-reference))
(def structureDef
(let-bind [label identifier
_ (symb "=")
val expression]
(result (make-struct-def label val))))
(def structure
(brackets (sepBy structureDef comma)))
(def literal
(either structure number stringLit reference))
(def predecl
(string "undef"))
(def select
(string "ugo"))
(def expression
literal)
(def statement
(either predecl select expression))
(def body
(endBy statement semi))
(def source
(followedBy body (lexeme eof)))
Jump to Line
Something went wrong with that request. Please try again.