rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.32k stars 732 forks source link

Support for Data Analysis Expressions (DAX) and Multidimensional Expressions (MDX) #1114

Open JeffUssing opened 5 years ago

JeffUssing commented 5 years ago

I'm not sure how much interest there might be to support DAX and MDX. There are a few solutions out there:

However, these can't be used in the same way as rouge. Please share your thoughts on support for DAX and/or MDX.

pyrmont commented 5 years ago

Thanks for creating your first issue, Jeff :)

'Support' for these languages would consist of a lexer that could transform source code written in DAX or MDX to a string of tokens. Anyone can contribute a lexer. Most lexers consist of regular expressions that match the constructs in the particular language.

One approach would be to take the XML file that's available from the first website you linked, and then write regex rules that match against the terms and yield the appropriate token. It hasn't been merged into the main repository yet, but I've written the first draft of a guide on how to develop a lexer for Rouge that can give you more of an idea of how to start.

aisbergde commented 1 year ago

I have no idea what a "lexer" is, but support for MDX and DAX would be nice. Especially for database documentation of SSAS tabular models that I create with my documentation generator and AsciiDoc.