<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="gretl" version="1.0" _section="Sources" mimetypes="application/x-gretlsession">
        
        <escape-char>\</escape-char>

        <line-comment _name = "Line Comment" style= "Comment">
                <start-regex>#</start-regex>
        </line-comment>

        <block-comment _name = "Block Comment" style = "Comment">
                <start-regex>\(\*</start-regex>
                <end-regex>\*\)</end-regex>
        </block-comment>

        <string _name = "String" style = "String" end-at-line-end = "TRUE">
                <start-regex>&quot;</start-regex>
                <end-regex>&quot;</end-regex>
        </string>

        <keyword-list _name = "Commands" style = "Keyword" case-sensitive="TRUE"
           beginning-regex="\b" end-regex="\b">
             <keyword>add</keyword>
             <keyword>addobs</keyword>
             <keyword>addto</keyword>
             <keyword>adf</keyword>      
             <keyword>ar</keyword>       
             <keyword>arch</keyword>
             <keyword>arma</keyword>
             <keyword>boxplot</keyword>
             <keyword>chow</keyword>     
             <keyword>coeffsum</keyword>
             <keyword>coint</keyword>
             <keyword>coint2</keyword>
             <keyword>corc</keyword> 
             <keyword>corr</keyword>     
             <keyword>corrgm</keyword>   
             <keyword>criteria</keyword>
             <keyword>critical</keyword>
             <keyword>cusum</keyword>
             <keyword>data</keyword>
             <keyword>delete</keyword>
             <keyword>deriv</keyword>
             <keyword>diff</keyword>
             <keyword>else</keyword>
             <keyword>end</keyword>
             <keyword>endif</keyword>
             <keyword>endloop</keyword>
             <keyword>endog</keyword>
             <keyword>eqnprint</keyword>
             <keyword>equation</keyword>
	     <keyword>estimate</keyword>
             <keyword>fcast</keyword> 
             <keyword>fcasterr</keyword>
             <keyword>fit</keyword> 
             <keyword>freq</keyword>
             <keyword>garch</keyword>    
             <keyword>genr</keyword>     
             <keyword>gnuplot</keyword>  
             <keyword>graph</keyword> 
             <keyword>hausman</keyword>
             <keyword>hccm</keyword> 
             <keyword>help</keyword>    
             <keyword>hilu</keyword>    
             <keyword>hsk</keyword>
             <keyword>identity</keyword> 
             <keyword>if</keyword>
             <keyword>import</keyword>
	     <keyword>include</keyword>
             <keyword>info</keyword>
             <keyword>instr</keyword> 
             <keyword>label</keyword>
             <keyword>labels</keyword>
             <keyword>lad</keyword>
             <keyword>lags</keyword>    
             <keyword>ldiff</keyword>
             <keyword>leverage</keyword>
             <keyword>list</keyword>
             <keyword>lmtest</keyword> 
             <keyword>logistic</keyword>
             <keyword>logit</keyword>
             <keyword>logs</keyword>
             <keyword>loop</keyword>
             <keyword>meantest</keyword>
             <keyword>mpols</keyword>
             <keyword>multiply</keyword>
             <keyword>nls</keyword>
             <keyword>noecho</keyword>
             <keyword>nulldata</keyword>
             <keyword>ols</keyword>     
             <keyword>omit</keyword>
             <keyword>omitfrom</keyword>
             <keyword>open</keyword>
             <keyword>outfile</keyword>
             <keyword>panel</keyword>
             <keyword>pca</keyword>
             <keyword>pergm</keyword>
             <keyword>plot</keyword>  
	     <keyword>poisson</keyword>   
             <keyword>pooled</keyword>
             <keyword>print</keyword>
             <keyword>printf</keyword>  
             <keyword>probit</keyword>
             <keyword>pvalue</keyword>
             <keyword>pwe</keyword>
             <keyword>quit</keyword>
             <keyword>rename</keyword> 
             <keyword>reset</keyword>
             <keyword>restrict</keyword>
             <keyword>rhodiff</keyword> 
             <keyword>rmplot</keyword>
             <keyword>run</keyword>
             <keyword>runs</keyword>
             <keyword>scalar</keyword>
             <keyword>scatters</keyword>
             <keyword>seed</keyword>
             <keyword>series</keyword>
             <keyword>set</keyword>
             <keyword>setobs</keyword>
             <keyword>setmiss</keyword>
             <keyword>shell</keyword>   
             <keyword>sim</keyword>     
             <keyword>smpl</keyword>
             <keyword>spearman</keyword>
             <keyword>square</keyword>  
             <keyword>store</keyword>   
             <keyword>summary</keyword>
             <keyword>system</keyword>
             <keyword>tabprint</keyword>
             <keyword>testuhat</keyword>
             <keyword>tobit</keyword>
             <keyword>tsls</keyword>    
             <keyword>var</keyword>
             <keyword>varlist</keyword>
             <keyword>vartest</keyword>
             <keyword>vif</keyword>
             <keyword>wls</keyword>
        </keyword-list>

        <keyword-list _name = "Genr-functions" style = "Function"
	case-sensitive="TRUE">
             <keyword>abs</keyword> 
             <keyword>atan</keyword>
             <keyword>bkfilt</keyword>
             <keyword>coeff</keyword>
             <keyword>corr</keyword>
             <keyword>cos</keyword> 
             <keyword>cov</keyword>
             <keyword>cum</keyword>
             <keyword>date</keyword>
             <keyword>diff</keyword>
             <keyword>exp</keyword> 
             <keyword>firstobs</keyword>
             <keyword>fracdiff</keyword>
             <keyword>hpfilt</keyword>
             <keyword>int</keyword> 
             <keyword>isvector</keyword>
             <keyword>lastobs</keyword>
             <keyword>ldiff</keyword> 
             <keyword>ln</keyword>
             <keyword>log</keyword> 
             <keyword>max</keyword>
             <keyword>mean</keyword>
             <keyword>median</keyword>
             <keyword>min</keyword>
             <keyword>missing</keyword>
             <keyword>misszero</keyword>
             <keyword>mlog</keyword>
             <keyword>mpow</keyword>
             <keyword>nobs</keyword> 
             <keyword>normal</keyword>
             <keyword>pvalue</keyword>
             <keyword>resample</keyword>
             <keyword>rho</keyword> 
             <keyword>sd</keyword> 
             <keyword>sin</keyword> 
             <keyword>sort</keyword> 
             <keyword>sqrt</keyword> 
             <keyword>sst</keyword>
             <keyword>stderr</keyword>
             <keyword>sum</keyword>
             <keyword>tan</keyword>
             <keyword>uniform</keyword>
             <keyword>var</keyword>
             <keyword>varname</keyword>
             <keyword>vcv</keyword>
             <keyword>zeromiss</keyword>
        </keyword-list>

        <pattern-item _name = "Internal-Variables" style = "Data Type">
                <regex>[$][$]?[a-zA-Z_][a-zA-Z0-9_]*</regex>
        </pattern-item>

        <pattern-item _name = "Options" style = "Data Type">
                <regex>--[a-z-]*[ \n]*</regex>
        </pattern-item>

        <string _name = "Character Constant" style = "String" end-at-line-end = "TRUE">
                <start-regex>&apos;</start-regex>
                <end-regex>&apos;</end-regex>
        </string>

</language>
