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 parts

then 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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -