Hacker News new | past | comments | ask | show | jobs | submit login

You could also add basic Forth support very easily. In Forth, everything is composed of whitespace-delimited tokens. A token is either an integer or a word. Forth uses metaprogramming to make the syntax extensible, but the most common words with special syntax are comments and string constants.

\ is a single-line comment that skips until the next newline, ( is a multiline comment that skips until the next end paren, ." is an inline print string that scans until the next quote, and it has a counterpart .s" string constant that works the same. Bingo, one basic Forth tokenizer!

There's a great manual for GForth[1], in case you're curious to see what some code looks like or give the language a spin.

[1]http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: