/* ***** 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 Assembly x86.tmLanguage (uuid: ) */
/****************************************************************************************
 * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
 * fileTypes                                                                            *
 ****************************************************************************************/
define("ace/mode/mar_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (require, exports, module) {
    "use strict";

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

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

        this.$rules = {
            start:
                [{
                    token: 'keyword.function.assembly',
                    regex: '\\b(?:mov|add|sub|and|or|test|cmp|shl|shr|mul|push|pop|div|xor|dw|nop|equ|neg|hwq|not|ror|rol|sal|sar)\\b',
                    caseInsensitive: true
                },
                    {
                        token: 'keyword.operator.assembly',
                        regex: '\\b(?:call|ret|jmp|jnz|jg|jl|jge|jle|hwi|jz|js|jns|jc|jnc)\\b',
                        caseInsensitive: true
                    },
                    {
                        token: 'variable.predefined.ahk',
                        regex: '\\b(?:brk|dup)\\b',
                        caseInsensitive: true
                    },
                    {
                        token: 'variable.parameter.register.assembly',
                        regex: '\\b(?:A|B|C|D|X|Y|bp|sp)\\b',
                        caseInsensitive: true
                    },
                    {
                        token: 'constant.character.decimal.assembly',
                        regex: '\\b[0-9]+\\b'
                    },
                    {
                        token: 'constant.character.hexadecimal.assembly',
                        regex: '\\b0x[A-F0-9]+\\b',
                        caseInsensitive: true
                    },
                    {token: 'string.assembly', regex: /"([^\\"]|\\.)*"/},
                    {token: 'comment.assembly', regex: ';.*$'},
                    {token: 'support.function.directive.assembly', regex: /^\.text|\.data/},
                    {token: 'entity.name.function.assembly', regex: /\w*:/}]
        }

        this.normalizeRules();
    };

    MarHighlightRules.metaData = {
        fileTypes: ['asm'],
        name: 'Much Assembly Required',
        scopeName: 'source.assembly'
    };


    oop.inherits(MarHighlightRules, TextHighlightRules);

    exports.MarHighlightRules = MarHighlightRules;
});

define("ace/mode/mar", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/mar_rules"], function (require, exports, module) {
    "use strict";

    var oop = require("../lib/oop");
    var TextMode = require("./text").Mode;
    var MarHighlightRules = require("./mar_rules").MarHighlightRules;

    var Mode = function () {
        this.HighlightRules = MarHighlightRules;
        this.$behaviour = this.$defaultBehaviour;
    };
    oop.inherits(Mode, TextMode);

    (function () {
        this.lineCommentStart = ";";
        this.$id = "ace/mode/mar";
    }).call(Mode.prototype);

    exports.Mode = Mode;
});