EnglishРусский  

   ..

   fc.gt

   fgentee.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\fgentee.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: fgentee 18.10.06 0.0.A.
 11 *
 12 * Author: Alexey Krivonogov ( gentee )
 13 *
 14 * Summary: Full Gentee's lexical table
 15 *
 16 ******************************************************************************/
 17 
 18 <fgentee prefix = "FG_" desc = "Full Gentee sources" gout =
 19      "..\..\example\autoformat\lexfgentee.g"
 20      binout =
 21      "..\..\example\autoformat\lexfgentee.lex" >
 22    <MAIN state = UNKNOWN itstate pos >
 23       <_ ch = ' ' state = SPACE pos itstate /> 
 24       <_ ch = '.?@' cmd = OPERCHAR pos itcmd value/> 
 25       <_ ch = '~' cmd = OPERCHAR pos itcmd value/> 
 26       <_ hexch = '09' state = TAB pos itstate /> 
 27       <_ hexch = '0A' cmd = LINE pos itcmd />
 28       <_ hexch = '0D' state = ISLINE pos />
 29       <_ ch = '/' state = ISCOMMENT pos/>
 30       <_ ch = '!=*' state = ISEQUAL pos/>
 31       <_ ch = '^' state = ISEQUAL pos/>
 32       <_ ch = '+' state = ISPLUS pos/>
 33       <_ ch = '-' state = ISMINUS pos/>
 34       <_ ch = '<' state = ISLESS pos/>
 35       <_ ch = '>' state = ISGREAT pos/>
 36       <_ ch = '\' state = IGNLINE pos itstate/>
 37       <_ ch = '%' state = ISPERTRY pos stay />
 38       <_ ch = '&' state = ISAND pos/>
 39       <_ ch = '|' state = ISOR pos/>
 40       <_ name state = NAME pos itstate keyword/>
 41       <_ ch = '$' state = ISMACRO pos />
 42       <_ ch = '"' state = STRING pos itstate push />
 43       <_ ch = "'" state = BINARY pos itstate push />
 44       <_ ch = '0' pos cmd = NUMBER state = ISNUMBER itcmd />
 45       <_ range = '19' pos cmd = NUMBER state = DECIMAL itcmd /> 
 46       <_ ch = ',()' cmd = SYSCHAR pos itcmd value/>
 47       <_ ch = ';{}' cmd = SYSCHAR pos itcmd value/>
 48       <_ ch = ':[]' cmd = SYSCHAR pos itcmd value/> 
 49    </>   
 50    <ISTEXT state = TEXTSTR itstate stay pos comment = "Text string must be the second!">
 51    </>
 52    <IGNLINE state = MAIN stay comment = "Ignore line character \">
 53       <_ hexch = '0D' cmd = OK />
 54       <_ hexch = '0A' cmd = OK state = MAIN />
 55    </>
 56    <UNKNOWN cmd = OK comment = "Unknown characters">
 57       <_ hexrange = '20FF' state = MAIN stay />
 58       <_ hexch = '090D0A' state = MAIN stay />
 59    </>
 60    <SPACE state = MAIN stay comment = "Space characters">
 61       <_ ch = ' ' cmd = OK />
 62    </>
 63    <TAB state = MAIN stay comment = "Tab characters">
 64       <_ hexch = '09' cmd = OK />
 65    </>
 66    <ISLINE state = UNKNOWN itstate stay >
 67       <_ hexch = '0A' cmd = LINE itcmd state = MAIN />
 68    </>
 69    <ISCOMMENT cmd = OPERCHAR itcmd state = MAIN stay value >
 70       <_ ch = '*' state = COMMENT itstate />
 71       <_ ch = '/' state = LINECOMMENT itstate />
 72       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
 73    </>
 74    <COMMENT cmd = OK comment = "Comment /* ... */">
 75       <_ multi = '*/' cmd = OK state = MAIN />
 76    </>
 77    <LINECOMMENT cmd = OK comment = "Comment //... ">
 78       <_ hexch = '0D0A' state = MAIN stay />
 79    </>
 80    <NAME state = MAIN stay comment = "Name identifier">
 81       <_ numname cmd = OK />
 82    </>
 83    <MACRONAME state = MAIN stay comment = "MacroName identifier">
 84       <_ numname cmd = OK />
 85       <_ ch = '$' cmd = OK state = MAIN />
 86    </>
 87    <ISMACRO state = UNKNOWN itstate stay >
 88       <_ name state = MACRONAME cmd = MACRO itcmd />
 89       <_ ch = '"' state = MACROSTR itstate /> 
 90    </>
 91    <ISNUMBER state = MAIN stay >
 92       <_ range = '09' state = DECIMAL cmd = OK />
 93       <_ ch = 'xX' state = HEX cmd = OK />
 94       <_ ch = 'bB' state = BIN cmd = OK />
 95       <_ ch = 'lL' cmd = OK state = MAIN />
 96       <_ ch = 'dD' cmd = OK state = MAIN />
 97       <_ ch = 'fF' cmd = OK state = MAIN />
 98       <_ ch = 'eE' cmd = OK state = EXPONENT />
 99       <_ ch = '.' cmd = OK state = DOUBLE />
