Skip to content

Instantly share code, notes, and snippets.

@drewlesueur
Created November 23, 2009 07:32
Show Gist options
  • Save drewlesueur/240947 to your computer and use it in GitHub Desktop.
Save drewlesueur/240947 to your computer and use it in GitHub Desktop.
parser
<script>
// a little for each thing
function each(arr, func) {
for (var key in arr) {
func(key,arr[key])
}
}
function is_alpha(str) {
return "abcdefghijklmnopqrstuvwxyz"
}
function parse(str) {
var arr = str.split('') //turn string into an array
var state = "start"
var total = [];
var curval = "";
each(arr,function(key,value){
if (value == "(") {
state = "("
}
if (state == "(") {
if ()
}
})
}
/*
['set' 'x' "'30"]
*/
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment