diff --git a/TestTok.cpp b/TestTok.cpp new file mode 100644 index 000000000..c5c5eb173 --- /dev/null +++ b/TestTok.cpp @@ -0,0 +1,45 @@ + +// Internal testing +// Tokenize a file and print tokens + +#include +#include "tokenize.h" + +//--------------------------------------------------------------------------- + +int main(int argc, char* argv[]) +{ + if (argc != 2) + return 0; + + tokens = tokens_back = NULL; + Tokenize(argv[1]); + + unsigned int linenr = 0; + for (TOKEN *tok = tokens; tok; tok = tok->next) + { + // Print either a "\n" or a " " + if (tok->linenr != linenr) + std::cout << "\n"; + else + std::cout << " "; + + std::cout << tok->str; + + linenr = tok->linenr; + } + + + // Delete all tokens.. + while (tokens) + { + TOKEN *next = tokens->next; + free(tokens->str); + delete tokens; + tokens = next; + } + + return 0; +} +//--------------------------------------------------------------------------- + diff --git a/tok.bpf b/tok.bpf new file mode 100644 index 000000000..f9792ee4f --- /dev/null +++ b/tok.bpf @@ -0,0 +1,3 @@ +This file is used by the project manager only and should be treated like the project file + +main diff --git a/tok.bpr b/tok.bpr new file mode 100644 index 000000000..7e03032cc --- /dev/null +++ b/tok.bpr @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1053 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[Excluded Packages] +c:\program files\borland\cbuilder6\Bin\dclbcbsmp60.bpl=Borland Sample Controls Design Time Package +c:\program files\borland\cbuilder6\Bin\applet60.bpl=Borland Control Panel Applet Package +c:\program files\borland\cbuilder6\Bin\dclsmpedit60.bpl=Borland Editor Script Enhancements +c:\program files\borland\cbuilder6\Bin\dclemacsedit60.bpl=Borland Editor Emacs Enhancements +c:\program files\borland\cbuilder6\Bin\dclact60.bpl=Borland ActionBar Components +c:\program files\borland\cbuilder6\Bin\idefilters60.bpl=IDE Filter for CPP32 +c:\program files\borland\cbuilder6\Bin\dclmlwiz60.bpl=Borland Markup Language Wizards +c:\program files\borland\cbuilder6\Bin\dclnet60.bpl=Borland Internet Components +c:\program files\borland\cbuilder6\Bin\DCLNMF60.bpl=NetMasters Fastnet Tools +c:\program files\borland\cbuilder6\Bin\dclocx60.bpl=Borland Sample Imported ActiveX Controls +c:\program files\borland\cbuilder6\Bin\dclindy60.bpl=Internet Direct (Indy) for D6 Property and Component Editors +c:\program files\borland\cbuilder6\Projects\Bpl\B304vd61.bpl=TurboPower Abbrevia 3.04 Design-time package - VCL61 +c:\program files\borland\cbuilder6\Projects\Bpl\DreamEdit_C6.bpl=Dream Editor Package +c:\program files\borland\cbuilder6\PROJECTS\BPL\Iocomp65.bpl=Iocomp Package VCL +c:\program files\borland\cbuilder6\Projects\Bpl\tb2k_cb6.bpl=Toolbar2000 Components (Jordan Russell) +c:\program files\borland\cbuilder6\Projects\Bpl\tb2kdsgn_cb6.bpl=Toolbar2000 Design Package (Jordan Russell) +c:\program files\borland\cbuilder6\Projects\Bpl\A406_D61.bpl=TurboPower Async Professional 4.05 Designtime Package - VCL61 +c:\program files\borland\cbuilder6\Projects\Bpl\ThemeManagerC6D.bpl=Soft Gems Theme Manager +c:\program files\borland\cbuilder6\Bin\dclado60.bpl=Borland ADO DB Components +C:\Program Files\Borland\CBuilder6\Bin\dcldb60.bpl=Borland Database Components +c:\program files\borland\cbuilder6\Bin\dclqrt60.bpl=QuickReport Components +C:\WINNT\system32\ibevnt60.bpl=Borland Interbase Event Alerter Component +c:\program files\borland\cbuilder6\Bin\dclbde60.bpl=Borland BDE DB Components +C:\Program Files\Borland\CBuilder6\Bin\dbx60.bpl=Borland SQL Explorer UI Package +c:\program files\borland\cbuilder6\Bin\dclcds60.bpl=Borland Base Cached ClientDataset Component +C:\Program Files\Borland\CBuilder6\Bin\dclmid60.bpl=Borland MyBase DataAccess Components +c:\program files\borland\cbuilder6\Bin\dclbdecds60.bpl=Borland Local BDE ClientDataset Components +c:\program files\borland\cbuilder6\Bin\dcltee60.bpl=TeeChart Components +c:\program files\borland\cbuilder6\Bin\dcltqr60.bpl=TeeChart for QuickReport Components +c:\program files\borland\cbuilder6\Bin\dclib60.bpl=InterBase Data Access Components +c:\program files\borland\cbuilder6\Bin\dclclxdb60.bpl=Borland CLX Database Components +C:\Program Files\Borland\CBuilder6\Bin\dclclxstd60.bpl=Borland CLX Standard Components +c:\program files\borland\cbuilder6\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package +c:\program files\borland\cbuilder6\Bin\bcbie60.bpl=Borland C++Builder Internet Explorer 5 Components Package +c:\program files\borland\cbuilder6\Bin\dclsoap60.bpl=Borland SOAP Components +c:\program files\borland\cbuilder6\Bin\dcldbx60.bpl=Borland dbExpress Components +c:\program files\borland\cbuilder6\Bin\dcldbxcds60.bpl=Borland Local DBX ClientDataset Components +c:\program files\borland\cbuilder6\Bin\bcb2kaxserver60.bpl=Borland C++Builder COM Server Components Sample Package +c:\program files\borland\cbuilder6\PROJECTS\BPL\Iocomp65clx.bpl=Iocomp Package CLX +c:\program files\borland\cbuilder6\Bin\dclite60.bpl=Borland Integrated Translation Environment + +[HistoryLists\hlIncludePath] +Count=3 +Item0=C:\Program Files\Borland\CBuilder6\Projects;S:\test\prjman;$(BCB)\include;$(BCB)\include\vcl +Item1=$(BCB)\include;$(BCB)\include\vcl +Item2=e:\minadok\kod\bcb\components;e:\minadok\kod\bcb\clientserver;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=C:\Program Files\Borland\CBuilder6\Projects;S:\test\prjman;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\..\..\..\program\borland\cbuilder3\lib;$(BCB)\lib\obj;$(BCB)\lib;d:\minadok\kod\bcb\components +Item3=..\..\..\..\..\program\borland\cbuilder3\lib;$(BCB)\lib\obj;$(BCB)\lib +Item4=e:\minadok\kod\bcb\components;e:\minadok\kod\bcb\clientserver;..\..\bokf\components;..\bokf\components;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\bokf\components;..\bokf\components;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[HistoryLists\hlRunParameters] +Count=7 +Item0="D:\MINADOK\kod\920i\bjornbole45\bjornb.run" +Item1="d:\minadok\kod\920\bjornbole45\bjornb.run" +Item2="C:\WINDOWS\Skrivbord\bjornb\bjornbole45\bjornb.run" +Item3="C:\WINDOWS\Skrivbord\bjornb\bjornbole45" +Item4="c:\test.run" +Item5="C:\Documents and Settings\Daniel\Mina dokument\kod\bjornbole22\bjornb.run" +Item6=bjornb.cod bjornb.920 + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams=testbufferoverrun6\testbufferoverrun6.cpp +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=1 + + \ No newline at end of file diff --git a/tok.res b/tok.res new file mode 100644 index 000000000..b2cf79d6a Binary files /dev/null and b/tok.res differ