mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 10:09:38 +02:00
* properties set
git-svn-id: trunk@12791 -
This commit is contained in:
parent
cb9a0f2196
commit
234a182bdc
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -10053,5 +10053,5 @@ utils/tply/yaccmsgs.pas svneol=native#text/plain
|
|||||||
utils/tply/yaccpars.pas svneol=native#text/plain
|
utils/tply/yaccpars.pas svneol=native#text/plain
|
||||||
utils/tply/yaccsem.pas svneol=native#text/plain
|
utils/tply/yaccsem.pas svneol=native#text/plain
|
||||||
utils/tply/yacctabl.pas svneol=native#text/plain
|
utils/tply/yacctabl.pas svneol=native#text/plain
|
||||||
utils/tply/yylex.cod -text
|
utils/tply/yylex.cod svneol=native#text/plain
|
||||||
utils/tply/yyparse.cod -text
|
utils/tply/yyparse.cod svneol=native#text/plain
|
||||||
|
@ -1,80 +1,80 @@
|
|||||||
|
|
||||||
(* lexical analyzer template (TP Lex V3.0), V1.0 3-2-91 AG *)
|
(* lexical analyzer template (TP Lex V3.0), V1.0 3-2-91 AG *)
|
||||||
|
|
||||||
(* global definitions: *)
|
(* global definitions: *)
|
||||||
%%
|
%%
|
||||||
|
|
||||||
function yylex : Integer;
|
function yylex : Integer;
|
||||||
|
|
||||||
procedure yyaction ( yyruleno : Integer );
|
procedure yyaction ( yyruleno : Integer );
|
||||||
(* local definitions: *)
|
(* local definitions: *)
|
||||||
%%
|
%%
|
||||||
begin
|
begin
|
||||||
(* actions: *)
|
(* actions: *)
|
||||||
case yyruleno of
|
case yyruleno of
|
||||||
%%
|
%%
|
||||||
end;
|
end;
|
||||||
end(*yyaction*);
|
end(*yyaction*);
|
||||||
|
|
||||||
(* DFA table: *)
|
(* DFA table: *)
|
||||||
%%
|
%%
|
||||||
|
|
||||||
var yyn : Integer;
|
var yyn : Integer;
|
||||||
|
|
||||||
label start, scan, action;
|
label start, scan, action;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
start:
|
start:
|
||||||
|
|
||||||
(* initialize: *)
|
(* initialize: *)
|
||||||
|
|
||||||
yynew;
|
yynew;
|
||||||
|
|
||||||
scan:
|
scan:
|
||||||
|
|
||||||
(* mark positions and matches: *)
|
(* mark positions and matches: *)
|
||||||
|
|
||||||
for yyn := yykl[yystate] to yykh[yystate] do yymark(yyk[yyn]);
|
for yyn := yykl[yystate] to yykh[yystate] do yymark(yyk[yyn]);
|
||||||
for yyn := yymh[yystate] downto yyml[yystate] do yymatch(yym[yyn]);
|
for yyn := yymh[yystate] downto yyml[yystate] do yymatch(yym[yyn]);
|
||||||
|
|
||||||
if yytl[yystate]>yyth[yystate] then goto action; (* dead state *)
|
if yytl[yystate]>yyth[yystate] then goto action; (* dead state *)
|
||||||
|
|
||||||
(* get next character: *)
|
(* get next character: *)
|
||||||
|
|
||||||
yyscan;
|
yyscan;
|
||||||
|
|
||||||
(* determine action: *)
|
(* determine action: *)
|
||||||
|
|
||||||
yyn := yytl[yystate];
|
yyn := yytl[yystate];
|
||||||
while (yyn<=yyth[yystate]) and not (yyactchar in yyt[yyn].cc) do inc(yyn);
|
while (yyn<=yyth[yystate]) and not (yyactchar in yyt[yyn].cc) do inc(yyn);
|
||||||
if yyn>yyth[yystate] then goto action;
|
if yyn>yyth[yystate] then goto action;
|
||||||
(* no transition on yyactchar in this state *)
|
(* no transition on yyactchar in this state *)
|
||||||
|
|
||||||
(* switch to new state: *)
|
(* switch to new state: *)
|
||||||
|
|
||||||
yystate := yyt[yyn].s;
|
yystate := yyt[yyn].s;
|
||||||
|
|
||||||
goto scan;
|
goto scan;
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
|
||||||
(* execute action: *)
|
(* execute action: *)
|
||||||
|
|
||||||
if yyfind(yyrule) then
|
if yyfind(yyrule) then
|
||||||
begin
|
begin
|
||||||
yyaction(yyrule);
|
yyaction(yyrule);
|
||||||
if yyreject then goto action;
|
if yyreject then goto action;
|
||||||
end
|
end
|
||||||
else if not yydefault and yywrap() then
|
else if not yydefault and yywrap() then
|
||||||
begin
|
begin
|
||||||
yyclear;
|
yyclear;
|
||||||
return(0);
|
return(0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not yydone then goto start;
|
if not yydone then goto start;
|
||||||
|
|
||||||
yylex := yyretval;
|
yylex := yyretval;
|
||||||
|
|
||||||
end(*yylex*);
|
end(*yylex*);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user