[fpc-devel](no subject)
Jeff Pohlmeyer
yetanothergeek at yahoo.com
Fri Apr 4 09:40:30 CEST 2003
Patch for /fpc/fcl/passrc/pscanner.pp
so it will recognize '<', '>', and '<>'
- Not sure why these were omitted, maybe it has
something to do with fpdoc's tag generation?
[PATCH]
--- pscanner.old Thu Mar 27 10:32:48 2003
+++ pscanner.new Thu Apr 3 23:48:57 2003
@@ -51,7 +51,9 @@
tkDivision, // '/'
tkColon, // ':'
tkSemicolon, // ';'
+ tkLessThan, // '<'
tkEqual, // '='
+ tkGreaterThan, // '>'
tkAt, // '@'
tkSquaredBraceOpen, // '['
tkSquaredBraceClose,// ']'
@@ -59,6 +61,7 @@
// Two-character tokens
tkDotDot, // '..'
tkAssign, // ':='
+ tkNotEqual, // '<>'
// Reserved words
tkabsolute,
tkand,
@@ -230,13 +233,16 @@
'/',
':',
';',
+ '<',
'=',
+ '>',
'@',
'[',
']',
'^',
'..',
':=',
+ '<>',
// Reserved words
'absolute',
'and',
@@ -726,10 +732,25 @@
Inc(TokenStr);
Result := tkSemicolon;
end;
+ '<':
+ begin
+ Inc(TokenStr);
+ if TokenStr[0] = '>' then
+ begin
+ Inc(TokenStr);
+ Result := tkNotEqual;
+ end else
+ Result := tkLessThan;
+ end;
'=':
begin
Inc(TokenStr);
Result := tkEqual;
+ end;
+ '>':
+ begin
+ Inc(TokenStr);
+ Result := tkGreaterThan;
end;
'@':
begin
[/PATCH]
Hoping to use this unit in a little project I am working on...
Thanks,
- Jeff
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
More information about the fpc-devel
mailing list