Advice on creating an interpreted syntax in Java -
i deal lot pos (point of sale) terminals in line of work. talk system endpoint written in java communicated end system.
for receipts, write code in endpoint generate data needs printed. these receipts can take 40 characters per line, hardcode each receipt type needs printed.
what come sort of scripting syntax use generate these receipts.
my idea have gui program can design receipt such as
welcome john doe services current balance $(f4).format(currency)
or of like. interpret syntax $(f4).format(currency) , pull data , format correctly.
i love advice in should start looking on how this. write in java not sure start. rather try , stay away substring magic.
thanks in advance.
edit: sorry should have mentioned, software extend written in j++ cant use java 5 or 6, lastest java can use 1.4
scripting java platform want start, rhino javascript engine embedded in java 6 run-time should @ using ease of configuration.
if insist on domain specific language easiest place start antlr. there great books on antlr author terrance parr.
Comments
Post a Comment