summaryrefslogtreecommitdiff
path: root/Source/Core/Parser.cs
diff options
context:
space:
mode:
authorGravatar wuestholz <unknown>2013-07-22 19:44:21 -0700
committerGravatar wuestholz <unknown>2013-07-22 19:44:21 -0700
commit661efb919ce720f66773c1707e8aca4ecfbbe903 (patch)
treea319343a55a969ee2b4cac6c8542a549160358c6 /Source/Core/Parser.cs
parent350d32403f7441df525f871f3853ca9b660211fe (diff)
Fixed the Coco/R grammar and regenerated the parser.
Diffstat (limited to 'Source/Core/Parser.cs')
-rw-r--r--Source/Core/Parser.cs12
1 files changed, 9 insertions, 3 deletions
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<Variable>/*!*/ ins, out List<Variable>/*!*/ outs, out QKeyValue kv) {
Expect(9);
Expression(out e);
Expect(10);
- e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToInt), new List<Expr> { e });
+ e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToInt), new List<Expr>{ e });
break;
}
case 15: {
@@ -1761,7 +1761,7 @@ out List<Variable>/*!*/ ins, out List<Variable>/*!*/ outs, out QKeyValue kv) {
Expect(9);
Expression(out e);
Expect(10);
- e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToReal), new List<Expr> { e });
+ e = new NAryExpr(x, new ArithmeticCoercion(x, ArithmeticCoercion.CoercionType.ToReal), new List<Expr>{ 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<Expr> { e0, e1, e2 });
+ e = new NAryExpr(tok, new IfThenElse(tok), new List<Expr>{ e0, e1, e2 });
}
void CodeExpression(out List<Variable>/*!*/ locals, out List<Block/*!*/>/*!*/ 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);