EnglishРусский  

   ..

   fc.gt

   gasm.gt

   genlex.g

   gentee.gt

   gt.gt

   gtdo.gt

   lextbl.g

Ads

Installer and installation software
Commercial and Freeware installers.

source\src\lextbl\gentee.gt
  1 /******************************************************************************
  2 *
  3 * Copyright (C) 2006, The Gentee Group. All rights reserved. 
  4 * This file is part of the Gentee open source project - http://www.gentee.com. 
  5 * 
  6 * THIS FILE IS PROVIDED UNDER THE TERMS OF THE GENTEE LICENSE ("AGREEMENT"). 
  7 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE CONSTITUTES RECIPIENTS 
  8 * ACCEPTANCE OF THE AGREEMENT.
  9 *
 10 * ID: gentee 18.10.06 0.0.A.
 11 *
 12 * Author: Alexey Krivonogov ( gentee )
 13 *
 14 * Summary: Gentee's lexical table for compiler
 15 *
 16 ******************************************************************************/
 17 
 18 <gentee prefix = "G_" desc = "Gentee sources" cout = "..\lex\lexgentee.c">
 19    <MAIN cmd = SKIP >
 20       <_ ch = '.?@' cmd = OPERCHAR pos itcmd value/> 
 21       <_ ch = '~' cmd = OPERCHAR pos itcmd value/> 
 22       <_ hexch = '0A' cmd = LINE pos itcmd />
 23       <_ hexch = '0D' state = ISLINE pos />
 24       <_ ch = '/' state = ISCOMMENT pos/>
 25       <_ ch = '!=*' state = ISEQUAL pos/>
 26       <_ ch = '^' state = ISEQUAL pos/>
 27       <_ ch = '+' state = ISPLUS pos/>
 28       <_ ch = '-' state = ISMINUS pos/>
 29       <_ ch = '<' state = ISLESS pos/>
 30       <_ ch = '>' state = ISGREAT pos/>
 31       <_ ch = '\' state = IGNLINE pos />
 32       <_ ch = '%' state = ISPERTRY pos stay />
 33       <_ ch = '&' state = ISAND pos/>
 34       <_ ch = '|' state = ISOR pos/>
 35       <_ name state = NAME pos itstate keyword/>
 36       <_ ch = '$' state = ISMACRO pos />
 37       <_ ch = '"' state = STRING pos itstate push />
 38       <_ ch = "'" state = BINARY pos itstate push />
 39       <_ ch = '0' pos cmd = NUMBER state = ISNUMBER itcmd />
 40       <_ range = '19' pos cmd = NUMBER state = DECIMAL itcmd /> 
 41       <_ ch = ',()' cmd = OPERCHAR pos itcmd value/>
 42       <_ ch = '{}' cmd = OPERCHAR pos itcmd value/>
 43       <_ ch = ':;' cmd = SYSCHAR pos itcmd value/>
 44       <_ ch = '[]' cmd = OPERCHAR pos itcmd value/> 
 45    </>   
 46    <ISTEXT state = TEXTSTR itstate stay pos comment = "Text string must be the second!">
 47    </>
 48    <IGNLINE state = MAIN stay comment = "Ignore line character \">
 49       <_ hexch = '0D' cmd = SKIP />
 50       <_ hexch = '0A' cmd = SKIP state = MAIN />
 51    </>
 52    <ISLINE state = MAIN stay >
 53       <_ hexch = '0A' cmd = LINE itcmd state = MAIN />
 54    </>
 55    <ISCOMMENT cmd = OPERCHAR itcmd state = MAIN stay value >
 56       <_ ch = '*' state = COMMENT />
 57       <_ ch = '/' state = LINECOMMENT />
 58       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
 59    </>
 60    <COMMENT cmd = SKIP comment = "Comment /* ... */">
 61       <_ multi = '*/' cmd = SKIP state = MAIN />
 62    </>
 63    <LINECOMMENT cmd = SKIP comment = "Comment //... ">
 64       <_ hexch = '0D0A' state = MAIN stay />
 65    </>
 66    <NAME state = MAIN stay comment = "Name identifier">
 67       <_ numname cmd = OK />
 68    </>
 69    <MACRONAME state = MAIN stay comment = "MacroName identifier">
 70       <_ numname cmd = OK />
 71       <_ ch = '$' cmd = OK state = MAIN />
 72    </>
 73    <ISMACRO state = MAIN stay >
 74       <_ name state = MACRONAME cmd = MACRO itcmd />
 75       <_ ch = '"' state = MACROSTR itstate /> 
 76    </>
 77    <ISNUMBER state = MAIN stay >
 78       <_ range = '09' state = DECIMAL cmd = OK />
 79       <_ ch = 'xX' state = HEX cmd = OK />
 80       <_ ch = 'bB' state = BIN cmd = OK />
 81       <_ ch = 'lL' cmd = OK state = MAIN />
 82       <_ ch = 'dD' cmd = OK state = MAIN />
 83       <_ ch = 'fF' cmd = OK state = MAIN />
 84       <_ ch = 'eE' cmd = OK state = EXPONENT />
 85       <_ ch = '.' cmd = OK state = DOUBLE />
 86    </>
 87    <DECIMAL state = MAIN stay >
 88       <_ range = '09' cmd = OK />
 89       <_ ch = 'lL' cmd = OK state = MAIN />
 90       <_ ch = 'dD' cmd = OK state = MAIN />
 91       <_ ch = 'fF' cmd = OK state = MAIN />
 92       <_ ch = 'eE' cmd = OK state = EXPONENT />
 93       <_ ch = '.' cmd = OK state = DOUBLE />
 94    </>
 95    <HEX state = MAIN stay >
 96       <_ numhex cmd = OK />
 97       <_ ch = 'lL' cmd = OK state = MAIN />
 98    </>
 99    <BIN state = MAIN stay >