100    </>
101    <DECIMAL state = MAIN stay >
102       <_ range = '09' cmd = OK />
103       <_ ch = 'lL' cmd = OK state = MAIN />
104       <_ ch = 'dD' cmd = OK state = MAIN />
105       <_ ch = 'fF' cmd = OK state = MAIN />
106       <_ ch = 'eE' cmd = OK state = EXPONENT />
107       <_ ch = '.' cmd = OK state = DOUBLE />
108    </>
109    <HEX state = MAIN stay >
110       <_ numhex cmd = OK />
111       <_ ch = 'lL' cmd = OK state = MAIN />
112    </>
113    <BIN state = MAIN stay >
114       <_ ch = '01' cmd = OK />
115       <_ ch = 'lL' cmd = OK state = MAIN />
116    </>
117    <DOUBLE state = MAIN stay >
118       <_ ch = 'dD' cmd = OK state = MAIN />
119       <_ ch = 'fF' cmd = OK state = MAIN />
120       <_ ch = 'eE' cmd = OK state = EXPONENT />
121       <_ range = '09' cmd = OK />   
122    </>
123    <EXPONENT state = FRACTION stay >
124       <_ ch = '+-' cmd = OK state = FRACTION />
125    </>
126    <FRACTION state = MAIN stay >
127       <_ range = '09' cmd = OK />   
128       <_ ch = 'dD' cmd = OK state = MAIN />
129       <_ ch = 'fF' cmd = OK state = MAIN />
130    </>
131    <ISEQUAL cmd = OPERCHAR itcmd state = MAIN stay value >
132       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
133    </>
134    <ISPLUS cmd = OPERCHAR itcmd state = MAIN stay value >
135       <_ ch = '=+' cmd = OPERCHAR itcmd state = MAIN value />
136    </>
137    <ISMINUS cmd = OPERCHAR itcmd state = MAIN stay value >
138       <_ ch = '=->' cmd = OPERCHAR itcmd state = MAIN value />
139    </>
140    <ISLESS cmd = OPERCHAR itcmd state = MAIN stay value >
141       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
142       <_ ch = '<' state = ISEQUAL />
143    </>
144    <ISGREAT cmd = OPERCHAR itcmd state = MAIN stay value >
145       <_ ch = '=' cmd = OPERCHAR itcmd state = MAIN value />
146       <_ ch = '>' state = ISEQUAL />
147    </>
148    <ISAND cmd = OPERCHAR itcmd state = MAIN stay value >
149       <_ ch = '=&' cmd = OPERCHAR itcmd state = MAIN value />
150    </>
151    <ISOR cmd = OPERCHAR itcmd state = MAIN stay value >
152       <_ ch = '=|' cmd = OPERCHAR itcmd state = MAIN value />
153    </>
154    <ISPERCENT cmd = OPERCHAR itcmd state = MAIN stay value >
155       <_ ch = '{' cmd = OPERCHAR itcmd state = MAIN value />
156       <_ ch = '><=' state = ISEQUAL />
157    </>
158    <ISPERTRY state = ISPERCENT >
159       <_ multi = '%!=' cmd = OPERCHAR itcmd state = MAIN value />
160    </>
161    <MACROSTR cmd = OK comment = 'Macro string $"String"'>
162       <_ ch = '"' state = MAIN cmd = OK />
163       <_ multi = '""' cmd = OK />
164    </>
165    <STRING cmd = OK comment = 'String'>
166       <_ ch = '"' pop cmd = OK />
167       <_ multi = '\\' cmd = OK />
168       <_ multi = '\"' cmd = OK />
169       <_ multi = '\<' state = FILENAME itstate pos push />
170       <_ multi = '\*' state = STRCOMMENT push />
171       <_ multi = '\[' state = STRALL push cmd = STRNAME />
172       <_ multi = '\(' state = MAIN cmd = EXPR />
173    </>
174    <FILENAME cmd = OK comment = 'File data \<filename>'>
175       <_ ch = '>' pop new cmd = OK />
176    </>
177    <STRCOMMENT cmd = OK comment = 'String or Binary comment \* ... *\'>
178       <_ multi = '*\' pop cmd = OK />
179    </>
180    <STRALL cmd = OK comment = "String is ignoring '\'">
181       <_ ch = '[' cmd = STRNAME pop />
182    </>
183    <TEXTSTR cmd = OK comment = 'Text string'>
184       <_ multi = '\!' cmd = OK state = MAIN />
185       <_ multi = '\<' state = FILENAME push pos itstate />
186       <_ multi = '\*' state = STRCOMMENT push />
187       <_ multi = '\[' state = STRALL push cmd = STRNAME />
188       <_ multi = '\(' state = MAIN cmd = EXPR />
189       <_ multi = '\{' state = MAIN cmd = EXPR />
190       <_ multi = '\@' state = MAIN cmd = EXPR />
191    </>
192    <BINARY cmd = OK comment = 'Binary data'>
193       <_ ch = "'" pop cmd = OK />
194       <_ multi = '\"' state = BINSTR push />
195       <_ multi = '\<' state = FILENAME push pos itstate/>
196       <_ multi = '\*' state = STRCOMMENT push />
197       <_ multi = '\(' state = MAIN cmd = EXPR />
198    </>
199    <BINSTR cmd = OK comment = 'String in Binary  \" ... "'>
200       <_ ch = '"' pop cmd = OK />
201    </>
202    <commands skip>
203       <LINE comment = "New line 0x0D0A or 0x0A" />
204       <OPERCHAR comment = "Operations" />
205       <SYSCHAR comment = "Punctuation marks" />
206       <MACRO comment = "Macro identifier $name" />
207       <NUMBER comment = "Number decimal, hexadecimal, float or double" />
208    </commands>
209    <keywords skip>
210       <cmd id = 1>
211          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 
212       </>
213       <cmdtext = text id = 255 />
214       <type id = 256>
215          arr buf byte double float hash int long short str ubyte uint ulong
216          ushort
217       </>
218    </keywords>
219 </fgentee>
220