Microsoft 开发人员网络 > 论坛主页 > Microsoft SQL Server Modeling > M.exe always generates a Collection for a Record from an Mg grammar
提出问题提出问题
 

已答复M.exe always generates a Collection for a Record from an Mg grammar

  • 2009年7月2日 15:17Ceyhun Ciper 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     包含代码
    ...even though Intellipad correctly displays it as a record.

    Example:

    .mg:
    module M {
        language L {
            syntax Main = i:ident n:num => { i, n };
            token ident = a:any => ident{a};
            token num = a:any => num{a};
        }
    }
    Instance document: "a7"

    Intellipad output:

    {
      ident => "a",
      num => "7"
    }
    After compiling the .mg with m.exe the root node is a collection.

答案

全部回复