/* ***** BEGIN LICENSE BLOCK *****
 * Distributed under the BSD license:
 *
 * Copyright (c) 2012, Ajax.org B.V.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of Ajax.org B.V. nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ***** END LICENSE BLOCK ***** */

/* THIS FILE WAS AUTOGENERATED FROM tool\LogicBlox.tmbundle\Syntaxes\LogicBlox.tmLanguage (UUID: 59bf5022-e261-453f-b1cb-9f9fa0712413) */

define(function(require, exports, module) {
"use strict";

var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;

var LogicBloxHighlightRules = function() {
    // regexp must not have capturing parentheses. Use (?:) instead.
    // regexps are ordered -> the first match is used

    this.$rules = { start: 
       [ { token: 'comment.block',
           regex: '/\\*',
           push: 
            [ { token: 'comment.block', regex: '\\*/', next: 'pop' },
              { defaultToken: 'comment.block' } ],
           //A block comment.
            },
         { token: 'comment.single',
           regex: '//.*',
           //A single line comment.
            },
         { token: 'constant.numeric',
           regex: '\\d+',
           //An integer constant.
            },
         { token: 'constant.numeric',
           regex: '\\d+(.\\d+){,1}[eE][+-]{,1}\\d+',
           //Real numbers.
            },
         { token: 'string',
           regex: '"',
           push: 
            [ { token: 'string', regex: '"', next: 'pop' },
              { defaultToken: 'string' } ],
           //Strings
            },
         { token: 'constant.language',
           regex: '\\b(true|false)\\b',
           //Boolean values.
            },
         { token: 'entity.name.type.logicblox',
           regex: '`[a-zA-Z_:]+(\\d|\\a)*\\b',
           //LogicBlox Symbol
            },
         { token: 'keyword.other', regex: '->', comment: 'Constraint' },
         { token: 'keyword.other',
           regex: '-->',
           //Level 1 Constraint
            },
         { token: 'keyword.other', regex: '<-', comment: 'Rule' },
         { token: 'keyword.other', regex: '<--', comment: 'Level 1 Rule' },
         { token: 'keyword.other', regex: '\\.', comment: 'Terminator' },
         { token: 'keyword.other', regex: '!', comment: 'Negation' },
         { token: 'keyword.other', regex: ',', comment: 'Conjunction' },
         { token: 'keyword.other', regex: ';', comment: 'Disjunction' },
         { token: 'keyword.operator',
           regex: '<=|>=|!=|<|>',
           //Equality
            },
         { token: 'keyword.other', regex: '@', comment: 'Equality' },
         { token: 'keyword.operator',
           regex: '\\+|-|\\*|/',
           //Arithmetic operations
            },
         { token: 'keyword', regex: '::', comment: 'Colon colon' },
         { token: 'support.function',
           regex: '\\b(agg\\s*<<)',
           push: 
            [ { include: '$self' },
              { token: 'support.function',
                regex: '>>',
                next: 'pop' } ],
            //Aggregations
            },
         { token: 'storage.modifier',
           regex: '\\b(lang:[\\w:]*)',
           //All the lang system predicates
            },
         { token: [ 'storage.type', 'text' ],
           regex: '(export|sealed|clauses|block|alias)\\s*\\((?=`)',
           //Module keywords
            },
         { token: 'entity.name',
           regex: '[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))',
           //A predicate name.
            },
         { token: 'variable.parameter',
           regex: '([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))',
           //A variable to a functional predicate.
            } ] }
    
    this.normalizeRules();
};

oop.inherits(LogicBloxHighlightRules, TextHighlightRules);

exports.LogicBloxHighlightRules = LogicBloxHighlightRules;
});
@@ -2590,24 +2590,54 @@
 regex: '%5C%5Cd+
+(?:%5C%5C.%5C%5Cd+)?(?:%5BeE%5D%5B+-%5D?%5C%5Cd+)?
 ',%0A         
@@ -2676,116 +2676,15 @@
     
- %7D,%0A         %7B token: 'constant.numeric',%0A           regex: '%5C%5Cd+(.%5C%5Cd+)%7B,1%7D%5BeE%5D%5B+-%5D%7B,1%7D%5C%5Cd+',%0A           //
+//Or a 
 Real
@@ -2690,17 +2690,16 @@
 l number
-s
 .%0A      

fix highlighting of LogicBlox numbers