summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-06-14 20:37:31 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2015-06-14 20:37:31 +0000
commitc81e5508eff3d0ee24ffc15e2e6af53c602378ef (patch)
tree9930fcfa5b779da7b358c5fd5dba6356ea4cc6e7 /utils
parent61adde87d69cff8a2f27521978c50b39929466ad (diff)
downloadfpc-c81e5508eff3d0ee24ffc15e2e6af53c602378ef.tar.gz
--- Merging r29426 into '.':
U utils/h2pas/h2plexlib.pas --- Recording mergeinfo for merge of r29426 into '.': U . --- Merging r30553 into '.': U utils/h2pas/yylex.cod U utils/h2pas/yyparse.cod --- Recording mergeinfo for merge of r30553 into '.': G . # revisions: 29426,30553 git-svn-id: http://svn.freepascal.org/svn/fpc/branches/fixes_3_0@31066 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'utils')
-rw-r--r--utils/h2pas/h2plexlib.pas2
-rw-r--r--utils/h2pas/yylex.cod160
2 files changed, 81 insertions, 81 deletions
diff --git a/utils/h2pas/h2plexlib.pas b/utils/h2pas/h2plexlib.pas
index cf402dce2e..f5977a199e 100644
--- a/utils/h2pas/h2plexlib.pas
+++ b/utils/h2pas/h2plexlib.pas
@@ -254,7 +254,7 @@ yysstate, yylstate : Integer;
yymatches : Integer;
yystack : array [1..max_matches] of Integer;
yypos : array [1..max_rules] of Integer;
-yysleng : Integer;
+yysleng : Longint;
(* Utilities: *)
diff --git a/utils/h2pas/yylex.cod b/utils/h2pas/yylex.cod
index 1fa8b57b45..118b5e69f6 100644
--- a/utils/h2pas/yylex.cod
+++ b/utils/h2pas/yylex.cod
@@ -1,80 +1,80 @@
-
-(* lexical analyzer template (TP Lex V3.0), V1.0 3-2-91 AG *)
-
-(* global definitions: *)
-%%
-
-function yylex : Integer;
-
-procedure yyaction ( yyruleno : Integer );
- (* local definitions: *)
-%%
-begin
- (* actions: *)
- case yyruleno of
-%%
- end;
-end(*yyaction*);
-
-(* DFA table: *)
-%%
-
-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*);
-
+
+(* lexical analyzer template (TP Lex V3.0), V1.0 3-2-91 AG *)
+
+(* global definitions: *)
+%%
+
+function yylex : Integer;
+
+procedure yyaction ( yyruleno : Integer );
+ (* local definitions: *)
+%%
+begin
+ (* actions: *)
+ case yyruleno of
+%%
+ end;
+end(*yyaction*);
+
+(* DFA table: *)
+%%
+
+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*);
+