In this paper we describe textX, a meta-language and a tool for building Domain-Specific Languages. It is implemented in Python using Arpeggio PEG (Parsing Expression Grammar) parser library. From a single language description (grammar) textX will build a parser and a meta-model (a.k.a. abstract syntax) of the language. The parser is used to parse textual representations of models conforming to the meta-model. As a result of parsing, a Python object graph will be automatically created. The structure of the object graph will conform to the meta-model defined by the grammar. This approach frees a developer from the need to manually analyse a parse tree and transform it to other suitable representation. The textX library is independent of any integrated development environment and can be easily integrated in any Python project. The textX tool works as a grammar interpreter. The parser is configured at run-time using the grammar. The textX tool is a free and open-source project available at GitHub.

1.
T.
Kosar
,
M.
Mernik
, and
J. C.
Carver
,
Empirical software engineering
17
,
276
304
(
2012
).
2.
A.
Van Deursen
, and
P.
Klint
,
Journal of Software Maintenance: Research and Practice
10
,
75
92
(
1998
).
3.
P.
Hudak
, “
Modular domain specific languages and tools
,” in
Software Reuse, 1998. Proceedings. Fifth International Conference on
,
IEEE
,
1998
, pp.
134
142
.
4.
M.
Mernik
,
J.
Heering
, and
A.
Sloane
,
ACM Computing Surveys (CSUR)
37
,
316
344
(
2005
).
5.
A. S.
Erdweg
,
T.
van der Storm
,
M.
Völter
,
L.
Tratt
,
R.
Bosman
,
W. R.
Cook
,
A.
Gerritsen
,
A.
Hulshout
,
S.
Kelly
,
A.
Loh
, et al.,
Computer Languages, Systems & Structures
44
,
24
47
(
2015
), ISSN , URL http://www.sciencedirect.com/science/article/pii/S1477842415000573.
6.
I.
Dejanović
,
G.
Milosavljević
, and
R.
Vaderna
,
Knowledge-Based Systems
95
,
71
74
(
2016
), ISSN , URL http://www.sciencedirect.com/science/article/pii/S0950705115004761.
7.
L.
Kats
, and
E.
Visser
, “The spoofax language workbench: rules for declarative specification of languages and IDEs,” in
ACM Sigplan Notices
,
ACM
,
2010
, vol.
45
, pp.
444
463
.
8.
E.
Vacchi
, and
W.
Cazzola
,
Computer Languages, Systems & Structures
43
,
1
40
(
2015
).
9.
M.
Eysholdt
, and
H.
Behrens
, “
Xtext: implement your language faster than the quick and dirty way
,” in
Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion
,
ACM
,
2010
, pp.
307
309
.
10.
I.
Dejanović
,
G.
Milosavljević
,
B.
Perišić
, and
M.
Tumbas
,
Computer Science and Information Systems
7
,
409
440
(
2010
), ISSN , URL http://www.comsis.org/ComSIS/Vol7No3/RegularPapers/paper2.htm.
This content is only available via PDF.
You do not currently have access to this content.