mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
Update to work with antlr 2.7.1
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@10746 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ee9c4af004
commit
b2f1e88a6c
22 changed files with 87 additions and 133 deletions
|
@ -1,3 +1,12 @@
|
|||
2001-08-20 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Update for changes in gsantlr and use of antlr 2.7.1
|
||||
* GSWeb.framework/GSWHTMLLexer.m: Update.
|
||||
* GSWeb.framework/GSWPageDefTokenTypes.txt: Update.
|
||||
* GSWeb.framework/PageDef.g: Update.
|
||||
* GSWeb.framework/htmltag.g: Update.
|
||||
(patch from kim@tinker.com).
|
||||
|
||||
2001-03-14 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
|
||||
* GSWeb.framework/GSWComponent.m: Traces
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
|||
#include "gsantlr/ANTLRCharBuffer.h"
|
||||
#include "gsantlr/ANTLRBitSet.h"
|
||||
#include "gsantlr/ANTLRCharScanner.h"
|
||||
|
||||
@interface GSWHTMLAttrLexer : ANTLRCharScanner
|
||||
{
|
||||
};
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "gsantlr/ANTLRException.h"
|
||||
#include "GSWHTMLAttrLexer.h"
|
||||
|
@ -49,12 +50,12 @@
|
|||
|
||||
-(ANTLRDefToken) nextToken
|
||||
{
|
||||
ANTLRDefToken _rettoken=nil;
|
||||
ANTLRDefToken theRetToken=nil;
|
||||
BOOL end=NO;
|
||||
//LOGObjectFnStart();
|
||||
for (;!end;)
|
||||
{
|
||||
ANTLRDefToken _rettoken;
|
||||
ANTLRDefToken theRetToken;
|
||||
ANTLRTokenType _ttype = ANTLRToken_INVALID_TYPE;
|
||||
[self resetText];
|
||||
NS_DURING // for error handling
|
||||
|
@ -77,49 +78,49 @@
|
|||
case ((unichar)('z')):
|
||||
{
|
||||
[self mIDENTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('=')):
|
||||
{
|
||||
[self mASSIGNWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('\t')): case ((unichar)('\n')): case ((unichar)('\r')): case ((unichar)(' ')):
|
||||
{
|
||||
[self mWSWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('"')): case ((unichar)('\'')):
|
||||
{
|
||||
[self mSTRINGWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('.')):
|
||||
{
|
||||
[self mPOINTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('#')):
|
||||
{
|
||||
[self mHEXNUMWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if ((([self LA:1] >= ((unichar)('0')) && [self LA:1] <= ((unichar)('9')))) && ([GSWHTMLAttrLexer___tokenSet_0 isMember:[self LA:2]]))
|
||||
{
|
||||
[self mPCINTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if ((([self LA:1] >= ((unichar)('0')) && [self LA:1] <= ((unichar)('9')))))
|
||||
{
|
||||
[self mINTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "GSWHTMLAttrParser.h"
|
||||
#include "GSWHTMLAttrTokenTypes.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
GSWHTMLAttr // tokenVocabulary name
|
||||
// $ANTLR 2.7.1: htmltag.g -> GSWHTMLAttrTokenTypes.txt$
|
||||
GSWHTMLAttr // output token vocab name
|
||||
IDENT=4
|
||||
WS=5
|
||||
ASSIGN=6
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
|||
#include "gsantlr/ANTLRCharBuffer.h"
|
||||
#include "gsantlr/ANTLRBitSet.h"
|
||||
#include "gsantlr/ANTLRCharScanner.h"
|
||||
|
||||
@interface GSWHTMLLexer : ANTLRCharScanner
|
||||
{
|
||||
};
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "gsantlr/ANTLRException.h"
|
||||
#include "GSWHTMLLexer.h"
|
||||
|
@ -49,12 +50,12 @@
|
|||
|
||||
-(ANTLRDefToken) nextToken
|
||||
{
|
||||
ANTLRDefToken _rettoken=nil;
|
||||
ANTLRDefToken theRetToken=nil;
|
||||
BOOL end=NO;
|
||||
//LOGObjectFnStart();
|
||||
for (;!end;)
|
||||
{
|
||||
ANTLRDefToken _rettoken;
|
||||
ANTLRDefToken theRetToken;
|
||||
ANTLRTokenType _ttype = ANTLRToken_INVALID_TYPE;
|
||||
[self resetText];
|
||||
NS_DURING // for error handling
|
||||
|
@ -62,22 +63,22 @@
|
|||
if (([self LA:1]==((unichar)('<'))) && ([GSWHTMLLexer___tokenSet_0 isMember:[self LA:2]]))
|
||||
{
|
||||
[self mOPENTAGWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('<'))) && ([self LA:2]==((unichar)('/'))))
|
||||
{
|
||||
[self mCLOSETAGWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('<'))) && ([self LA:2]==((unichar)('!'))))
|
||||
{
|
||||
[self mCOMMENTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([GSWHTMLLexer___tokenSet_1 isMember:[self LA:1]]))
|
||||
{
|
||||
[self mTEXTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1116,9 +1117,7 @@ int _begin=[text length];
|
|||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case ((unichar)('<')):
|
||||
if (([self LA:1]==((unichar)('<'))) && (([self LA:2] >= ((unichar)(0x3)) && [self LA:2] <= ((unichar)(0xff)))))
|
||||
{
|
||||
[self matchCharacter:'<'];
|
||||
{
|
||||
|
@ -1172,9 +1171,8 @@ int _begin=[text length];
|
|||
_loop67:;
|
||||
}
|
||||
NSLog(@"invalid tag: %@",[self text]);
|
||||
break;
|
||||
}
|
||||
case ((unichar)('\n')): case ((unichar)('\r')):
|
||||
else if (([self LA:1]==((unichar)('\n'))||[self LA:1]==((unichar)('\r'))))
|
||||
{
|
||||
{
|
||||
if (([self LA:1]==((unichar)('\r'))) && ([self LA:2]==((unichar)('\n'))))
|
||||
|
@ -1196,80 +1194,16 @@ int _begin=[text length];
|
|||
|
||||
}
|
||||
[self newline];
|
||||
break;
|
||||
}
|
||||
case ((unichar)(0x3)): case ((unichar)(0x4)): case ((unichar)(0x5)): case ((unichar)(0x6)):
|
||||
case ((unichar)(0x7)): case ((unichar)(0x8)): case ((unichar)('\t')): case ((unichar)(0xb)):
|
||||
case ((unichar)(0xc)): case ((unichar)(0xe)): case ((unichar)(0xf)): case ((unichar)(0x10)):
|
||||
case ((unichar)(0x11)): case ((unichar)(0x12)): case ((unichar)(0x13)): case ((unichar)(0x14)):
|
||||
case ((unichar)(0x15)): case ((unichar)(0x16)): case ((unichar)(0x17)): case ((unichar)(0x18)):
|
||||
case ((unichar)(0x19)): case ((unichar)(0x1a)): case ((unichar)(0x1b)): case ((unichar)(0x1c)):
|
||||
case ((unichar)(0x1d)): case ((unichar)(0x1e)): case ((unichar)(0x1f)): case ((unichar)(' ')):
|
||||
case ((unichar)('!')): case ((unichar)('"')): case ((unichar)('#')): case ((unichar)('$')):
|
||||
case ((unichar)('%')): case ((unichar)('&')): case ((unichar)('\'')): case ((unichar)('(')):
|
||||
case ((unichar)(')')): case ((unichar)('*')): case ((unichar)('+')): case ((unichar)(',')):
|
||||
case ((unichar)('-')): case ((unichar)('.')): case ((unichar)('/')): case ((unichar)('0')):
|
||||
case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')): case ((unichar)('4')):
|
||||
case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')): case ((unichar)('8')):
|
||||
case ((unichar)('9')): case ((unichar)(':')): case ((unichar)(';')): case ((unichar)('=')):
|
||||
case ((unichar)('>')): case ((unichar)('?')): case ((unichar)('@')): case ((unichar)('A')):
|
||||
case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')): case ((unichar)('E')):
|
||||
case ((unichar)('F')): case ((unichar)('G')): case ((unichar)('H')): case ((unichar)('I')):
|
||||
case ((unichar)('J')): case ((unichar)('K')): case ((unichar)('L')): case ((unichar)('M')):
|
||||
case ((unichar)('N')): case ((unichar)('O')): case ((unichar)('P')): case ((unichar)('Q')):
|
||||
case ((unichar)('R')): case ((unichar)('S')): case ((unichar)('T')): case ((unichar)('U')):
|
||||
case ((unichar)('V')): case ((unichar)('W')): case ((unichar)('X')): case ((unichar)('Y')):
|
||||
case ((unichar)('Z')): case ((unichar)('[')): case ((unichar)('\\')): case ((unichar)(']')):
|
||||
case ((unichar)('^')): case ((unichar)('_')): case ((unichar)('`')): case ((unichar)('a')):
|
||||
case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')): case ((unichar)('e')):
|
||||
case ((unichar)('f')): case ((unichar)('g')): case ((unichar)('h')): case ((unichar)('i')):
|
||||
case ((unichar)('j')): case ((unichar)('k')): case ((unichar)('l')): case ((unichar)('m')):
|
||||
case ((unichar)('n')): case ((unichar)('o')): case ((unichar)('p')): case ((unichar)('q')):
|
||||
case ((unichar)('r')): case ((unichar)('s')): case ((unichar)('t')): case ((unichar)('u')):
|
||||
case ((unichar)('v')): case ((unichar)('w')): case ((unichar)('x')): case ((unichar)('y')):
|
||||
case ((unichar)('z')): case ((unichar)('{')): case ((unichar)('|')): case ((unichar)('}')):
|
||||
case ((unichar)('~')): case ((unichar)(0x7f)): case ((unichar)(0x80)): case ((unichar)(0x81)):
|
||||
case ((unichar)(0x82)): case ((unichar)(0x83)): case ((unichar)(0x84)): case ((unichar)(0x85)):
|
||||
case ((unichar)(0x86)): case ((unichar)(0x87)): case ((unichar)(0x88)): case ((unichar)(0x89)):
|
||||
case ((unichar)(0x8a)): case ((unichar)(0x8b)): case ((unichar)(0x8c)): case ((unichar)(0x8d)):
|
||||
case ((unichar)(0x8e)): case ((unichar)(0x8f)): case ((unichar)(0x90)): case ((unichar)(0x91)):
|
||||
case ((unichar)(0x92)): case ((unichar)(0x93)): case ((unichar)(0x94)): case ((unichar)(0x95)):
|
||||
case ((unichar)(0x96)): case ((unichar)(0x97)): case ((unichar)(0x98)): case ((unichar)(0x99)):
|
||||
case ((unichar)(0x9a)): case ((unichar)(0x9b)): case ((unichar)(0x9c)): case ((unichar)(0x9d)):
|
||||
case ((unichar)(0x9e)): case ((unichar)(0x9f)): case ((unichar)(0xa0)): case ((unichar)(0xa1)):
|
||||
case ((unichar)(0xa2)): case ((unichar)(0xa3)): case ((unichar)(0xa4)): case ((unichar)(0xa5)):
|
||||
case ((unichar)(0xa6)): case ((unichar)(0xa7)): case ((unichar)(0xa8)): case ((unichar)(0xa9)):
|
||||
case ((unichar)(0xaa)): case ((unichar)(0xab)): case ((unichar)(0xac)): case ((unichar)(0xad)):
|
||||
case ((unichar)(0xae)): case ((unichar)(0xaf)): case ((unichar)(0xb0)): case ((unichar)(0xb1)):
|
||||
case ((unichar)(0xb2)): case ((unichar)(0xb3)): case ((unichar)(0xb4)): case ((unichar)(0xb5)):
|
||||
case ((unichar)(0xb6)): case ((unichar)(0xb7)): case ((unichar)(0xb8)): case ((unichar)(0xb9)):
|
||||
case ((unichar)(0xba)): case ((unichar)(0xbb)): case ((unichar)(0xbc)): case ((unichar)(0xbd)):
|
||||
case ((unichar)(0xbe)): case ((unichar)(0xbf)): case ((unichar)(0xc0)): case ((unichar)(0xc1)):
|
||||
case ((unichar)(0xc2)): case ((unichar)(0xc3)): case ((unichar)(0xc4)): case ((unichar)(0xc5)):
|
||||
case ((unichar)(0xc6)): case ((unichar)(0xc7)): case ((unichar)(0xc8)): case ((unichar)(0xc9)):
|
||||
case ((unichar)(0xca)): case ((unichar)(0xcb)): case ((unichar)(0xcc)): case ((unichar)(0xcd)):
|
||||
case ((unichar)(0xce)): case ((unichar)(0xcf)): case ((unichar)(0xd0)): case ((unichar)(0xd1)):
|
||||
case ((unichar)(0xd2)): case ((unichar)(0xd3)): case ((unichar)(0xd4)): case ((unichar)(0xd5)):
|
||||
case ((unichar)(0xd6)): case ((unichar)(0xd7)): case ((unichar)(0xd8)): case ((unichar)(0xd9)):
|
||||
case ((unichar)(0xda)): case ((unichar)(0xdb)): case ((unichar)(0xdc)): case ((unichar)(0xdd)):
|
||||
case ((unichar)(0xde)): case ((unichar)(0xdf)): case ((unichar)(0xe0)): case ((unichar)(0xe1)):
|
||||
case ((unichar)(0xe2)): case ((unichar)(0xe3)): case ((unichar)(0xe4)): case ((unichar)(0xe5)):
|
||||
case ((unichar)(0xe6)): case ((unichar)(0xe7)): case ((unichar)(0xe8)): case ((unichar)(0xe9)):
|
||||
case ((unichar)(0xea)): case ((unichar)(0xeb)): case ((unichar)(0xec)): case ((unichar)(0xed)):
|
||||
case ((unichar)(0xee)): case ((unichar)(0xef)): case ((unichar)(0xf0)): case ((unichar)(0xf1)):
|
||||
case ((unichar)(0xf2)): case ((unichar)(0xf3)): case ((unichar)(0xf4)): case ((unichar)(0xf5)):
|
||||
case ((unichar)(0xf6)): case ((unichar)(0xf7)): case ((unichar)(0xf8)): case ((unichar)(0xf9)):
|
||||
case ((unichar)(0xfa)): case ((unichar)(0xfb)): case ((unichar)(0xfc)): case ((unichar)(0xfd)):
|
||||
case ((unichar)(0xfe)): case ((unichar)(0xff)):
|
||||
else if ((([self LA:1] >= ((unichar)(0x3)) && [self LA:1] <= ((unichar)(0xff)))))
|
||||
{
|
||||
[self matchNotCharacter:ANTLR_EOF_CHAR];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
else
|
||||
{
|
||||
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
|
||||
}
|
||||
}
|
||||
|
||||
if ( _createToken && _token==0 )
|
||||
{
|
||||
_token = [self makeToken:_ttype];
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "GSWHTMLParser.h"
|
||||
#include "GSWHTMLTokenTypes.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
GSWHTML // tokenVocabulary name
|
||||
// $ANTLR 2.7.1: html.g -> GSWHTMLTokenTypes.txt$
|
||||
GSWHTML // output token vocab name
|
||||
WS=4
|
||||
TEXT=5
|
||||
OPENTAG=6
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
|||
#include "gsantlr/ANTLRCharBuffer.h"
|
||||
#include "gsantlr/ANTLRBitSet.h"
|
||||
#include "gsantlr/ANTLRCharScanner.h"
|
||||
|
||||
@interface GSWPageDefLexer : ANTLRCharScanner
|
||||
{
|
||||
};
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "gsantlr/ANTLRException.h"
|
||||
#include "GSWPageDefLexer.h"
|
||||
|
@ -49,12 +50,12 @@
|
|||
|
||||
-(ANTLRDefToken) nextToken
|
||||
{
|
||||
ANTLRDefToken _rettoken=nil;
|
||||
ANTLRDefToken theRetToken=nil;
|
||||
BOOL end=NO;
|
||||
//LOGObjectFnStart();
|
||||
for (;!end;)
|
||||
{
|
||||
ANTLRDefToken _rettoken;
|
||||
ANTLRDefToken theRetToken;
|
||||
ANTLRTokenType _ttype = ANTLRToken_INVALID_TYPE;
|
||||
[self resetText];
|
||||
NS_DURING // for error handling
|
||||
|
@ -64,55 +65,55 @@
|
|||
case ((unichar)('"')): case ((unichar)('\'')):
|
||||
{
|
||||
[self mSTRINGWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('{')):
|
||||
{
|
||||
[self mLCURLYWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('}')):
|
||||
{
|
||||
[self mRCURLYWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)(';')):
|
||||
{
|
||||
[self mSEMIWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('^')):
|
||||
{
|
||||
[self mCIRCWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('~')):
|
||||
{
|
||||
[self mTILDEWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)(':')):
|
||||
{
|
||||
[self mCOLUMNWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('=')):
|
||||
{
|
||||
[self mASSIGNWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('\t')): case ((unichar)('\n')): case ((unichar)('\r')): case ((unichar)(' ')):
|
||||
{
|
||||
[self mWSWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
|
||||
|
@ -120,54 +121,54 @@
|
|||
case ((unichar)('8')): case ((unichar)('9')):
|
||||
{
|
||||
[self mINTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (([self LA:1]==((unichar)('Y'))) && ([self LA:2]==((unichar)('E'))) && ([self LA:3]==((unichar)('S'))))
|
||||
{
|
||||
[self mYESWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('/'))) && ([self LA:2]==((unichar)('/'))))
|
||||
{
|
||||
[self mSL_COMMENTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('/'))) && ([self LA:2]==((unichar)('*'))))
|
||||
{
|
||||
[self mML_COMMENTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('#'))) && ([self LA:2]==((unichar)('i'))))
|
||||
{
|
||||
[self mINCLUDEWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('.'))) && ([GSWPageDefLexer___tokenSet_0 isMember:[self LA:2]]))
|
||||
{
|
||||
[self mPIDENTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('N'))) && ([self LA:2]==((unichar)('O'))))
|
||||
{
|
||||
[self mNOWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('#'))) && ([GSWPageDefLexer___tokenSet_1 isMember:[self LA:2]]))
|
||||
{
|
||||
[self mHEXNUMWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([GSWPageDefLexer___tokenSet_2 isMember:[self LA:1]]))
|
||||
{
|
||||
[self mIDENTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('.'))))
|
||||
{
|
||||
[self mPOINTWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
theRetToken=_returnToken;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "GSWPageDefParser.h"
|
||||
#include "GSWPageDefTokenTypes.h"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
GSWPageDef // tokenVocabulary name
|
||||
// $ANTLR 2.7.1: PageDef.g -> GSWPageDefTokenTypes.txt$
|
||||
GSWPageDef // output token vocab name
|
||||
INCLUDE=4
|
||||
WS=5
|
||||
STRING=6
|
||||
|
|
|
@ -10,7 +10,7 @@ options {
|
|||
|
||||
class GSWPageDefParser extends Parser;
|
||||
options {
|
||||
tokenVocabulary=GSWPageDef;
|
||||
exportVocab=GSWPageDef;
|
||||
buildAST=true;
|
||||
k = 4;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ idref:
|
|||
class GSWPageDefLexer extends Lexer;
|
||||
options {
|
||||
k = 4;
|
||||
tokenVocabulary=GSWPageDef;
|
||||
exportVocab=GSWPageDef;
|
||||
charVocabulary = '\3'..'\377';
|
||||
caseSensitive=true;
|
||||
filter=UNDEFINED_TOKEN;
|
||||
|
|
|
@ -56,7 +56,7 @@ options {
|
|||
|
||||
class GSWHTMLParser extends Parser;
|
||||
options {
|
||||
tokenVocabulary=GSWHTML;
|
||||
exportVocab=GSWHTML;
|
||||
buildAST=true;
|
||||
k = 1;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ document
|
|||
class GSWHTMLLexer extends Lexer;
|
||||
options {
|
||||
k = 3;
|
||||
tokenVocabulary=GSWHTML;
|
||||
exportVocab=GSWHTML;
|
||||
charVocabulary = '\3'..'\377';
|
||||
caseSensitive=true;
|
||||
filter=UNDEFINED_TOKEN;
|
||||
|
|
|
@ -10,7 +10,7 @@ options {
|
|||
|
||||
class GSWHTMLAttrParser extends Parser;
|
||||
options {
|
||||
tokenVocabulary=GSWHTMLAttr;
|
||||
exportVocab=GSWHTMLAttr;
|
||||
buildAST=true;
|
||||
k = 2;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ mvalue:
|
|||
class GSWHTMLAttrLexer extends Lexer;
|
||||
options {
|
||||
k = 8;
|
||||
tokenVocabulary=GSWHTMLAttr;
|
||||
exportVocab=GSWHTMLAttr;
|
||||
charVocabulary = '\3'..'\377';
|
||||
caseSensitive=true;
|
||||
filter=UNDEFINED_TOKEN;
|
||||
|
|
Loading…
Reference in a new issue