]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/parsing/parser/SCLLexer.flex
(refs #7508) Edo and modified mdo under edo feature
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / internal / parsing / parser / SCLLexer.flex
index 0aafe287261101a5ac1d099ae9b3c988e223a40b..595c082ca4c70151f946cf37a63353d4a078bd2e 100644 (file)
@@ -42,6 +42,9 @@ import gnu.trove.list.array.TIntArrayList;
     public boolean supportCHR() {
         return context.header == null ? false : context.header.chr;
     }
+    public boolean supportEDO() {
+        return context.header == null ? false : context.header.edo;
+    }
 %}
 
 letter          = [a-zA-Z_]
@@ -105,7 +108,7 @@ char_literal    = "'" ([^'\\\ufffd] | "\\" [^\ufffd]) "'"
   do              { return sym(SCLTerminals.DO); }
   eq              { return sym(options.supportEq ? SCLTerminals.EQ : SCLTerminals.ID); }
   mdo             { return sym(SCLTerminals.MDO); }
-  edo             { return sym(SCLTerminals.EDO); }
+  edo             { return sym(supportEDO() ? SCLTerminals.EDO : SCLTerminals.ID); }
   class           { return sym(SCLTerminals.CLASS); }
   effect          { return sym(SCLTerminals.EFFECT); }
   match           { return sym(SCLTerminals.MATCH); }