2 ms·
What tools does Java have for creating domain specific languages?
by jrockway 17y ago
What tools does Java have for creating domain specific languages?
- axod 17y agodomain specific languages == libraries. You make some libraries, functions that do shit. Then call them. That way other people can still read the code, and help. It's like GOSUB but better!
- pohl 17y agoI'll pretend you're asking in earnest: Depending on the need, you have a bevy of parser-generators to choose from. My favorite is SableCC. Or, if you want something lightweight where you effectively have a DSL without creating an actual language, look towards static imports + fluent interfaces + builder pattern: http://blog.centuryminds.com/2007/10/java-static-imports-fluent-interfaces-builder-pattern-dsl/ http://blog.centuryminds.com/2007/10/java-static-imports-flu...