Hacker News new | ask | show | jobs
by jbert 4662 days ago
Are there many (computer) languages which don't use a text file (in some encoding or other) as their 'normal' representation?

If the compiler interpreter wants a tokenized input, perhaps we could/should save in that format?

Obviously the code-entry system (not sure that it's an 'editor' at this point) has to have an efficient way to let you select which tokens to enter (and enter free text in allowed places, i.e. string literals and comments).

That could either be 'one token per key' a la ZX Spectrum Basic (the only system I'm aware of which works this way): http://en.wikipedia.org/wiki/ZX_Spectrum#Firmware or something which looks the same as auto-complete to the end-user.

The typing experience would be much like a modern IDE, but would not allow you to enter or save incorrect text strings where a token was required, and would not require a lexing step (since it would be saved as tokens, or possibly even as an AST).

1 comments

There quite a few tokenized BASIC dialects: http://justsolve.archiveteam.org/wiki/Tokenized_BASIC
Interesting, thanks. Note however that the ZX spectrum also did tokenized input. Each key corresponded to a different basic token: http://fms.komkon.org/Speccy/SpeccyKeys.gif.

In the context of lexing and parsing, I was wondering about this idea. The program entry system is kind of like a potentially context-aware parser. No more syntax error are possible...