Skip to content

Instantly share code, notes, and snippets.

@aboekhoff
Created August 29, 2010 21:50
Show Gist options
  • Save aboekhoff/556734 to your computer and use it in GitHub Desktop.
Save aboekhoff/556734 to your computer and use it in GitHub Desktop.
space_283 = (function (ST_729) {
var rtn734_, v_440_;
v_440_ = re_267("\\s");
rtn734_ = v_440_(ST_729);
return rtn734_;
});
spaces_284 = (function (ST_730) {
var v_441_, rtn735_;
v_441_ = many_261(space_283);
rtn735_ = v_441_(ST_730);
return rtn735_;
});
lower_285 = (function (ST_731) {
var v_442_, rtn736_;
v_442_ = re_267("[a-z]");
rtn736_ = v_442_(ST_731);
return rtn736_;
});
upper_286 = (function (ST_732) {
var v_443_, rtn737_;
v_443_ = re_267("[A-Z]");
rtn737_ = v_443_(ST_732);
return rtn737_;
});
alpha_287 = (function (ST_733) {
var v_444_, rtn738_;
v_444_ = re_267("[a-zA-Z]");
rtn738_ = v_444_(ST_733);
return rtn738_;
});
digit_288 = (function (ST_734) {
var v_445_, rtn739_;
v_445_ = re_267("\\d");
rtn739_ = v_445_(ST_734);
return rtn739_;
});
symbolic_289 = (function (ST_735) {
var v_446_, rtn740_;
v_446_ = any_of_266("~!@$%^&*?+|/=\\-_:");
rtn740_ = v_446_(ST_735);
return rtn740_;
});
lexeme_290 = (function (P_736) {
var rtn741_;
rtn741_ = _GT__GT__255(spaces_284, P_736);
return rtn741_;
});
IDENT_START_291 = (function (ST_737) {
var rtn742_, v_450_, v_447_, v_449_, v_448_;
v_449_ = char_268("#");
v_448_ = not_COLON_parser_270(v_449_);
v_450_ = _LT__BAR__GT__279(alpha_287, symbolic_289);
v_447_ = _GT__GT__255(v_448_, v_450_);
rtn742_ = v_447_(ST_737);
return rtn742_;
});
IDENT_CONT_292 = (function (ST_738) {
var rtn743_, v_451_;
v_451_ = _LT__BAR__GT__279(alpha_287, digit_288, symbolic_289);
rtn743_ = v_451_(ST_738);
return rtn743_;
});
SYMBOL_293 = (function (ST_739) {
var v_453_, tmp_742, r_741, v_454_, st_740, A_743, v_463_, rtn744_, v_452_;
st_740 = ST_739;
r_741 = IDENT_START_291(st_740);
tmp_742 = false_QMARK__202(r_741);
v_452_ = (tmp_742 === true);
if (v_452_) {
rtn744_ = false;
} else {
v_453_ = (tmp_742 === false);
if (v_453_) {
A_743 = first_216(r_741);
v_454_ = (function (st_744) {
var B_747, v_457_, v_462_, r_745, v_458_, v_461_, v_455_, v_459_, v_460_, tmp_746, v_456_, rtn745_;
v_455_ = many_261(IDENT_CONT_292);
r_745 = v_455_(st_744);
tmp_746 = false_QMARK__202(r_745);
v_456_ = (tmp_746 === true);
if (v_456_) {
rtn745_ = false;
} else {
v_457_ = (tmp_746 === false);
if (v_457_) {
B_747 = first_216(r_745);
v_461_ = cons_219(A_743, B_747);
v_460_ = sequence__GT_string_234(v_461_);
v_459_ = symbol_242(v_460_);
v_458_ = return_256(v_459_);
v_462_ = second_218(r_745);
rtn745_ = v_458_(v_462_);
} else {
throw "if requires a boolean value";
};
};
return rtn745_;
});
v_463_ = second_218(r_741);
rtn744_ = v_454_(v_463_);
} else {
throw "if requires a boolean value";
};
};
return rtn744_;
});
KEYWORD_294 = (function (ST_748) {
var v_465_, rtn746_, v_466_, r_750, v_475_, __752, v_467_, tmp_751, v_464_, st_749;
st_749 = ST_748;
v_464_ = char_268(":");
r_750 = v_464_(st_749);
tmp_751 = false_QMARK__202(r_750);
v_465_ = (tmp_751 === true);
if (v_465_) {
rtn746_ = false;
} else {
v_466_ = (tmp_751 === false);
if (v_466_) {
__752 = first_216(r_750);
v_467_ = (function (st_753) {
var r_754, v_469_, v_470_, v_474_, rtn747_, v_473_, v_472_, XS_756, tmp_755, v_471_, v_468_;
v_468_ = many1_262(IDENT_CONT_292);
r_754 = v_468_(st_753);
tmp_755 = false_QMARK__202(r_754);
v_469_ = (tmp_755 === true);
if (v_469_) {
rtn747_ = false;
} else {
v_470_ = (tmp_755 === false);
if (v_470_) {
XS_756 = first_216(r_754);
v_473_ = sequence__GT_string_234(XS_756);
v_472_ = keyword_248(v_473_);
v_471_ = return_256(v_472_);
v_474_ = second_218(r_754);
rtn747_ = v_471_(v_474_);
} else {
throw "if requires a boolean value";
};
};
return rtn747_;
});
v_475_ = second_218(r_750);
rtn746_ = v_467_(v_475_);
} else {
throw "if requires a boolean value";
};
};
return rtn746_;
});
DECIMAL_295 = (function (ST_757) {
var v_477_, r_759, v_478_, A_761, tmp_760, v_487_, st_758, rtn748_, v_479_, v_476_;
st_758 = ST_757;
v_476_ = char_268(".");
r_759 = v_476_(st_758);
tmp_760 = false_QMARK__202(r_759);
v_477_ = (tmp_760 === true);
if (v_477_) {
rtn748_ = false;
} else {
v_478_ = (tmp_760 === false);
if (v_478_) {
A_761 = first_216(r_759);
v_479_ = (function (st_762) {
var v_485_, rtn749_, v_482_, v_486_, v_480_, v_481_, tmp_764, r_763, v_484_, v_483_, B_765;
v_480_ = many1_262(digit_288);
r_763 = v_480_(st_762);
tmp_764 = false_QMARK__202(r_763);
v_481_ = (tmp_764 === true);
if (v_481_) {
rtn749_ = false;
} else {
v_482_ = (tmp_764 === false);
if (v_482_) {
B_765 = first_216(r_763);
v_485_ = sequence__GT_string_234(B_765);
v_484_ = (A_761 + v_485_);
v_483_ = return_256(v_484_);
v_486_ = second_218(r_763);
rtn749_ = v_483_(v_486_);
} else {
throw "if requires a boolean value";
};
};
return rtn749_;
});
v_487_ = second_218(r_759);
rtn748_ = v_479_(v_487_);
} else {
throw "if requires a boolean value";
};
};
return rtn748_;
});
NUMBER_296 = (function (ST_766) {
var v_509_, v_489_, rtn750_, tmp_769, v_491_, v_492_, st_767, r_768, v_488_, v_490_, A_770;
st_767 = ST_766;
v_489_ = char_268("-");
v_488_ = maybe_273(v_489_, "");
r_768 = v_488_(st_767);
tmp_769 = false_QMARK__202(r_768);
v_490_ = (tmp_769 === true);
if (v_490_) {
rtn750_ = false;
} else {
v_491_ = (tmp_769 === false);
if (v_491_) {
A_770 = first_216(r_768);
v_492_ = (function (st_771) {
var v_494_, rtn751_, v_508_, tmp_773, v_493_, v_496_, B_774, r_772, v_495_;
v_493_ = many1_262(digit_288);
r_772 = v_493_(st_771);
tmp_773 = false_QMARK__202(r_772);
v_494_ = (tmp_773 === true);
if (v_494_) {
rtn751_ = false;
} else {
v_495_ = (tmp_773 === false);
if (v_495_) {
B_774 = first_216(r_772);
v_496_ = (function (st_775) {
var v_497_, v_505_, v_502_, tmp_777, v_498_, v_504_, C_778, tmp_780, v_503_, D_779, v_507_, rtn752_, v_499_, r_776, v_500_, v_506_, v_501_;
v_497_ = maybe_273(DECIMAL_295, "");
r_776 = v_497_(st_775);
tmp_777 = false_QMARK__202(r_776);
v_498_ = (tmp_777 === true);
if (v_498_) {
rtn752_ = false;
} else {
v_499_ = (tmp_777 === false);
if (v_499_) {
C_778 = first_216(r_776);
v_501_ = sequence__GT_string_234(B_774);
D_779 = (A_770 + v_501_);
tmp_780 = empty_QMARK__215(C_778);
v_502_ = (tmp_780 === true);
if (v_502_) {
v_503_ = parseInt(D_779);
v_500_ = return_256(v_503_);
} else {
v_504_ = (tmp_780 === false);
if (v_504_) {
v_506_ = (D_779 + C_778);
v_505_ = parseFloat(v_506_);
v_500_ = return_256(v_505_);
} else {
throw "if requires a boolean value";
};
};
v_507_ = second_218(r_776);
rtn752_ = v_500_(v_507_);
} else {
throw "if requires a boolean value";
};
};
return rtn752_;
});
v_508_ = second_218(r_772);
rtn751_ = v_496_(v_508_);
} else {
throw "if requires a boolean value";
};
};
return rtn751_;
});
v_509_ = second_218(r_768);
rtn750_ = v_492_(v_509_);
} else {
throw "if requires a boolean value";
};
};
return rtn750_;
});
ESCAPE_297 = (function (ST_781) {
var A_785, tmp_784, v_510_, r_783, v_511_, st_782, v_520_, v_512_, rtn753_, v_513_;
st_782 = ST_781;
v_510_ = char_268("\\");
r_783 = v_510_(st_782);
tmp_784 = false_QMARK__202(r_783);
v_511_ = (tmp_784 === true);
if (v_511_) {
rtn753_ = false;
} else {
v_512_ = (tmp_784 === false);
if (v_512_) {
A_785 = first_216(r_783);
v_513_ = (function (st_786) {
var v_517_, tmp_788, rtn754_, v_514_, r_787, v_516_, B_789, v_519_, v_515_, v_518_;
v_514_ = any_of_266("nfrbt\"\\");
r_787 = v_514_(st_786);
tmp_788 = false_QMARK__202(r_787);
v_515_ = (tmp_788 === true);
if (v_515_) {
rtn754_ = false;
} else {
v_516_ = (tmp_788 === false);
if (v_516_) {
B_789 = first_216(r_787);
v_518_ = escape_char_282(B_789);
v_517_ = return_256(v_518_);
v_519_ = second_218(r_787);
rtn754_ = v_517_(v_519_);
} else {
throw "if requires a boolean value";
};
};
return rtn754_;
});
v_520_ = second_218(r_783);
rtn753_ = v_513_(v_520_);
} else {
throw "if requires a boolean value";
};
};
return rtn753_;
});
STRING_298 = (function (ST_790) {
var v_522_, A_794, rtn755_, r_792, v_523_, v_524_, st_791, v_538_, v_521_, tmp_793;
st_791 = ST_790;
v_521_ = char_268("\"");
r_792 = v_521_(st_791);
tmp_793 = false_QMARK__202(r_792);
v_522_ = (tmp_793 === true);
if (v_522_) {
rtn755_ = false;
} else {
v_523_ = (tmp_793 === false);
if (v_523_) {
A_794 = first_216(r_792);
v_524_ = (function (st_795) {
var v_530_, v_529_, v_537_, B_798, v_528_, r_796, v_527_, rtn756_, tmp_797, v_526_, v_525_;
v_527_ = any_but_265("\"");
v_526_ = _LT__BAR__GT__279(ESCAPE_297, v_527_);
v_525_ = many_261(v_526_);
r_796 = v_525_(st_795);
tmp_797 = false_QMARK__202(r_796);
v_528_ = (tmp_797 === true);
if (v_528_) {
rtn756_ = false;
} else {
v_529_ = (tmp_797 === false);
if (v_529_) {
B_798 = first_216(r_796);
v_530_ = (function (st_799) {
var v_534_, v_531_, v_535_, tmp_801, v_532_, __802, v_536_, r_800, v_533_, rtn757_;
v_531_ = char_268("\"");
r_800 = v_531_(st_799);
tmp_801 = false_QMARK__202(r_800);
v_532_ = (tmp_801 === true);
if (v_532_) {
rtn757_ = false;
} else {
v_533_ = (tmp_801 === false);
if (v_533_) {
__802 = first_216(r_800);
v_535_ = sequence__GT_string_234(B_798);
v_534_ = return_256(v_535_);
v_536_ = second_218(r_800);
rtn757_ = v_534_(v_536_);
} else {
throw "if requires a boolean value";
};
};
return rtn757_;
});
v_537_ = second_218(r_796);
rtn756_ = v_530_(v_537_);
} else {
throw "if requires a boolean value";
};
};
return rtn756_;
});
v_538_ = second_218(r_792);
rtn755_ = v_524_(v_538_);
} else {
throw "if requires a boolean value";
};
};
return rtn755_;
});
ATOM_299 = (function (ST_803) {
var rtn758_, v_539_;
v_539_ = _LT__BAR__GT__279(NUMBER_296, KEYWORD_294, SYMBOL_293, STRING_298);
rtn758_ = v_539_(ST_803);
return rtn758_;
});
LIST_300 = (function (ST_804) {
var rtn759_, v_540_, v_541_;
v_541_ = many_261(SEXP_302);
v_540_ = in_parens_276(v_541_);
rtn759_ = v_540_(ST_804);
return rtn759_;
});
ARRAY_301 = (function (ST_805) {
var v_542_, v_543_, v_544_, rtn760_;
v_544_ = many_261(SEXP_302);
v_543_ = fmap_274(sequence__GT_array_233, v_544_);
v_542_ = in_brackets_277(v_543_);
rtn760_ = v_542_(ST_805);
return rtn760_;
});
SEXP_302 = (function (ST_806) {
var v_546_, rtn761_, v_545_;
v_546_ = _LT__BAR__GT__279(ATOM_299, LIST_300, ARRAY_301);
v_545_ = lexeme_290(v_546_);
rtn761_ = v_545_(ST_806);
return rtn761_;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment