The right tool to translate DSL to SQL?

I have a domain specific language that can be translated into SQL. Should I write my own lexer, parser and code generator, or are there tools that can help me?

+5
source share
6 answers

You might want to read this book: Language Implementation Templates by Terence Parr from the Pragmatic Programmers series. His detailed introduction to parsing, translation and compilation. It relies mainly on ANTLR by Terence Parr for examples, but is general enough that you can switch to other languages ​​and systems.

+2
source

, , Groovy, Ruby, Scala, F # Haskell - .

, , .

C, , .

, , .

, DSL, DSL .

http://manning.com/ghosh/

+1

DSL DSL-, , , .

( , DSL "", mechansims, , DSL , , , ).

, .

- (YACC, Bison, ANTLR, JavaCC), DSL; / . , (LALR (1), LL (k),...) ANTLR/Bison/Yacc ; . . , ( , , , , .

, Life After Parsing: , , . DMS Software Reengineering Toolkit , ; (, , !) . , DMS DSL ( " " ) / . OP, DMS SQL2011, .

. SO .

+1

, - Eli, :

http://eli-project.sourceforge.net/

, , ANTLR, .

, , SQL, , , , DSL .

, OCaml, ocamllex ocamlyacc, OCaml.

0

, , (, Lisp). - DSL S-, Lisp.

DSL, .

0

. , Xtext Xtend, Eclipse, intellisense, grammer, lexer. SQL, .

0

All Articles