Talk:Compiler/Simple file inclusion pre processor: Difference between revisions

From Rosetta Code
Content added Content deleted
Line 5: Line 5:
:I strongly suspect that the syntax of Algol 68, PL/1 and COBOL (for example) makes the implementation harder than a C pre-processor would be, which was part of my motivation.
:I strongly suspect that the syntax of Algol 68, PL/1 and COBOL (for example) makes the implementation harder than a C pre-processor would be, which was part of my motivation.
:To pre-process Algol 68, PL/1 and COBOL for this task requires some level of lexical analysis, whilst a C pre-processor need only find lines that start with "#include" ( possibly with spaces before and after the "#" ). --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 18:25, 6 June 2021 (UTC)
:To pre-process Algol 68, PL/1 and COBOL for this task requires some level of lexical analysis, whilst a C pre-processor need only find lines that start with "#include" ( possibly with spaces before and after the "#" ). --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 18:25, 6 June 2021 (UTC)

:Thanks for considering and attempting the task, BTW. --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 18:36, 6 June 2021 (UTC)

Revision as of 18:36, 6 June 2021

wrong language

This task would probably be more useful and help compare different languages better (the point of this site) if it handled the same syntax used by Compiler/Sample_programs, rather than ALGOL 68 processes ALGOL 68, C processes C, PL/1 processes PL/1, Phix processes Phix, etc. --Pete Lomax (talk) 17:35, 6 June 2021 (UTC)

You have a point, but by processing the actual language, it compares the language's pre-processor facilities and also how hard pre-processing the source is.
I strongly suspect that the syntax of Algol 68, PL/1 and COBOL (for example) makes the implementation harder than a C pre-processor would be, which was part of my motivation.
To pre-process Algol 68, PL/1 and COBOL for this task requires some level of lexical analysis, whilst a C pre-processor need only find lines that start with "#include" ( possibly with spaces before and after the "#" ). --Tigerofdarkness (talk) 18:25, 6 June 2021 (UTC)
Thanks for considering and attempting the task, BTW. --Tigerofdarkness (talk) 18:36, 6 June 2021 (UTC)