home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 November / CPNL0711.ISO / communic / email / Evolution-2.8.2-2.msi / Data1.cab / javascript.lang < prev    next >
Extensible Markup Language  |  2007-03-07  |  9KB  |  304 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE language SYSTEM "language.dtd">
  3. <!--
  4.     Proposed language specification for JavaScript files.
  5.     
  6.     Reference used:
  7.         http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf
  8.  
  9.     Tested with:
  10.         http://www.coffeeblack.org/scripts/map.js
  11.     
  12.     Submitted by Scott Martin (scott@coffeeblack.org)
  13. -->
  14. <language _name="JavaScript" version="1.0" _section="Scripts" mimetypes="text/x-javascript;text/javascript;text/x-js;application/x-javascript">
  15.     
  16.     <escape-char>\</escape-char>
  17.     
  18.     <string _name="String" style="String" end-at-line-end="TRUE">
  19.         <start-regex>"</start-regex>
  20.         <end-regex>"</end-regex>
  21.     </string>
  22.  
  23.     <string _name="String 2" style="String" end-at-line-end="TRUE">
  24.         <start-regex>'</start-regex>
  25.         <end-regex>'</end-regex>
  26.     </string>
  27.  
  28.     <line-comment _name="Line Comment" style="Comment">
  29.         <start-regex>//</start-regex>
  30.     </line-comment>
  31.  
  32.     <block-comment _name="Block Comment" style="Comment">
  33.         <start-regex>/\*</start-regex>
  34.     <end-regex>\*/</end-regex>
  35.     </block-comment>
  36.     
  37.     <pattern-item _name="Punctuators" style="Others 3">
  38.         <regex>[{}();:,.]</regex>        
  39.     </pattern-item>
  40.     
  41.     <pattern-item _name="Operators" style="Function">
  42.         <regex>[-~^@/%|=+*!?&<>]</regex>
  43.     </pattern-item>
  44.     
  45.     <pattern-item _name="Array Operators" style="Function">
  46.         <regex>(\[|\])</regex>
  47.     </pattern-item>
  48.     
  49.     <pattern-item _name="Hexadecimal Number" style="Base-N Integer">
  50.         <regex>0[xX][a-fA-F0-9]+</regex>
  51.     </pattern-item>
  52.     
  53.     <pattern-item _name="Number" style="Decimal">
  54.         <regex>0|[\+-]?[1-9][0-9]*</regex>
  55.     </pattern-item>
  56.     
  57.     <pattern-item _name="Floating-Point Number" style="Floating Point">
  58.         <regex>[\+-]?(0|[1-9][0-9]*)?\.[0-9]+([Ee][\+-]?[1-9][0-9]*)?</regex>
  59.     </pattern-item>
  60.     
  61.     <pattern-item _name="Unicode Escape Sequence" style="String">
  62.         <regex>\\u[a-fA-F0-9]{4}</regex>
  63.     </pattern-item>
  64.     
  65.     <keyword-list _name="Literals" style="Others" case-sensitive="TRUE">
  66.         <keyword>null</keyword>
  67.         <keyword>true</keyword>
  68.         <keyword>false</keyword>
  69.     </keyword-list>
  70.     
  71.     <keyword-list _name="Keywords" style="Keyword" case-sensitive="TRUE">
  72.         <keyword>function</keyword>
  73.         <keyword>this</keyword>
  74.         <keyword>var</keyword>
  75.         <keyword>const</keyword>
  76.     </keyword-list>
  77.     
  78.     <keyword-list _name="Flow Keywords" style="Keyword" case-sensitive="TRUE">
  79.         <keyword>break</keyword>
  80.         <keyword>case</keyword>
  81.         <keyword>continue</keyword>
  82.         <keyword>default</keyword>
  83.         <keyword>do</keyword>
  84.         <keyword>else</keyword>
  85.         <keyword>for</keyword>
  86.         <keyword>if</keyword>
  87.         <keyword>in</keyword>
  88.         <keyword>return</keyword>
  89.         <keyword>switch</keyword>
  90.         <keyword>while</keyword>
  91.         <keyword>with</keyword>
  92.     </keyword-list>
  93.     
  94.     <keyword-list _name="Word Operators" style="Function" case-sensitive="TRUE">
  95.         <keyword>delete</keyword>
  96.         <keyword>instanceof</keyword>
  97.         <keyword>new</keyword>
  98.         <keyword>throw</keyword>
  99.         <keyword>typeof</keyword>
  100.         <keyword>void</keyword>
  101.     </keyword-list>
  102.     
  103.     <keyword-list _name="Error Handling" style="Keyword" case-sensitive="TRUE">
  104.         <keyword>try</keyword>
  105.         <keyword>catch</keyword>
  106.         <keyword>finally</keyword>        
  107.     </keyword-list>    
  108.     
  109.     <keyword-list _name="Objects" style="Others" case-sensitive="TRUE">
  110.         <keyword>constructor</keyword>
  111.         <keyword>prototype</keyword>
  112.     </keyword-list>
  113.     
  114.     <keyword-list _name="Global Properties" style="Data Type" case-sensitive="TRUE">
  115.         <keyword>Infinity</keyword>
  116.         <keyword>NaN</keyword>
  117.         <keyword>Math</keyword>
  118.         <keyword>NEGATIVE_INFINITY</keyword>
  119.         <keyword>POSITIVE_INFINITY</keyword>        
  120.     </keyword-list>
  121.     
  122.     <keyword-list _name="Global Functions" style="Function" case-sensitive="TRUE">
  123.         <keyword>eval</keyword>
  124.         <keyword>parseInt</keyword>
  125.         <keyword>parseFloat</keyword>
  126.         <keyword>isNaN</keyword>
  127.         <keyword>isFinite</keyword>
  128.         <keyword>encodeURI</keyword>
  129.         <keyword>decodeURI</keyword>
  130.         <keyword>encodeURIComponent</keyword>
  131.         <keyword>decodeURIComponent</keyword>
  132.     </keyword-list>
  133.     
  134.     <keyword-list _name="Object Properties" style="Data Type" case-sensitive="TRUE">
  135.         <keyword>length</keyword>
  136.         <keyword>lastIndex</keyword>
  137.         <keyword>global</keyword>
  138.         <keyword>ignoreCase</keyword>
  139.         <keyword>multiline</keyword>
  140.         <keyword>source</keyword>
  141.         <keyword>name</keyword>
  142.         <keyword>message</keyword>
  143.     </keyword-list>
  144.     
  145.     <keyword-list _name="Object Functions" style="Function" case-sensitive="TRUE">
  146.         <keyword>toString</keyword>
  147.         <keyword>toLocaleString</keyword>
  148.         <keyword>valueOf</keyword>
  149.         <keyword>hasOwnProperty</keyword>
  150.         <keyword>isPrototypeOf</keyword>
  151.         <keyword>propertyIsEnumerable</keyword>
  152.         <keyword>apply</keyword>
  153.         <keyword>call</keyword>
  154.         <keyword>concat</keyword>
  155.         <keyword>join</keyword>
  156.         <keyword>pop</keyword>
  157.         <keyword>push</keyword>
  158.         <keyword>reverse</keyword>
  159.         <keyword>shift</keyword>
  160.         <keyword>slice</keyword>
  161.         <keyword>sort</keyword>
  162.         <keyword>unshift</keyword>
  163.         <keyword>fromCharCode</keyword>
  164.         <keyword>charAt</keyword>
  165.         <keyword>charCodeAt</keyword>
  166.         <keyword>indexOf</keyword>
  167.         <keyword>lastIndexOf</keyword>
  168.         <keyword>localeCompare</keyword>
  169.         <keyword>match</keyword>
  170.         <keyword>exec</keyword>
  171.         <keyword>replace</keyword>
  172.         <keyword>search</keyword>
  173.         <keyword>split</keyword>
  174.         <keyword>substr</keyword>
  175.         <keyword>substring</keyword>
  176.         <keyword>toLowerCase</keyword>
  177.         <keyword>toLocaleLowerCase</keyword>
  178.         <keyword>toUpperCase</keyword>
  179.         <keyword>toLocaleUpperCase</keyword>
  180.         <keyword>toFixed</keyword>
  181.         <keyword>toExponential</keyword>
  182.         <keyword>toPrecision</keyword>
  183.         <keyword>abs</keyword>
  184.         <keyword>acos</keyword>
  185.         <keyword>asin</keyword>
  186.         <keyword>atan</keyword>
  187.         <keyword>atan2</keyword>
  188.         <keyword>ceil</keyword>
  189.         <keyword>cos</keyword>
  190.         <keyword>exp</keyword>
  191.         <keyword>floor</keyword>
  192.         <keyword>log</keyword>
  193.         <keyword>max</keyword>
  194.         <keyword>min</keyword>
  195.         <keyword>pow</keyword>
  196.         <keyword>random</keyword>
  197.         <keyword>round</keyword>
  198.         <keyword>sin</keyword>
  199.         <keyword>sqrt</keyword>
  200.         <keyword>tan</keyword>
  201.         <keyword>parse</keyword>
  202.         <keyword>UTC</keyword>
  203.         <keyword>toDateString</keyword>
  204.         <keyword>toTimeString</keyword>
  205.         <keyword>toLocaleString</keyword>
  206.         <keyword>toLocaleDateString</keyword>
  207.         <keyword>toLocaleTimeString</keyword>
  208.         <keyword>getTime</keyword>
  209.         <keyword>getFullYear</keyword>
  210.         <keyword>getUTCFullYear</keyword>
  211.         <keyword>getMonth</keyword>
  212.         <keyword>getUTCMonth</keyword>
  213.         <keyword>getDate</keyword>
  214.         <keyword>getUTCDate</keyword>
  215.         <keyword>getDay</keyword>
  216.         <keyword>getUTCDay</keyword>
  217.         <keyword>getHours</keyword>
  218.         <keyword>getUTCHours</keyword>
  219.         <keyword>getMinutes</keyword>
  220.         <keyword>getUTCMinutes</keyword>
  221.         <keyword>getSeconds</keyword>
  222.         <keyword>getUTCSeconds</keyword>
  223.         <keyword>getMilliseconds</keyword>
  224.         <keyword>getUTCMilliseconds</keyword>
  225.         <keyword>getTimezoneOffset</keyword>
  226.         <keyword>setTime</keyword>
  227.         <keyword>setMilliseconds</keyword>
  228.         <keyword>setUTCMilliseconds</keyword>
  229.         <keyword>setSeconds</keyword>
  230.         <keyword>setUTCSeconds</keyword>
  231.         <keyword>setMinutes</keyword>
  232.         <keyword>setUTCMinutes</keyword>
  233.         <keyword>setHours</keyword>
  234.         <keyword>setUTCHours</keyword>
  235.         <keyword>setDate</keyword>
  236.         <keyword>setUTCDate</keyword>
  237.         <keyword>setMonth</keyword>
  238.         <keyword>setUTCMonth</keyword>
  239.         <keyword>setFullYear</keyword>
  240.         <keyword>setUTCFullYear</keyword>
  241.         <keyword>toUTCString</keyword>
  242.         <keyword>escape</keyword>
  243.         <keyword>unescape</keyword>
  244.         <keyword>getYear</keyword>
  245.         <keyword>setYear</keyword>
  246.         <keyword>toGMTString</keyword>
  247.     </keyword-list>
  248.     
  249.     <keyword-list _name="Constructors" style="Others 2" case-sensitive="TRUE">
  250.         <keyword>Object</keyword>
  251.         <keyword>Function</keyword>
  252.         <keyword>Array</keyword>
  253.         <keyword>String</keyword>
  254.         <keyword>Boolean</keyword>
  255.         <keyword>Number</keyword>
  256.         <keyword>Date</keyword>
  257.         <keyword>RegExp</keyword>
  258.         <keyword>Error</keyword>
  259.         <keyword>EvalError</keyword>
  260.         <keyword>RangeError</keyword>
  261.         <keyword>SyntaxError</keyword>
  262.         <keyword>TypeError</keyword>
  263.         <keyword>URIError</keyword>
  264.     </keyword-list>
  265.     
  266.     <pattern-item _name="Math Value Properties" style="Data Type">
  267.         <regex>(LN(10|2)|(LOG(2|10))?E|PI|SQRT(1_)?2|(MAX|MIN)_VALUE)\b</regex>
  268.     </pattern-item>
  269.     
  270.     <keyword-list _name="Future Reserved Words" style="Specials" case-sensitive="TRUE">
  271.         <keyword>abstract</keyword>
  272.         <keyword>boolean</keyword>
  273.         <keyword>byte</keyword>
  274.         <keyword>char</keyword>
  275.         <keyword>class</keyword>
  276.         <keyword>debugger</keyword>
  277.         <keyword>double</keyword>
  278.         <keyword>enum</keyword>
  279.         <keyword>export</keyword>
  280.         <keyword>extends</keyword>
  281.         <keyword>final</keyword>
  282.         <keyword>float</keyword>
  283.         <keyword>goto</keyword>
  284.         <keyword>implements</keyword>
  285.         <keyword>import</keyword>
  286.         <keyword>int</keyword>
  287.         <keyword>interface</keyword>
  288.         <keyword>long</keyword>
  289.         <keyword>native</keyword>
  290.         <keyword>package</keyword>
  291.         <keyword>private</keyword>
  292.         <keyword>protected</keyword>
  293.         <keyword>public</keyword>
  294.         <keyword>short</keyword>
  295.         <keyword>static</keyword>
  296.         <keyword>super</keyword>
  297.         <keyword>synchronized</keyword>
  298.         <keyword>throws</keyword>
  299.         <keyword>transient</keyword>
  300.         <keyword>volatile</keyword>
  301.     </keyword-list>
  302.  
  303. </language>
  304.