So, due to the assignment I was given, I've ended up wondering around what actually the next step might be.
To clarify things, I am supposed to implement a DSL language by using Java. The language should enable the "user" the specify and create questionnaire forms based of course on the input.
The following input should provide the output as given bellow:
form taxOfficeExample {
"Did you sell a house in 2010?"
hasSoldHouse: boolean
"Did you buy a house in 2010?"
hasBoughtHouse: boolean
"Did you enter a loan?"
hasMaintLoan: boolean
if (hasSoldHouse) {
"What was the selling price?"
sellingPrice: money
"Private debts for the sold house:"
privateDebt: money
"Value residue:"
valueResidue: money = (sellingPrice - privateDebt)
}
}
The parser technology which I've chosen is the ANTLRv4 which seams to be the best option for this platform. Anyway, I am familiar with all the models, terminology etc - such as parsing, lexems, grammars etc - but one thing is still lacking - the bridge between Java and ANTLRv4.
So basically what I would like to know based on your experience, what is the bridge between ANTLRv4 and Java? For example, once I define a grammar for the DSL, how can that grammar (language) be applied? What is the bridge between those two entities?
I'm asking this questions only because I'm quite new within this area, therefore, any tips, pointers to research papers etc will be appreciated!
Thanks