estoy tratando de generar un lexer para un lenguaje en el que determinados identificadores podrían tener caracteres españoles (Ñ, á, é, etc.)
Antes de añadir ese requisito la expresión regular era:
[_,a-zA-Z0-9]+
La nueva esta:
[_,a-zA-Z0-9ÑñáéíóúÁÉÍÓÚçÇüÜ]+
Pues bien, he probado varios validadores de regex online e incluso con código y esa expresión funciona,pero no me funciona cuando la pongo en el fichero .l que pasa por lex (por plex en realidad, que el compilador está en pascal)
Este es el fichero .l:
//This is the Lex (TPLex) lex file, the tokenizer
%{
%}
%%
\/CTL BEGIN AddToken(TokenList, T_SECTION_CTL, yytext, MaxLongInt, yylineno, yycolno); END;
\/STX BEGIN AddToken(TokenList, T_SECTION_STX, yytext, MaxLongInt, yylineno, yycolno); END;
\/CON BEGIN AddToken(TokenList, T_SECTION_CON, yytext, MaxLongInt, yylineno, yycolno); END;
\/MTX BEGIN AddToken(TokenList, T_SECTION_MTX, yytext, MaxLongInt, yylineno, yycolno); END;
\/LTX BEGIN AddToken(TokenList, T_SECTION_LTX, yytext, MaxLongInt, yylineno, yycolno); END;
\/OTX BEGIN AddToken(TokenList, T_SECTION_OTX, yytext, MaxLongInt, yylineno, yycolno); END;
\/OBJ BEGIN AddToken(TokenList, T_SECTION_OBJ, yytext, MaxLongInt, yylineno, yycolno); END;
\/VOC BEGIN AddToken(TokenList, T_SECTION_VOC, yytext, MaxLongInt, yylineno, yycolno); END;
\/PRO BEGIN AddToken(TokenList, T_SECTION_PRO, yytext, MaxLongInt, yylineno, yycolno); END;
\/END BEGIN AddToken(TokenList, T_SECTION_END, yytext, MaxLongInt, yylineno, yycolno); END;
#define BEGIN AddToken(TokenList, T_DEFINE, yytext, MaxLongInt, yylineno, yycolno); END;
#ifdef BEGIN AddToken(TokenList, T_IFDEF, yytext, MaxLongInt, yylineno, yycolno); END;
#ifndef BEGIN AddToken(TokenList, T_IFNDEF, yytext, MaxLongInt, yylineno, yycolno); END;
#endif BEGIN AddToken(TokenList, T_ENDIF, yytext, MaxLongInt, yylineno, yycolno); END;
#db BEGIN AddToken(TokenList, T_DB, yytext, MaxLongInt, yylineno, yycolno); END;
#extern BEGIN AddToken(TokenList, T_EXTERN, yytext, MaxLongInt, yylineno, yycolno); END;
#incbin BEGIN AddToken(TokenList, T_INCBIN, yytext, MaxLongInt, yylineno, yycolno); END;
#classic BEGIN AddToken(TokenList, T_CLASSIC, yytext, MaxLongInt, yylineno, yycolno); END;
\".*\" BEGIN AddToken(TokenList, T_STRING, yytext, MaxLongInt, yylineno, yycolno); END;
\'.*\'' BEGIN AddToken(TokenList, T_STRING, yytext, MaxLongInt, yylineno, yycolno); END;
_ BEGIN AddToken(TokenList, T_UNDERSCORE, yytext, MaxLongInt, yylineno, yycolno); END;
\/[0-9]+ BEGIN AddToken(TokenList, T_LIST_ENTRY, yytext, StrToInt(Copy(yytext,2,Length(yytext)-1)), yylineno, yycolno); END;
;.*\n BEGIN END;
-?[0-9]+ BEGIN AddToken(TokenList, T_NUMBER, yytext, StrToInt(yytext), yylineno, yycolno); END;
[_,a-zA-Z0-9ÑñáéíóúÁÉÍÓÚçÇüÜ]+ BEGIN AddToken(TokenList, T_IDENTIFIER, yytext, MaxLongInt, yylineno, yycolno); END;
\@ BEGIN AddToken(TokenList, T_INDIRECT, yytext, MaxLongInt, yylineno, yycolno); END;
[ \t\n] BEGIN END;
. BEGIN yyerror('Unexpected character'); Halt(1); END;
%%
Y este es el fichero lexer.pas que se genera:
(* lexical analyzer template (TP Lex V3.0), V1.0 3-2-91 AG *)
(* global definitions: *)
//This is the Lex (TPLex) lex file, the tokenizer
function yylex : Integer;
procedure yyaction ( yyruleno : Integer );
(* local definitions: *)
begin
(* actions: *)
case yyruleno of
1:
BEGIN AddToken(TokenList, T_SECTION_CTL, yytext, MaxLongInt, yylineno, yycolno); END;
2:
BEGIN AddToken(TokenList, T_SECTION_STX, yytext, MaxLongInt, yylineno, yycolno); END;
3:
BEGIN AddToken(TokenList, T_SECTION_CON, yytext, MaxLongInt, yylineno, yycolno); END;
4:
BEGIN AddToken(TokenList, T_SECTION_MTX, yytext, MaxLongInt, yylineno, yycolno); END;
5:
BEGIN AddToken(TokenList, T_SECTION_LTX, yytext, MaxLongInt, yylineno, yycolno); END;
6:
BEGIN AddToken(TokenList, T_SECTION_OTX, yytext, MaxLongInt, yylineno, yycolno); END;
7:
BEGIN AddToken(TokenList, T_SECTION_OBJ, yytext, MaxLongInt, yylineno, yycolno); END;
8:
BEGIN AddToken(TokenList, T_SECTION_VOC, yytext, MaxLongInt, yylineno, yycolno); END;
9:
BEGIN AddToken(TokenList, T_SECTION_PRO, yytext, MaxLongInt, yylineno, yycolno); END;
10:
BEGIN AddToken(TokenList, T_SECTION_END, yytext, MaxLongInt, yylineno, yycolno); END;
11:
BEGIN AddToken(TokenList, T_DEFINE, yytext, MaxLongInt, yylineno, yycolno); END;
12:
BEGIN AddToken(TokenList, T_IFDEF, yytext, MaxLongInt, yylineno, yycolno); END;
13:
BEGIN AddToken(TokenList, T_IFNDEF, yytext, MaxLongInt, yylineno, yycolno); END;
14:
BEGIN AddToken(TokenList, T_ENDIF, yytext, MaxLongInt, yylineno, yycolno); END;
15:
BEGIN AddToken(TokenList, T_DB, yytext, MaxLongInt, yylineno, yycolno); END;
16:
BEGIN AddToken(TokenList, T_EXTERN, yytext, MaxLongInt, yylineno, yycolno); END;
17:
BEGIN AddToken(TokenList, T_INCBIN, yytext, MaxLongInt, yylineno, yycolno); END;
18:
BEGIN AddToken(TokenList, T_CLASSIC, yytext, MaxLongInt, yylineno, yycolno); END;
19:
BEGIN AddToken(TokenList, T_STRING, yytext, MaxLongInt, yylineno, yycolno); END;
20:
BEGIN AddToken(TokenList, T_STRING, yytext, MaxLongInt, yylineno, yycolno); END;
21:
BEGIN AddToken(TokenList, T_UNDERSCORE, yytext, MaxLongInt, yylineno, yycolno); END;
22:
BEGIN AddToken(TokenList, T_LIST_ENTRY, yytext, StrToInt(Copy(yytext,2,Length(yytext)-1)), yylineno, yycolno); END;
23:
BEGIN END;
24:
BEGIN AddToken(TokenList, T_NUMBER, yytext, StrToInt(yytext), yylineno, yycolno); END;
25:
BEGIN AddToken(TokenList, T_IDENTIFIER, yytext, MaxLongInt, yylineno, yycolno); END;
26:
BEGIN AddToken(TokenList, T_INDIRECT, yytext, MaxLongInt, yylineno, yycolno); END;
27:
BEGIN END;
28:
BEGIN yyerror('Unexpected character'); Halt(1); END;
end;
end(*yyaction*);
(* DFA table: *)
type YYTRec = record
cc : set of Char;
s : Integer;
end;
const
yynmarks = 46;
yynmatches = 46;
yyntrans = 121;
yynstates = 92;
yyk : array [1..yynmarks] of Integer = (
{ 0: }
{ 1: }
{ 2: }
28,
{ 3: }
28,
{ 4: }
28,
{ 5: }
28,
{ 6: }
21,
25,
28,
{ 7: }
28,
{ 8: }
28,
{ 9: }
24,
25,
28,
{ 10: }
25,
28,
{ 11: }
26,
28,
{ 12: }
27,
{ 13: }
27,
28,
{ 14: }
28,
{ 15: }
{ 16: }
{ 17: }
{ 18: }
{ 19: }
{ 20: }
{ 21: }
{ 22: }
{ 23: }
22,
{ 24: }
{ 25: }
{ 26: }
{ 27: }
{ 28: }
{ 29: }
19,
{ 30: }
{ 31: }
{ 32: }
25,
{ 33: }
{ 34: }
23,
{ 35: }
24,
{ 36: }
24,
25,
{ 37: }
{ 38: }
{ 39: }
{ 40: }
{ 41: }
{ 42: }
{ 43: }
{ 44: }
{ 45: }
{ 46: }
{ 47: }
{ 48: }
15,
{ 49: }
{ 50: }
{ 51: }
{ 52: }
{ 53: }
{ 54: }
20,
{ 55: }
1,
{ 56: }
3,
{ 57: }
2,
{ 58: }
4,
{ 59: }
5,
{ 60: }
6,
{ 61: }
7,
{ 62: }
8,
{ 63: }
9,
{ 64: }
10,
{ 65: }
{ 66: }
{ 67: }
{ 68: }
{ 69: }
{ 70: }
{ 71: }
{ 72: }
{ 73: }
{ 74: }
{ 75: }
{ 76: }
{ 77: }
{ 78: }
{ 79: }
{ 80: }
12,
{ 81: }
{ 82: }
{ 83: }
14,
{ 84: }
{ 85: }
{ 86: }
11,
{ 87: }
13,
{ 88: }
17,
{ 89: }
16,
{ 90: }
{ 91: }
18
);
yym : array [1..yynmatches] of Integer = (
{ 0: }
{ 1: }
{ 2: }
28,
{ 3: }
28,
{ 4: }
28,
{ 5: }
28,
{ 6: }
21,
25,
28,
{ 7: }
28,
{ 8: }
28,
{ 9: }
24,
25,
28,
{ 10: }
25,
28,
{ 11: }
26,
28,
{ 12: }
27,
{ 13: }
27,
28,
{ 14: }
28,
{ 15: }
{ 16: }
{ 17: }
{ 18: }
{ 19: }
{ 20: }
{ 21: }
{ 22: }
{ 23: }
22,
{ 24: }
{ 25: }
{ 26: }
{ 27: }
{ 28: }
{ 29: }
19,
{ 30: }
{ 31: }
{ 32: }
25,
{ 33: }
{ 34: }
23,
{ 35: }
24,
{ 36: }
24,
25,
{ 37: }
{ 38: }
{ 39: }
{ 40: }
{ 41: }
{ 42: }
{ 43: }
{ 44: }
{ 45: }
{ 46: }
{ 47: }
{ 48: }
15,
{ 49: }
{ 50: }
{ 51: }
{ 52: }
{ 53: }
{ 54: }
20,
{ 55: }
1,
{ 56: }
3,
{ 57: }
2,
{ 58: }
4,
{ 59: }
5,
{ 60: }
6,
{ 61: }
7,
{ 62: }
8,
{ 63: }
9,
{ 64: }
10,
{ 65: }
{ 66: }
{ 67: }
{ 68: }
{ 69: }
{ 70: }
{ 71: }
{ 72: }
{ 73: }
{ 74: }
{ 75: }
{ 76: }
{ 77: }
{ 78: }
{ 79: }
{ 80: }
12,
{ 81: }
{ 82: }
{ 83: }
14,
{ 84: }
{ 85: }
{ 86: }
11,
{ 87: }
13,
{ 88: }
17,
{ 89: }
16,
{ 90: }
{ 91: }
18
);
yyt : array [1..yyntrans] of YYTrec = (
{ 0: }
( cc: [ #1..#8,#11..#31,'!','$'..'&','('..'+','.',
':','<'..'?','['..'^','`','{'..#128,#130..#134,
#136,#138..#140,#142..#144,#146,#148..#153,
#155,#157..#160,#162..#166,#168,#170..#172,
#174..#176,#178,#180..#185,#187,#189..#194,
#196..#255 ]; s: 14),
( cc: [ #9,' ' ]; s: 13),
( cc: [ #10 ]; s: 12),
( cc: [ '"' ]; s: 4),
( cc: [ '#' ]; s: 3),
( cc: [ '''' ]; s: 5),
( cc: [ ',','A'..'Z','a'..'z',#129,#135,#137,#141,
#145,#147,#154,#156,#161,#167,#169,#173,#177,
#179,#186,#188,#195 ]; s: 10),
( cc: [ '-' ]; s: 8),
( cc: [ '/' ]; s: 2),
( cc: [ '0'..'9' ]; s: 9),
( cc: [ ';' ]; s: 7),
( cc: [ '@' ]; s: 11),
( cc: [ '_' ]; s: 6),
{ 1: }
( cc: [ #1..#8,#11..#31,'!','$'..'&','('..'+','.',
':','<'..'?','['..'^','`','{'..#128,#130..#134,
#136,#138..#140,#142..#144,#146,#148..#153,
#155,#157..#160,#162..#166,#168,#170..#172,
#174..#176,#178,#180..#185,#187,#189..#194,
#196..#255 ]; s: 14),
( cc: [ #9,' ' ]; s: 13),
( cc: [ #10 ]; s: 12),
( cc: [ '"' ]; s: 4),
( cc: [ '#' ]; s: 3),
( cc: [ '''' ]; s: 5),
( cc: [ ',','A'..'Z','a'..'z',#129,#135,#137,#141,
#145,#147,#154,#156,#161,#167,#169,#173,#177,
#179,#186,#188,#195 ]; s: 10),
( cc: [ '-' ]; s: 8),
( cc: [ '/' ]; s: 2),
( cc: [ '0'..'9' ]; s: 9),
( cc: [ ';' ]; s: 7),
( cc: [ '@' ]; s: 11),
( cc: [ '_' ]; s: 6),
{ 2: }
( cc: [ '0'..'9' ]; s: 23),
( cc: [ 'C' ]; s: 15),
( cc: [ 'E' ]; s: 22),
( cc: [ 'L' ]; s: 18),
( cc: [ 'M' ]; s: 17),
( cc: [ 'O' ]; s: 19),
( cc: [ 'P' ]; s: 21),
( cc: [ 'S' ]; s: 16),
( cc: [ 'V' ]; s: 20),
{ 3: }
( cc: [ 'c' ]; s: 27),
( cc: [ 'd' ]; s: 24),
( cc: [ 'e' ]; s: 26),
( cc: [ 'i' ]; s: 25),
{ 4: }
( cc: [ #1..#9,#11..'!','#'..#255 ]; s: 28),
( cc: [ '"' ]; s: 29),
{ 5: }
( cc: [ #1..#9,#11..'&','('..#255 ]; s: 30),
( cc: [ '''' ]; s: 31),
{ 6: }
( cc: [ ',','0'..'9','A'..'Z','_','a'..'z',#129,#135,
#137,#141,#145,#147,#154,#156,#161,#167,#169,
#173,#177,#179,#186,#188,#195 ]; s: 32),
{ 7: }
( cc: [ #1..#9,#11..#255 ]; s: 33),
( cc: [ #10 ]; s: 34),
{ 8: }
( cc: [ '0'..'9' ]; s: 35),
{ 9: }
( cc: [ ',','A'..'Z','_','a'..'z',#129,#135,#137,
#141,#145,#147,#154,#156,#161,#167,#169,#173,
#177,#179,#186,#188,#195 ]; s: 32),
( cc: [ '0'..'9' ]; s: 36),
{ 10: }
( cc: [ ',','0'..'9','A'..'Z','_','a'..'z',#129,#135,
#137,#141,#145,#147,#154,#156,#161,#167,#169,
#173,#177,#179,#186,#188,#195 ]; s: 32),
{ 11: }
{ 12: }
{ 13: }
{ 14: }
{ 15: }
( cc: [ 'O' ]; s: 38),
( cc: [ 'T' ]; s: 37),
{ 16: }
( cc: [ 'T' ]; s: 39),
{ 17: }
( cc: [ 'T' ]; s: 40),
{ 18: }
( cc: [ 'T' ]; s: 41),
{ 19: }
( cc: [ 'B' ]; s: 43),
( cc: [ 'T' ]; s: 42),
{ 20: }
( cc: [ 'O' ]; s: 44),
{ 21: }
( cc: [ 'R' ]; s: 45),
{ 22: }
( cc: [ 'N' ]; s: 46),
{ 23: }
( cc: [ '0'..'9' ]; s: 23),
{ 24: }
( cc: [ 'b' ]; s: 48),
( cc: [ 'e' ]; s: 47),
{ 25: }
( cc: [ 'f' ]; s: 49),
( cc: [ 'n' ]; s: 50),
{ 26: }
( cc: [ 'n' ]; s: 51),
( cc: [ 'x' ]; s: 52),
{ 27: }
( cc: [ 'l' ]; s: 53),
{ 28: }
( cc: [ #1..#9,#11..'!','#'..#255 ]; s: 28),
( cc: [ '"' ]; s: 29),
{ 29: }
( cc: [ #1..#9,#11..'!','#'..#255 ]; s: 28),
( cc: [ '"' ]; s: 29),
{ 30: }
( cc: [ #1..#9,#11..'&','('..#255 ]; s: 30),
( cc: [ '''' ]; s: 31),
{ 31: }
( cc: [ #1..#9,#11..'&','('..#255 ]; s: 30),
( cc: [ '''' ]; s: 54),
{ 32: }
( cc: [ ',','0'..'9','A'..'Z','_','a'..'z',#129,#135,
#137,#141,#145,#147,#154,#156,#161,#167,#169,
#173,#177,#179,#186,#188,#195 ]; s: 32),
{ 33: }
( cc: [ #1..#9,#11..#255 ]; s: 33),
( cc: [ #10 ]; s: 34),
{ 34: }
{ 35: }
( cc: [ '0'..'9' ]; s: 35),
{ 36: }
( cc: [ ',','A'..'Z','_','a'..'z',#129,#135,#137,
#141,#145,#147,#154,#156,#161,#167,#169,#173,
#177,#179,#186,#188,#195 ]; s: 32),
( cc: [ '0'..'9' ]; s: 36),
{ 37: }
( cc: [ 'L' ]; s: 55),
{ 38: }
( cc: [ 'N' ]; s: 56),
{ 39: }
( cc: [ 'X' ]; s: 57),
{ 40: }
( cc: [ 'X' ]; s: 58),
{ 41: }
( cc: [ 'X' ]; s: 59),
{ 42: }
( cc: [ 'X' ]; s: 60),
{ 43: }
( cc: [ 'J' ]; s: 61),
{ 44: }
( cc: [ 'C' ]; s: 62),
{ 45: }
( cc: [ 'O' ]; s: 63),
{ 46: }
( cc: [ 'D' ]; s: 64),
{ 47: }
( cc: [ 'f' ]; s: 65),
{ 48: }
{ 49: }
( cc: [ 'd' ]; s: 66),
( cc: [ 'n' ]; s: 67),
{ 50: }
( cc: [ 'c' ]; s: 68),
{ 51: }
( cc: [ 'd' ]; s: 69),
{ 52: }
( cc: [ 't' ]; s: 70),
{ 53: }
( cc: [ 'a' ]; s: 71),
{ 54: }
( cc: [ #1..#9,#11..'&','('..#255 ]; s: 30),
( cc: [ '''' ]; s: 54),
{ 55: }
{ 56: }
{ 57: }
{ 58: }
{ 59: }
{ 60: }
{ 61: }
{ 62: }
{ 63: }
{ 64: }
{ 65: }
( cc: [ 'i' ]; s: 72),
{ 66: }
( cc: [ 'e' ]; s: 73),
{ 67: }
( cc: [ 'd' ]; s: 74),
{ 68: }
( cc: [ 'b' ]; s: 75),
{ 69: }
( cc: [ 'i' ]; s: 76),
{ 70: }
( cc: [ 'e' ]; s: 77),
{ 71: }
( cc: [ 's' ]; s: 78),
{ 72: }
( cc: [ 'n' ]; s: 79),
{ 73: }
( cc: [ 'f' ]; s: 80),
{ 74: }
( cc: [ 'e' ]; s: 81),
{ 75: }
( cc: [ 'i' ]; s: 82),
{ 76: }
( cc: [ 'f' ]; s: 83),
{ 77: }
( cc: [ 'r' ]; s: 84),
{ 78: }
( cc: [ 's' ]; s: 85),
{ 79: }
( cc: [ 'e' ]; s: 86),
{ 80: }
{ 81: }
( cc: [ 'f' ]; s: 87),
{ 82: }
( cc: [ 'n' ]; s: 88),
{ 83: }
{ 84: }
( cc: [ 'n' ]; s: 89),
{ 85: }
( cc: [ 'i' ]; s: 90),
{ 86: }
{ 87: }
{ 88: }
{ 89: }
{ 90: }
( cc: [ 'c' ]; s: 91)
{ 91: }
);
yykl : array [0..yynstates-1] of Integer = (
{ 0: } 1,
{ 1: } 1,
{ 2: } 1,
{ 3: } 2,
{ 4: } 3,
{ 5: } 4,
{ 6: } 5,
{ 7: } 8,
{ 8: } 9,
{ 9: } 10,
{ 10: } 13,
{ 11: } 15,
{ 12: } 17,
{ 13: } 18,
{ 14: } 20,
{ 15: } 21,
{ 16: } 21,
{ 17: } 21,
{ 18: } 21,
{ 19: } 21,
{ 20: } 21,
{ 21: } 21,
{ 22: } 21,
{ 23: } 21,
{ 24: } 22,
{ 25: } 22,
{ 26: } 22,
{ 27: } 22,
{ 28: } 22,
{ 29: } 22,
{ 30: } 23,
{ 31: } 23,
{ 32: } 23,
{ 33: } 24,
{ 34: } 24,
{ 35: } 25,
{ 36: } 26,
{ 37: } 28,
{ 38: } 28,
{ 39: } 28,
{ 40: } 28,
{ 41: } 28,
{ 42: } 28,
{ 43: } 28,
{ 44: } 28,
{ 45: } 28,
{ 46: } 28,
{ 47: } 28,
{ 48: } 28,
{ 49: } 29,
{ 50: } 29,
{ 51: } 29,
{ 52: } 29,
{ 53: } 29,
{ 54: } 29,
{ 55: } 30,
{ 56: } 31,
{ 57: } 32,
{ 58: } 33,
{ 59: } 34,
{ 60: } 35,
{ 61: } 36,
{ 62: } 37,
{ 63: } 38,
{ 64: } 39,
{ 65: } 40,
{ 66: } 40,
{ 67: } 40,
{ 68: } 40,
{ 69: } 40,
{ 70: } 40,
{ 71: } 40,
{ 72: } 40,
{ 73: } 40,
{ 74: } 40,
{ 75: } 40,
{ 76: } 40,
{ 77: } 40,
{ 78: } 40,
{ 79: } 40,
{ 80: } 40,
{ 81: } 41,
{ 82: } 41,
{ 83: } 41,
{ 84: } 42,
{ 85: } 42,
{ 86: } 42,
{ 87: } 43,
{ 88: } 44,
{ 89: } 45,
{ 90: } 46,
{ 91: } 46
);
yykh : array [0..yynstates-1] of Integer = (
{ 0: } 0,
{ 1: } 0,
{ 2: } 1,
{ 3: } 2,
{ 4: } 3,
{ 5: } 4,
{ 6: } 7,
{ 7: } 8,
{ 8: } 9,
{ 9: } 12,
{ 10: } 14,
{ 11: } 16,
{ 12: } 17,
{ 13: } 19,
{ 14: } 20,
{ 15: } 20,
{ 16: } 20,
{ 17: } 20,
{ 18: } 20,
{ 19: } 20,
{ 20: } 20,
{ 21: } 20,
{ 22: } 20,
{ 23: } 21,
{ 24: } 21,
{ 25: } 21,
{ 26: } 21,
{ 27: } 21,
{ 28: } 21,
{ 29: } 22,
{ 30: } 22,
{ 31: } 22,
{ 32: } 23,
{ 33: } 23,
{ 34: } 24,
{ 35: } 25,
{ 36: } 27,
{ 37: } 27,
{ 38: } 27,
{ 39: } 27,
{ 40: } 27,
{ 41: } 27,
{ 42: } 27,
{ 43: } 27,
{ 44: } 27,
{ 45: } 27,
{ 46: } 27,
{ 47: } 27,
{ 48: } 28,
{ 49: } 28,
{ 50: } 28,
{ 51: } 28,
{ 52: } 28,
{ 53: } 28,
{ 54: } 29,
{ 55: } 30,
{ 56: } 31,
{ 57: } 32,
{ 58: } 33,
{ 59: } 34,
{ 60: } 35,
{ 61: } 36,
{ 62: } 37,
{ 63: } 38,
{ 64: } 39,
{ 65: } 39,
{ 66: } 39,
{ 67: } 39,
{ 68: } 39,
{ 69: } 39,
{ 70: } 39,
{ 71: } 39,
{ 72: } 39,
{ 73: } 39,
{ 74: } 39,
{ 75: } 39,
{ 76: } 39,
{ 77: } 39,
{ 78: } 39,
{ 79: } 39,
{ 80: } 40,
{ 81: } 40,
{ 82: } 40,
{ 83: } 41,
{ 84: } 41,
{ 85: } 41,
{ 86: } 42,
{ 87: } 43,
{ 88: } 44,
{ 89: } 45,
{ 90: } 45,
{ 91: } 46
);
yyml : array [0..yynstates-1] of Integer = (
{ 0: } 1,
{ 1: } 1,
{ 2: } 1,
{ 3: } 2,
{ 4: } 3,
{ 5: } 4,
{ 6: } 5,
{ 7: } 8,
{ 8: } 9,
{ 9: } 10,
{ 10: } 13,
{ 11: } 15,
{ 12: } 17,
{ 13: } 18,
{ 14: } 20,
{ 15: } 21,
{ 16: } 21,
{ 17: } 21,
{ 18: } 21,
{ 19: } 21,
{ 20: } 21,
{ 21: } 21,
{ 22: } 21,
{ 23: } 21,
{ 24: } 22,
{ 25: } 22,
{ 26: } 22,
{ 27: } 22,
{ 28: } 22,
{ 29: } 22,
{ 30: } 23,
{ 31: } 23,
{ 32: } 23,
{ 33: } 24,
{ 34: } 24,
{ 35: } 25,
{ 36: } 26,
{ 37: } 28,
{ 38: } 28,
{ 39: } 28,
{ 40: } 28,
{ 41: } 28,
{ 42: } 28,
{ 43: } 28,
{ 44: } 28,
{ 45: } 28,
{ 46: } 28,
{ 47: } 28,
{ 48: } 28,
{ 49: } 29,
{ 50: } 29,
{ 51: } 29,
{ 52: } 29,
{ 53: } 29,
{ 54: } 29,
{ 55: } 30,
{ 56: } 31,
{ 57: } 32,
{ 58: } 33,
{ 59: } 34,
{ 60: } 35,
{ 61: } 36,
{ 62: } 37,
{ 63: } 38,
{ 64: } 39,
{ 65: } 40,
{ 66: } 40,
{ 67: } 40,
{ 68: } 40,
{ 69: } 40,
{ 70: } 40,
{ 71: } 40,
{ 72: } 40,
{ 73: } 40,
{ 74: } 40,
{ 75: } 40,
{ 76: } 40,
{ 77: } 40,
{ 78: } 40,
{ 79: } 40,
{ 80: } 40,
{ 81: } 41,
{ 82: } 41,
{ 83: } 41,
{ 84: } 42,
{ 85: } 42,
{ 86: } 42,
{ 87: } 43,
{ 88: } 44,
{ 89: } 45,
{ 90: } 46,
{ 91: } 46
);
yymh : array [0..yynstates-1] of Integer = (
{ 0: } 0,
{ 1: } 0,
{ 2: } 1,
{ 3: } 2,
{ 4: } 3,
{ 5: } 4,
{ 6: } 7,
{ 7: } 8,
{ 8: } 9,
{ 9: } 12,
{ 10: } 14,
{ 11: } 16,
{ 12: } 17,
{ 13: } 19,
{ 14: } 20,
{ 15: } 20,
{ 16: } 20,
{ 17: } 20,
{ 18: } 20,
{ 19: } 20,
{ 20: } 20,
{ 21: } 20,
{ 22: } 20,
{ 23: } 21,
{ 24: } 21,
{ 25: } 21,
{ 26: } 21,
{ 27: } 21,
{ 28: } 21,
{ 29: } 22,
{ 30: } 22,
{ 31: } 22,
{ 32: } 23,
{ 33: } 23,
{ 34: } 24,
{ 35: } 25,
{ 36: } 27,
{ 37: } 27,
{ 38: } 27,
{ 39: } 27,
{ 40: } 27,
{ 41: } 27,
{ 42: } 27,
{ 43: } 27,
{ 44: } 27,
{ 45: } 27,
{ 46: } 27,
{ 47: } 27,
{ 48: } 28,
{ 49: } 28,
{ 50: } 28,
{ 51: } 28,
{ 52: } 28,
{ 53: } 28,
{ 54: } 29,
{ 55: } 30,
{ 56: } 31,
{ 57: } 32,
{ 58: } 33,
{ 59: } 34,
{ 60: } 35,
{ 61: } 36,
{ 62: } 37,
{ 63: } 38,
{ 64: } 39,
{ 65: } 39,
{ 66: } 39,
{ 67: } 39,
{ 68: } 39,
{ 69: } 39,
{ 70: } 39,
{ 71: } 39,
{ 72: } 39,
{ 73: } 39,
{ 74: } 39,
{ 75: } 39,
{ 76: } 39,
{ 77: } 39,
{ 78: } 39,
{ 79: } 39,
{ 80: } 40,
{ 81: } 40,
{ 82: } 40,
{ 83: } 41,
{ 84: } 41,
{ 85: } 41,
{ 86: } 42,
{ 87: } 43,
{ 88: } 44,
{ 89: } 45,
{ 90: } 45,
{ 91: } 46
);
yytl : array [0..yynstates-1] of Integer = (
{ 0: } 1,
{ 1: } 14,
{ 2: } 27,
{ 3: } 36,
{ 4: } 40,
{ 5: } 42,
{ 6: } 44,
{ 7: } 45,
{ 8: } 47,
{ 9: } 48,
{ 10: } 50,
{ 11: } 51,
{ 12: } 51,
{ 13: } 51,
{ 14: } 51,
{ 15: } 51,
{ 16: } 53,
{ 17: } 54,
{ 18: } 55,
{ 19: } 56,
{ 20: } 58,
{ 21: } 59,
{ 22: } 60,
{ 23: } 61,
{ 24: } 62,
{ 25: } 64,
{ 26: } 66,
{ 27: } 68,
{ 28: } 69,
{ 29: } 71,
{ 30: } 73,
{ 31: } 75,
{ 32: } 77,
{ 33: } 78,
{ 34: } 80,
{ 35: } 80,
{ 36: } 81,
{ 37: } 83,
{ 38: } 84,
{ 39: } 85,
{ 40: } 86,
{ 41: } 87,
{ 42: } 88,
{ 43: } 89,
{ 44: } 90,
{ 45: } 91,
{ 46: } 92,
{ 47: } 93,
{ 48: } 94,
{ 49: } 94,
{ 50: } 96,
{ 51: } 97,
{ 52: } 98,
{ 53: } 99,
{ 54: } 100,
{ 55: } 102,
{ 56: } 102,
{ 57: } 102,
{ 58: } 102,
{ 59: } 102,
{ 60: } 102,
{ 61: } 102,
{ 62: } 102,
{ 63: } 102,
{ 64: } 102,
{ 65: } 102,
{ 66: } 103,
{ 67: } 104,
{ 68: } 105,
{ 69: } 106,
{ 70: } 107,
{ 71: } 108,
{ 72: } 109,
{ 73: } 110,
{ 74: } 111,
{ 75: } 112,
{ 76: } 113,
{ 77: } 114,
{ 78: } 115,
{ 79: } 116,
{ 80: } 117,
{ 81: } 117,
{ 82: } 118,
{ 83: } 119,
{ 84: } 119,
{ 85: } 120,
{ 86: } 121,
{ 87: } 121,
{ 88: } 121,
{ 89: } 121,
{ 90: } 121,
{ 91: } 122
);
yyth : array [0..yynstates-1] of Integer = (
{ 0: } 13,
{ 1: } 26,
{ 2: } 35,
{ 3: } 39,
{ 4: } 41,
{ 5: } 43,
{ 6: } 44,
{ 7: } 46,
{ 8: } 47,
{ 9: } 49,
{ 10: } 50,
{ 11: } 50,
{ 12: } 50,
{ 13: } 50,
{ 14: } 50,
{ 15: } 52,
{ 16: } 53,
{ 17: } 54,
{ 18: } 55,
{ 19: } 57,
{ 20: } 58,
{ 21: } 59,
{ 22: } 60,
{ 23: } 61,
{ 24: } 63,
{ 25: } 65,
{ 26: } 67,
{ 27: } 68,
{ 28: } 70,
{ 29: } 72,
{ 30: } 74,
{ 31: } 76,
{ 32: } 77,
{ 33: } 79,
{ 34: } 79,
{ 35: } 80,
{ 36: } 82,
{ 37: } 83,
{ 38: } 84,
{ 39: } 85,
{ 40: } 86,
{ 41: } 87,
{ 42: } 88,
{ 43: } 89,
{ 44: } 90,
{ 45: } 91,
{ 46: } 92,
{ 47: } 93,
{ 48: } 93,
{ 49: } 95,
{ 50: } 96,
{ 51: } 97,
{ 52: } 98,
{ 53: } 99,
{ 54: } 101,
{ 55: } 101,
{ 56: } 101,
{ 57: } 101,
{ 58: } 101,
{ 59: } 101,
{ 60: } 101,
{ 61: } 101,
{ 62: } 101,
{ 63: } 101,
{ 64: } 101,
{ 65: } 102,
{ 66: } 103,
{ 67: } 104,
{ 68: } 105,
{ 69: } 106,
{ 70: } 107,
{ 71: } 108,
{ 72: } 109,
{ 73: } 110,
{ 74: } 111,
{ 75: } 112,
{ 76: } 113,
{ 77: } 114,
{ 78: } 115,
{ 79: } 116,
{ 80: } 116,
{ 81: } 117,
{ 82: } 118,
{ 83: } 118,
{ 84: } 119,
{ 85: } 120,
{ 86: } 120,
{ 87: } 120,
{ 88: } 120,
{ 89: } 120,
{ 90: } 121,
{ 91: } 121
);
var yyn : Integer;
label start, scan, action;
begin
start:
(* initialize: *)
yynew;
scan:
(* mark positions and matches: *)
for yyn := yykl[yystate] to yykh[yystate] do yymark(yyk[yyn]);
for yyn := yymh[yystate] downto yyml[yystate] do yymatch(yym[yyn]);
if yytl[yystate]>yyth[yystate] then goto action; (* dead state *)
(* get next character: *)
yyscan;
(* determine action: *)
yyn := yytl[yystate];
while (yyn<=yyth[yystate]) and not (yyactchar in yyt[yyn].cc) do inc(yyn);
if yyn>yyth[yystate] then goto action;
(* no transition on yyactchar in this state *)
(* switch to new state: *)
yystate := yyt[yyn].s;
goto scan;
action:
(* execute action: *)
if yyfind(yyrule) then
begin
yyaction(yyrule);
if yyreject then goto action;
end
else if not yydefault and yywrap() then
begin
yyclear;
return(0);
end;
if not yydone then goto start;
yylex := yyretval;
end(*yylex*);
Alguna idea de qué puedo estar haciendo mal?