Added all the syntax editor files from Moises.

This is the version that he sent to me on Fri, Apr 11, 2008 at 2:42 PM. I'm not sure if this is the latest version.
This commit is contained in:
bjorn
2008-06-16 17:42:20 +00:00
parent f117eb95c3
commit a0d29773a6
9 changed files with 2382 additions and 25 deletions

View File

@@ -0,0 +1 @@
var Literals = new GFGrammar(new GFAbstract("Exp",{Name: new Type(["String"], "Exp"), Welcome: new Type(["Exp"], "Exp")}),{LiteralsEng: new GFConcrete({Name: function(cs){return new Arr(Literals.concretes["LiteralsEng"].rule("_0", cs));}, Welcome: function(cs){return new Arr(new Seq(new Str("Welcome"), new Str(","), Literals.concretes["LiteralsEng"].rule("_0", cs)));}, _0: function(cs){return cs[0].sel(new Int(0));}, Exp: function(cs){return new Arr(cs[0]);}, Int: function(cs){return new Arr(cs[0]);}, Float: function(cs){return new Arr(cs[0]);}, String: function(cs){return new Arr(cs[0]);}}, new Parser("Exp",[new Rule(1, new FunApp("Welcome",[new Arg(0)]),[1],[[new Terminal("Welcome"), new Terminal(","), new ArgProj(0, 0)]]), new Rule(1, new FunApp("Name",[new Arg(0)]),[-1],[[new ArgProj(0, 0)]])],{Exp:[1], Float:[-3], Int:[-2], String:[-1], _Var:[-4]}))});