by ilaksh · 13y ago · 0 comments
Like a KR or some system that could read BNF or whatever and translate directly into another level, like operations defined by the operating system or something.
Why can't we describe a language declaratively and semantically so that its low level details wouldn't have to be specified manually and so that it could be related to other languages and reasoning could be done about its effects?
The lowest levels of the system would probably have to be described as part of the same representation system.
The grammar is here:
http://felix-lang.org/lib/grammar
Close examination reveals even the regexps for literals are defined in the grammar. The parser is built on top of the excellent extensible GLR+ parsing tool Dypgen.
In principle the Felix parsing system is independent of Felix. All you need to do is replace the s-expression to Felix AST translator with some kind of pretty printer for s-expressions, even XML, and you can target anything.