100       <_ ch = '01' cmd = OK />
101       <_ ch = 'lL' cmd = OK state = MAIN />
102    </>
103    <DOUBLE state = MAIN stay >
104       <_ ch = 'dD' cmd = OK state = MAIN />
105       <_ ch = 'fF' cmd = OK state = MAIN />
106       <_ ch = 'eE' cmd = OK state = EXPONENT />
107       <_ range = '09' cmd = OK />   
108    </>
109    <EXPONENT state = FRACTION stay >
110       <_ ch = '+-' cmd = OK state = FRACTION />
111    </>
112    <FRACTION state = MAIN stay >
113       <_ range = '09' cmd = OK />   
114       <_ ch = 'dD' cmd = OK state = MAIN />
115       <_ ch = 'fF' cmd = OK state = MAIN />
116    </>
117    <ISEQUAL cmd = OPERCHAR itcmd state = MAIN stay value >
118       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
119    </>
120    <ISPLUS cmd = OPERCHAR itcmd state = MAIN stay value >
121       <_ ch = '=+' cmd = OPERCHAR itcmd state = MAIN value />
122    </>
123    <ISMINUS cmd = OPERCHAR itcmd state = MAIN stay value >
124       <_ ch = '=->' cmd = OPERCHAR itcmd state = MAIN value />
125    </>
126    <ISLESS cmd = OPERCHAR itcmd state = MAIN stay value >
127       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
128       <_ ch = '<' state = ISEQUAL />
129    </>
130    <ISGREAT cmd = OPERCHAR itcmd state = MAIN stay value >
131       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
132       <_ ch = '>' state = ISEQUAL />
133    </>
134    <ISAND cmd = OPERCHAR itcmd state = MAIN stay value >
135       <_ ch = '=&' cmd = OPERCHAR itcmd state = MAIN value />
136    </>
137    <ISOR cmd = OPERCHAR itcmd state = MAIN stay value >
138       <_ ch = '=|' cmd = OPERCHAR itcmd state = MAIN value />
139    </>
140    <ISPERCENT cmd = OPERCHAR itcmd state = MAIN stay value >
141       <_ ch = '{' cmd = OPERCHAR itcmd state = MAIN value />
142       <_ ch = '><=' state = ISEQUAL />
143    </>
144    <ISPERTRY state = ISPERCENT >
145       <_ multi = '%!=' cmd = OPERCHAR itcmd state = MAIN value />
146    </>
147    <MACROSTR cmd = OK comment = 'Macro string $"String"'>
148       <_ ch = '"' state = MAIN cmd = OK />
149       <_ multi = '""' cmd = OK />
150    </>
151    <STRING cmd = OK comment = 'String'>
152       <_ ch = '"' pop cmd = OK />
153       <_ multi = '\\' cmd = OK />
154       <_ multi = '\"' cmd = OK />
155       <_ multi = '\<' state = FILENAME itstate pos push />
156       <_ multi = '\*' state = STRCOMMENT push />
157       <_ multi = '\[' state = STRALL push cmd = STRNAME />
158       <_ multi = '\(' state = MAIN cmd = EXPR />
159    </>
160    <FILENAME cmd = OK comment = 'File data \<filename>'>
161       <_ ch = '>' pop new cmd = OK />
162    </>
163    <STRCOMMENT cmd = OK comment = 'String or Binary comment \* ... *\'>
164       <_ multi = '*\' pop cmd = OK />
165    </>
166    <STRALL cmd = OK comment = "String is ignoring '\'">
167       <_ ch = '[' cmd = STRNAME pop />
168    </>
169    <TEXTSTR cmd = OK comment = 'Text string'>
170       <_ multi = '\!' cmd = OK state = MAIN />
171       <_ multi = '\<' state = FILENAME itstate pos push />
172       <_ multi = '\*' state = STRCOMMENT push />
173       <_ multi = '\[' state = STRALL push cmd = STRNAME />
174       <_ multi = '\(' state = MAIN cmd = EXPR />
175       <_ multi = '\{' state = MAIN cmd = EXPR />
176       <_ multi = '\@' state = MAIN cmd = EXPR />
177    </>
178    <BINARY cmd = OK comment = 'Binary data'>
179       <_ ch = "'" pop cmd = OK />
180       <_ multi = '\"' state = BINSTR push />
181       <_ multi = '\<' state = FILENAME itstate pos push />
182       <_ multi = '\*' state = STRCOMMENT push />
183       <_ multi = '\(' state = MAIN cmd = EXPR />
184    </>
185    <BINSTR cmd = OK comment = 'String in Binary  \" ... "'>
186       <_ ch = '"' pop cmd = OK />
187    </>
188    <commands skip>
189       <LINE comment = "New line 0x0D0A or 0x0A" />
190       <OPERCHAR comment = "Operations" />
191       <SYSCHAR comment = "Punctuation marks" />
192       <MACRO comment = "Macro identifier $name or $name$" />
193       <NUMBER comment = "Number decimal, hexadecimal, float or double" />
194    </commands>
195    <keywords skip>
196       <cmd id = 1>
197          as break case cdecl continue default define do elif else extern for foreach fornum func global goto if ifdef import include label method of operator private property public return sizeof stdcall switch subfunc type while with 
198       </>
199       <cmdtext = text id = 255 />
200    </keywords>
201 </gentee>
202