Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2001-06

repite token not understood by tokens.pas

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Well, I've followed all your instructions.

Here are the only files I change in pp\source\compiler:

www.geocities.com/beatlesnap/repite_error.zip

And then what I do is make pp.exe with pp\source\compiler, which is going to be my new compiler.

With my new compiler I try to compile a little file (This one of writing hello on the screen). And it wants me to give it some units, the rtl, which I give it to you with the new tokens sintax.

But one of this files has an error:

D:\bailalo\S6\PP2\BIN\GO32V2>pp -Fu..\..\source\rtl\go32v2\ -Fi..\..\source\rtl\
inc -Fi..\..\source\rtl\i386 -di386 -vo pru.pas
astrings.inc(513,12) Error: Identifier not found ROMPER
astrings.inc(513,18) Error: Illegal expression
system.inc(406,15) Fatal: Syntax error, HASTA expected but identifier TO found

WHY?

The main changes i've done in

==tokens.pas is : Change 2 to 1 in order to allow
1 char tokens.

==scanner.pas --> Change 2 to 1 in is_keyword and the other procedure tscannerfile.readtoken

==ra386att.pas --> Change 'TYPE' and 'END' for 'TIPO' and 'FIN'

I also include in the zip astrings.inc, which is on my rtl (hispascal one).

And... if you want my folders and all the things to have exactly what I have here it is:

www.geocities.com/beatlesnap/hispascal_01_06_2001.zip

What I do it is (let's imagine you decompress it in your d:\ (with use folders option enabled)

I open a DOS BOX in win98:
-------------
d:
cd d:\bailalo\s6\
cargauni d:
cd %src%
rm *.o *.ppu *.exe
ppc386 -Sg -di386 pp.pas
--------
In windows explorer I copy d:\bailalo\s6\pp\source\compiler\pp.exe to d:\bailalo\s6\pp2\bin\go32v2
I return to the BOX DOS
----
cd %exe%

pp -Fu..\..\source\rtl\go32v2\ -Fi..\..\source\rtl\inc - Fi..\..\source\rtl\i386 -di386 -vo pru.pas

And the above error appears

Thanks for all, again, I don't understand repite error, perhaps I have an error in tokens.pas and I am not able to see it, because it's myself error. Because oneself errors are the least likely to be found by oneself.

Have a nice weekend. Myself I have to study for the June exams. Adrian15.

---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/

Reply by email

Jonas Maebe
to Unknown author
Show quoted text 6 lines
With my new compiler I try to compile a little file (This one of writing hello on the screen). And it wants me to give it some units, the rtl, which I give it to you with the new tokens sintax.

First compile the (unchanged) compiler and compile your rtl with that one. Then change your compiler. Afterwards, it shouldn't want to recompile the RTL anymore, so you don't have to translate it anymore.

Jonas

Reply by email

Pierre Muller
to Unknown author: Well, I've followed all your instructions. Here are the only files I change in…

At 15:09 01/06/01 , vous avez écrit:

Show quoted text 24 lines
Well, I've followed all your instructions. Here are the only files I change in pp\source\compiler: www.geocities.com/beatlesnap/repite_error.zip And then what I do is make pp.exe with pp\source\compiler, which is going to be my new compiler. With my new compiler I try to compile a little file (This one of writing hello on the screen). And it wants me to give it some units, the rtl, which I give it to you with the new tokens sintax. But one of this files has an error: D:\bailalo\S6\PP2\BIN\GO32V2>pp -Fu..\..\source\rtl\go32v2\ -Fi..\..\source\rtl\ inc -Fi..\..\source\rtl\i386 -di386 -vo pru.pas astrings.inc(513,12) Error: Identifier not found ROMPER astrings.inc(513,18) Error: Illegal expression system.inc(406,15) Fatal: Syntax error, HASTA expected but identifier TO found

Is ROMPER the equivalent of Break in your new list of reserved words ?
Then, the problem is that the compiler does not recognize it as a reserved word !
Thus it assumes that it is a normal identifier, that it can not find.

But Break and Continue are treated especially as
they are not really reserved words,
the tokens are never used in fact,
what is used is the definition in
procedure insertinternsyms(p : psymtable);
(unit psystem at line 38 of current CVS)

so you will need to rename these here also !

Reply by email