Posted 16 years ago
by Bradley

I'm not really sure if this belongs in the actipro forum or a MS forum as I'm not sure what's going on behind the scenes. The DSL I'm working on supports variables and functions. All variables are identified as
and functions are
So the only real difference is functions support the ".". Now all my grammar gets compiled properly so functions are being identified as functions and not identifiers in my AST. The problem is when I load up my syntax editor and start typing in code all the syntax highlighting works fine except every function gets identified as an identifier unless it has a "." in it. Any ideas? It's probably a bug with my grammar instead of MGrammar or Syntax Editor, but I'm not really sure of a way around it. Thanks
final token AlphaNumeric = (Letter | Digit | NegativeDigit | ""_"");
@{Classification[""Identifier""]}
final token tID = Common.Letter Common.AlphaNumeric*;
@{Classification[""Functions""]}
final token Functions = (Letter | Digit | '.' | '_');
@{Classification[""Functions""]}
token func = Common.Letter Common.Functions*;
and used like
syntax sFunctionStatement = x:func lparent s:Common.List( sFunctionParamaters ) rparent "";""? => FunctionStatement{Name{x}, ParamaterList{s}};