Skip to content

Commit

Permalink
Updated help and warning messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
PocketNerdIO committed Jun 22, 2024
1 parent 69e8249 commit db4b071
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions ctran.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ procedure HelpText();
s := 'CTRAN-ng Version 0.0.1 (C) Alex Brown' + LineEnding +
'Parameters: <name> [-e<dir>] [-x[<dir>] -g[<dir>] -a[<dir>] -i[<dir>] -l[<dir>] -c[<dir>] -s -k -v]' + LineEnding +
'<name> Category source input file' + LineEnding +
'-e<dir> Input externals directory' + LineEnding +
'-e<dir> Input externals directory (multiple separated by `;`' + LineEnding +
'-x<dir> Output .EXT file' + LineEnding +
'-c<dir> Output .C code file' + LineEnding +
'-g<dir> Output .G include file' + LineEnding +
Expand All @@ -62,7 +62,12 @@ procedure HelpText();
'-l<dir> Output .LIS file' + LineEnding +
'-s SDK output' + LineEnding +
'-k Output skeleton source files' + LineEnding +
'-v Verbose output';
'-v Verbose output, using a compination of:' + LineEnding +
' l show lexer debug output' + LineEnding +
' t show table of tokens' + LineEnding +
' p show parser debug output' + LineEnding +
' a show abstract syntax tables' + LineEnding +
' r reconstruct all input files from abstract syntax';
WriteLn(s);
end;

Expand Down Expand Up @@ -1593,16 +1598,19 @@ function WalkParsers(filename: String) : String;
if params.SwitchExists('C') then begin
MakeC(CatParser);
end;
if params.SwitchExists('I') then begin
if params.SwitchExists('I') or params.SwitchExists('A') then begin
WriteLn;
WriteLn('*** WARNING! .ING FILE GENERATION IS BROKEN! ***');
WriteLn('CTRAN-ng is currently unable to convert the C in category file');
WriteLn('PROPERTY and TYPES sections to ASM. The file generated will');
WriteLn('include the original C code, commented out. If you want to use');
WriteLn('.ING files, you will need to manually convert the C to ASM.');
WriteLn('It is next on the list to be fixed, but it will take time as');
WriteLn('it requires a miniature C compiler to be written.');
WriteLn('*** WARNING! TASM FILE GENERATION IS EXPERIMENTAL! ***');
WriteLn('CTRAN-ng replicates the way that Psion''s CTRAN.EXE generates');
WriteLn('Borland Turbo Assember (TASM) source. Conversion of the');
WriteLn('variables and typedefs in PROPERTY and TYPES sections is very');
WriteLn('rudimentary and barely does any error checking. Is is very');
WriteLn('likely that generated assembly code will not work. It is');
WriteLn('recommended that you check any generated .ASM and .ING files');
WriteLn('before using them.');
WriteLn;
end;
if params.SwitchExists('I') then begin
for par in parsers.Values do begin
MakeING(par);
end;
Expand Down

0 comments on commit db4b071

Please sign in to comment.