Generation of Syntax Analyzer with an Internal DSL in Ruby
Keywords:parser generator, domain specific language, syntax analysis, Ruby
This paper describes RugsSr which is an internal domain specific language based on Ruby to define grammar rules. The grammar rules in RugsSr are executable so that we can embed Ruby code with the grammars. A parser generator reads the grammar rules in RugsSr and generates a bottom-up parser. In the author's preliminary experience, productivity was improved in the design and implementation of parsers.
Steven C. Johnson, "Yacc: Yet Another Compiler Compiler," UNIX Programmer's Manual, Vol. 2, pp.353387, 1979.
Martin Fowler, "Domain-Specific Languages," Addison-Wesley, 2011.
Bison - Gnu Parser Generator, http://www.gnu.org/s/bison/ (accessed at June 26, 2012).
E. M. Gagnon and L. J. Hendren, SableCC, an Object-Oriented Compiler Framework, TOOLS 26 Technology of Object-Oriented Languages, pp.140-154, 1998.
T. J. Parr and R. W. Quong, ANTLR: A Predicated-LL(k) Parser Generator, Software Practice & Experience, pp.789-810, Vol.25, No.7,1995.
BYACC/J Home Page, http://byaccj.sourceforge.net/ (accessed at June 26, 2012).
Kazuaki Maeda, Ruby-Based Data Representation and the Performance of Java Programs, Second International Conference on the Applications of Digital Information and Web Technologies, pp.841-846, 2009 .
How to Cite
Copyright (c) 1970 International Journal on Information Technology and Computer Science
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.