As part of the course work I need to write a compiler for TCL. If I understand correctly, the grammar of this language is context-sensitive, not context-free. You need to write the compiler for LLVM, and not the interpreter, so you need a full output.

The question is the following. Are there any suitable, working lexical / syntactic parsing libraries for such languages?

  • Lex + Yacc, bison will not work? - Vladimir Martyanov
  • Not sure what I'm right at 100%. But it seems that this bundle works only with context-free languages. And for TCL BNF according to the wiki is not. - BHYCHIK
  • I haven't written on tcl for a long time, but as far as I remember its syntax is trivial. What is the problem of strancing "hands" (i.e. simply by recursively calling several functions)? - avp
  • one
    And there is also a link to the finished official parser: wiki.tcl.tk/1660 Is this what you need? - VladD
  • one
    @avp Not happy. Most of the teachers do not understand anything) But by compilers - yes, a very intelligent teacher. - BHYCHIK

0