<glimmer-language-spec>
   <settings>
      <language>Oolong</language>
   </settings>

   <mime-types>
      <mime-type>text/x-j</mime-type>
   </mime-types>

   <syntax-items>
      <syntax-item>
         <name>string</name>
         <start-regex>&quot;</start-regex>
         <end-regex>\(&quot;\|\n\)</end-regex>
         <class>string</class>
      </syntax-item>
      <syntax-item>
         <name>comment</name>
         <start-regex>^;\| ;\|\t;</start-regex>
         <end-regex>\n</end-regex>
         <class>comment</class>
      </syntax-item>
   </syntax-items>

   <pattern-items>
      <pattern-item>
         <name>directives</name>
         <regex>^[.]\(catch\|class\|end\|field\|interface\|implements\|limit locals\|limit stack\|line\|method\|source\|super\|throws\|var\)\b</regex>
         <class>keyword</class>
      </pattern-item>
      <pattern-item>
         <name>directives_end</name>
         <regex>\b\(method\|class\)\b</regex>
         <class>keyword</class>
      </pattern-item>
      <pattern-item>
         <name>types</name>
         <regex>\b\(B\|C\|D\|F\|I\|J\|\|L[A-Za-z\/]+\|S\|V\|Z\)\b</regex>
         <class>data_type</class>
      </pattern-item>
     <pattern-item>
         <name>whole_numbers1</name>
         <regex>\b[0-9]\b</regex>
         <class>decimal</class>
      </pattern-item>
      <pattern-item>
         <name>whole_numbers2</name>
         <regex>\b[1-9][0-9]*\b</regex>
         <class>decimal</class>
      </pattern-item>
      <pattern-item>
         <name>labels</name>
         <regex>^[a-zA-Z_][a-zA-Z0-9_]*\:</regex>
         <class>function</class>
      </pattern-item>
      <pattern-item>
         <name>declarations</name>
         <regex>\b\(abstract\|final\|native\|private\|protected\|public\|static\|strictfp\|synchronized\|transient\|volatile\)\b</regex>
         <class>keyword</class>
      </pattern-item>
      <pattern-item>
         <name>instructions_a</name>
         <regex>\b\(aaload\|aastore\|aconst_null\|aload\|aload_0\|aload_1\|aload_2\|aload_3\|anewarray\|areturn\|arraylength\|astore\|astore_0\|astore_1\|astore_2\|astore_3\|athrow\)\b</regex>
         <class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_b</name>
      	<regex>\b\(baload\|bastore\|bipush\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_c</name>
      	<regex>\b\(caload\|castore\|checkcast\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_d</name>
      	<regex>\b\(d2f\|d2i\|d2l\|dadd\|daload\|dastore\|dcmpg\|dcmpl\|dconst_0\|dconst_1\|ddiv\|dload\|dload_0\|dload_1\|dload_2\|dload_3\|dmul\|dneg\|drem\|dreturn\|dstore\|dstore_0\|dstore_1\|dstore_2\|dstore_3\|dsub\|dup\|dup_x1\|dup_x2\|dup2\|dup2_x1\|dup2_x2\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_f</name>
      	<regex>\b\(f2d\|f2i\|f2l\|fadd\|faload\|fastore\|fcmpg\|fcmpl\|fconst_0\|fconst_1\|fconst_2\|fconst_3\|fdiv\|fload\|fload_0\|fload_1\|fload_2\|fload_3\|fmul\|fneg\|frem\|freturn\|fstore\|fstore_0\|fstore_1\|fstore_2\|fstore_3\|fsub\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_g</name>
      	<regex>\b\(getfield\|getstatic\|goto\|goto_w\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_i</name>
      	<regex>\b\(i2b\|i2c\|i2d\|i2f\|i2l\|i2s\|iadd\|iaload\|iand\|iastore\|iconst_0\|iconst_1\|iconst_2\|iconst_3\|iconst_4\|iconst_5\|iconst_m1\|idiv\|if_acmpeq\|if_acmpne\|if_icmpeq\|if_icmpge\|if_icmpgt\|if_icmple\|if_icmplt\|if_icmpne\|ifeq\|ifge\|ifgt\|ifle\|iflt\|ifne\|ifnonnull\|ifnull\|iinc\|iload\|iload_0\|iload_1\|iload_2\|iload_3\|imul\|ineg\|instanceof\|invokeinterface\|invokespecial\|invokestatic\|invokevirtual\|ior\|irem\|ireturn\|ishl\|ishr\|istore\|istore_0\|istore_1\|istore_2\|istore_3\|isub\|iushr\|ixor\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_j</name>
      	<regex>\b\(jsr\|jsr_w\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_l</name>
      	<regex>\b\(l2d\|l2f\|l2i\|ladd\|laload\|land\|lastore\|lcmp\|lconst_0\|lconst_1\|ldc\|ldc_w\|ldc2_w\|ldiv\|lload\|lload_0\|lload_1\|lload_2\|lload_3\|lmul\|lneg\|lookupswitch\|lor\|lrem\|lreturn\|lshl\|lshr\|lstore\|lstore_0\|lstore_1\|lstore_2\|lstore_3\|lsub\|lushr\|lxor\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_m</name>
      	<regex>\b\(monitorenter\|monitorexit\|multianewarray\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_n</name>
      	<regex>\b\(new\|newarray\|nop\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_p</name>
      	<regex>\b\(pop\|pop2\|putfield\|putstatic\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_r</name>
      	<regex>\b\(ret\|return\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_s</name>
      	<regex>\b\(saload\|sastore\|sipush\|swap\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_t</name>
      	<regex>\b\(tableswitch\)\b</regex>
      	<class>function</class>
      </pattern-item>
      <pattern-item>
      	<name>instructions_w</name>
      	<regex>\b\(wide\)\b</regex>
      	<class>function</class>
      </pattern-item>
   </pattern-items>
</glimmer-language-spec>
