syntax checking - Suitable Scenario to Handle with XText & XTend? -
syntax checking - Suitable Scenario to Handle with XText & XTend? -
i need provide , ide syntax checker , validator simple dsl.
the dsl's interpreter exists there no need one. dsl suitable xtext & xtend except
allows 1 escape javascript, have heard quite messy language.
is xtext suitable scenario? have heard extremely hard adapt xtext javascript , haven't seen open source xtext javascript project link or extend.
thanks!
edit: dsl working nools rule language. looks this:
rule "rule study user" { when{ $ctr: counter $ctr.count % 1000 == 0 {count: $count} } then{ console.log("progressing..."); modify($ctr, function(){this.count = $count + 1;}); } }
javascript appears in pattern in each statement in when clause. in illustration pattern "$ctr.count % 1000 == 0"). there limited number of non-javascript substitutions in patterns e.g. back upwards regex operator '=~'.
the entirety of clause javascript, except aliases defined in when appear variables in clause. in illustration $ctr such alias.
if
the syntax unambiguously separates "normal code" , "javascript escapes" you don't care editor back upwards javascript partsthen create xtext grammar parses javascript parts verbatim.
i can't give much more specific advice without seeing dsl , knowing utilize cases.
xtext syntax-checking
Comments
Post a Comment