Questions tagged [mgrammar]

Mgrammar language can to define a schema to validate textual input or map textual input into data structures. It is compatible with the Oslo modelling language "M".

Mgrammar language allows a developer to define a schema to validate textual input or map textual input into data structures. It is compatible with the Oslo modelling language "M".

The "Oslo" modelling language "M" provides an SQL compatible schema and query language.

The Microsoft "Oslo" project was cancelled in 2010.

Reference

See also

10 questions
6
votes
1 answer

Shift reduce and reduce reduce conflicts

I'm having a hard time wrapping my head around this and need some help understanding shift reduce and reduce reduce conflicts. I have a grammar which I can't seem to understand why it's problematic. I could attach the grammar, but I want to learn…
John Leidegren
  • 59,920
  • 20
  • 131
  • 152
4
votes
3 answers

Oslo's Intellipad: How to set up the 3 column MGrammarMode?

I've been using Oslo for MSchema. Works great. I can write an M Schema for a database design and it generates T-SQL to build the entire db with PKs, FKs, checks for integrity etc. I've set up a .bat file to compile the .m into .mx then load it…
Weej
  • 1,012
  • 2
  • 8
  • 24
3
votes
3 answers

parse specific data in C#

I have data stored in specific text format: FIDS_A1=CF_LAST:1|line_NETCHNG:2|QoS:3; FIDS_A2=[High and Low]:[{High} – {Low}]:1|CF_LAST:2; FIDS_A3=YR_RANGE:3|VOL:3; FIDS_A4=GR_AskBid; FIDS_C3=line_BID:3|line_ASK:3; I need to parse it and get a C#…
Eugene Gluhotorenko
  • 3,094
  • 2
  • 33
  • 52
1
vote
0 answers

MGrammar and more than one valid interpretation

I think what I may have is the dangling else problem, but I'm not really sure. The language I'm tasked with writing needs to support multi-line if statements as well as single line i.e. if(conditions){ print "multi"; print…
user64718
  • 827
  • 3
  • 9
  • 22
1
vote
2 answers

MGrammar grammar and variable declaration

I'm sure I'll get told to do it another way, but for specific reasons it has to be done this way. If it didn't, I wouldn't be stuck :-P The scripting language I'm working on has to accept variables defined like this: Variables: x(1), y("hi");…
user64718
  • 827
  • 3
  • 9
  • 22
1
vote
1 answer

Is it possible to parse multi-line c style comments in MGrammar?

I've been hacking around with the May09 Oslo bits, experimented with tokenizing some source code. I can't seem to figure out how to correctly handle multiline C-style comments though. For example: /*comment*/ Some cases that elude…
MarkPflug
  • 28,292
  • 8
  • 46
  • 54
1
vote
1 answer

Is there a better way to define a decimal in an MGrammar?

I'm working on a DSL in Microsoft's new M Grammar, and it needs to allow decimal values. I've defined decimal as token digits = "0".."9"; token spot = "."; token decimal = digits+ | digits+ spot digits+ | spot digits+; That seems to work, but is…
Mike Two
  • 44,935
  • 9
  • 80
  • 96
0
votes
1 answer

Parsing blocks of line comments using MGrammar

How can I parse blocks of line comments with MGrammar? I want to parse blocks of line comments. Line comments that are next to each should grouped in the MGraph output. I'm having trouble grouping blocks of line comments together. My current grammar…
Magnus Lindhe
  • 7,157
  • 5
  • 48
  • 60
0
votes
1 answer

Writing a parser with M, consume while not rule

I'm writing a HTML parser for my own amusement and I wanted to try out M. I base this work on the HTML 4.01 standard and in there it says Although the STYLE and SCRIPT elements use CDATA for their data model, for these elements, CDATA must be…
John Leidegren
  • 59,920
  • 20
  • 131
  • 152
0
votes
1 answer

MGrammar for parsing IF statement

I am building up a MGrammar spec to parse some pseudo code looking for particular bits of information. I have most of the spec working except for 1 cruical element. The pseudo code supports an if-then-else syntax and I have been unable to find a…
Sam
  • 304
  • 1
  • 7