This is timely. This morning I was trying to work out what steps I'd need to go through to create a parser and interpreter for another syntax in javascript. I'm seeking to write a personal organiser in my browser but dislike the javascript syntax, and was wondering what I'd need to do to get an iolanguage syntax in js.
Unfortunately I never practiced the stuff I learnt in 'language translators' at uni and have forgotten the details. This source may be useful, although I'd prefer it to work dynamically rather than having a compile stage. Other advice welcome.
"This source may be useful, although I'd prefer it to work dynamically rather than having a compile stage."
If you're making it "work dynamically" then that's an interpreter and you can typically expect a 10x slowdown. I'd go the compilation route personnally.
I found someone who had already done somthing similar using ometa. Here's a smalltalk syntax in javascript: http://tinlizzie.org/ometa/ometa-js-old/
Unfortunately I never practiced the stuff I learnt in 'language translators' at uni and have forgotten the details. This source may be useful, although I'd prefer it to work dynamically rather than having a compile stage. Other advice welcome.