diff options
author | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-05-08 16:37:59 +0000 |
---|---|---|
committer | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-05-08 16:37:59 +0000 |
commit | 2ba9967f052aaac164aed66b916060960af2d7b9 (patch) | |
tree | 46eacb708d0dd8a27a705a41257c911a4eb67b11 /utils | |
parent | 499c6d7036c66e245c3be12629d931586e2be8a0 (diff) | |
download | fpc-2ba9967f052aaac164aed66b916060960af2d7b9.tar.gz |
--- Merging r29425 into '.':
U utils/h2pas/h2plexlib.pas
U utils/h2pas/scan.l
U utils/h2pas/h2pas.y
U utils/h2pas/h2poptions.pas
U utils/h2pas/h2pas.pas
U utils/h2pas/h2pyacclib.pas
U utils/h2pas/scan.pas
# revisions: 29425
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/fixes_3_0@30822 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'utils')
-rw-r--r-- | utils/h2pas/h2pas.pas | 4 | ||||
-rw-r--r-- | utils/h2pas/h2pas.y | 2 | ||||
-rw-r--r-- | utils/h2pas/h2plexlib.pas | 30 | ||||
-rw-r--r-- | utils/h2pas/h2poptions.pas | 4 | ||||
-rw-r--r-- | utils/h2pas/h2pyacclib.pas | 2 | ||||
-rw-r--r-- | utils/h2pas/scan.l | 1 | ||||
-rw-r--r-- | utils/h2pas/scan.pas | 1 |
7 files changed, 22 insertions, 22 deletions
diff --git a/utils/h2pas/h2pas.pas b/utils/h2pas/h2pas.pas index 88a7ed4720..326c73be7c 100644 --- a/utils/h2pas/h2pas.pas +++ b/utils/h2pas/h2pas.pas @@ -4,7 +4,7 @@ (* global definitions: *) program h2pas; - +{$H+} (* Copyright (c) 1998-2000 by Florian Klaempfl @@ -9392,4 +9392,4 @@ begin PTypeList.Free; freedynlibproc.free; loaddynlibproc.free; -end.
\ No newline at end of file +end. diff --git a/utils/h2pas/h2pas.y b/utils/h2pas/h2pas.y index c9da9fdedd..d92329f621 100644 --- a/utils/h2pas/h2pas.y +++ b/utils/h2pas/h2pas.y @@ -1,6 +1,6 @@ %{ program h2pas; - +{$H+} (* Copyright (c) 1998-2000 by Florian Klaempfl diff --git a/utils/h2pas/h2plexlib.pas b/utils/h2pas/h2plexlib.pas index c104349bbd..cf402dce2e 100644 --- a/utils/h2pas/h2plexlib.pas +++ b/utils/h2pas/h2plexlib.pas @@ -1,6 +1,5 @@ - unit h2pLexLib; - +{$H+} (* Standard Lex library unit for TP Lex Version 3.0. 2-11-91 AG *) @@ -25,7 +24,8 @@ interface (* Variables: - The variable yytext contains the current match, yyleng its length. + The variable yytext contains the current match, yyleng(was removed because of + $H+) its length. The variable yyline contains the current input line, and yylineno and yycolno denote the current input position (line, column). These values are often used in giving error diagnostics (however, they will only be @@ -43,8 +43,6 @@ yyinput, yyoutput : Text; (* input and output file *) yyline,yyprevline : String; (* current and previous input line *) yylineno, yycolno : Integer; (* current input position *) yytext : String; (* matched text (should be considered r/o) *) -yyleng : Byte (* length of matched text *) - absolute yytext; (* I/O routines: @@ -256,14 +254,14 @@ yysstate, yylstate : Integer; yymatches : Integer; yystack : array [1..max_matches] of Integer; yypos : array [1..max_rules] of Integer; -yysleng : Byte; +yysleng : Integer; (* Utilities: *) procedure echo; var i : Integer; begin - for i := 1 to yyleng do + for i := 1 to Length(yytext) do put_char(yytext[i]) end(*echo*); @@ -275,16 +273,16 @@ procedure yymore; procedure yyless ( n : Integer ); var i : Integer; begin - for i := yyleng downto n+1 do + for i := Length(yytext) downto n+1 do unget_char(yytext[i]); - yyleng := n; + SetLength(yytext,n); end(*yyless*); procedure reject; var i : Integer; begin yyreject := true; - for i := yyleng+1 to yysleng do + for i := Length(yytext)+1 to yysleng do yytext := yytext+get_char; dec(yymatches); end(*reject*); @@ -333,16 +331,14 @@ procedure yynew; procedure yyscan; begin - if yyleng=255 then fatal('yytext overflow'); yyactchar := get_char; - inc(yyleng); - yytext[yyleng] := yyactchar; + yytext:=yytext+yyactchar; end(*yyscan*); procedure yymark ( n : Integer ); begin if n>max_rules then fatal('too many rules'); - yypos[n] := yyleng; + yypos[n] := Length(yytext); end(*yymark*); procedure yymatch ( n : Integer ); @@ -359,12 +355,12 @@ function yyfind ( var n : Integer ) : Boolean; dec(yymatches); if yymatches>0 then begin - yysleng := yyleng; + yysleng := Length(yytext); n := yystack[yymatches]; yyless(yypos[n]); yypos[n] := 0; - if yyleng>0 then - yylastchar := yytext[yyleng] + if Length(yytext)>0 then + yylastchar := yytext[Length(yytext)] else yylastchar := #0; yyfind := true; diff --git a/utils/h2pas/h2poptions.pas b/utils/h2pas/h2poptions.pas index 3d8cda2121..3f78e2c064 100644 --- a/utils/h2pas/h2poptions.pas +++ b/utils/h2pas/h2poptions.pas @@ -16,7 +16,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ****************************************************************************} + unit h2poptions; +{$H+} interface const @@ -138,7 +140,7 @@ end; Procedure ProcessOptions; Var - cp : string; + cp : string[255]; {because of cp[3] indexing} I : longint; Function GetNextParam (const Opt,Name : String) : string; diff --git a/utils/h2pas/h2pyacclib.pas b/utils/h2pas/h2pyacclib.pas index a9340a6214..eeb3cb398c 100644 --- a/utils/h2pas/h2pyacclib.pas +++ b/utils/h2pas/h2pyacclib.pas @@ -34,7 +34,7 @@ $History: YACCLIB.PAS $ {$I-} - +{$H+} unit h2pYaccLib; (* Yacc Library Unit for TP Yacc Version 3.0, 6-17-91 AG *) diff --git a/utils/h2pas/scan.l b/utils/h2pas/scan.l index 2b6ece4574..a6615b6005 100644 --- a/utils/h2pas/scan.l +++ b/utils/h2pas/scan.l @@ -20,6 +20,7 @@ unit scan; +{$H+} interface diff --git a/utils/h2pas/scan.pas b/utils/h2pas/scan.pas index d7105e449d..39a937640c 100644 --- a/utils/h2pas/scan.pas +++ b/utils/h2pas/scan.pas @@ -23,6 +23,7 @@ unit scan; +{$H+} interface |