From 661efb919ce720f66773c1707e8aca4ecfbbe903 Mon Sep 17 00:00:00 2001 From: wuestholz Date: Mon, 22 Jul 2013 19:44:21 -0700 Subject: Fixed the Coco/R grammar and regenerated the parser. --- Source/Core/Parser.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Source/Core/Parser.cs') diff --git a/Source/Core/Parser.cs b/Source/Core/Parser.cs index 9dc4a70e..fa15b100 100644 --- a/Source/Core/Parser.cs +++ b/Source/Core/Parser.cs @@ -1752,7 +1752,7 @@ out List/*!*/ ins, out List/*!*/ outs, out QKeyValue kv) { Expect(9); Expression(out e); Expect(10); - e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToInt), new List { e }); + e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToInt), new List{ e }); break; } case 15: { @@ -1761,7 +1761,7 @@ out List/*!*/ ins, out List/*!*/ outs, out QKeyValue kv) { Expect(9); Expression(out e); Expect(10); - e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToReal), new List { e }); + e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToReal), new List{ e }); break; } case 9: { @@ -1901,7 +1901,7 @@ out QKeyValue kv, out Trigger trig, out Expr/*!*/ body) { Expression(out e1); Expect(41); Expression(out e2); - e = new NAryExpr(tok, new IfThenElse(tok), new List { e0, e1, e2 }); + e = new NAryExpr(tok, new IfThenElse(tok), new List{ e0, e1, e2 }); } void CodeExpression(out List/*!*/ locals, out List/*!*/ blocks) { @@ -2245,6 +2245,12 @@ public class Errors { count++; } + public void Warning(IToken/*!*/ tok, string/*!*/ msg) { // warnings + Contract.Requires(tok != null); + Contract.Requires(msg != null); + Warning(tok.filename, tok.line, tok.col, msg); + } + public virtual void Warning(string filename, int line, int col, string msg) { Contract.Requires(msg != null); errorStream.WriteLine(warningMsgFormat, filename, line, col, msg); -- cgit v1.2.3