Skip to content

Instantly share code, notes, and snippets.

View pooya-raz's full-sized avatar
🏠
Working from home

pooya-raz

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@pooya-raz
pooya-raz / instaparse-sexp.clj
Created August 13, 2013 14:32
An example of parsing a simple sexp in instaparse
(ns parse.core
(:require [instaparse.core :as insta]))
(def parser
(insta/parser
"sexp = lparen operation rparen
<lparen> = <'('>
<rparen> = <')'>
operation = operator + args
operator = '+'
require 'router'
use Rack::CommonLogger
use Rack::ShowExceptions
use Rack::Lint
use Rack::Static, :urls => ["/static"]
run Router.new