Do you plan on implementing the entire C preprocessor like this, or is this only for includes? Either way, I would seriously second (third, forth, ...) the suggestion to implement a general purpose tokenizer, and then apply logic like this to streams of tokens instead of raw text.~ wrote:What I need to do next is writing a function that lets me see whether the first non-blank character in the current line is '#', and if so, see if it's an include directive, and then see if the file is enclosed in <> or "" to search for the included file in the corresponding compiler "include" or current source directories.
glauxosdever made cpudev.org, not Schol-R-LEA, glauxosdever said that Schol-R-LEA wrote a lot for compilerdev.org, not cpudev.org. You really need to read posts, like, really. Please read and understand the posts. This isn't a blog, hearing what others are saying is an important part of using a forum.~ wrote: @Schol-R-LEA, you would probably thrive with cpudev.org if you dedicate this year entirely to a key topic on it, to be implemented as a practical thing to explain and use.
Also you're basically telling Schol-R-LEA that he should write a tutorial to teach you personally how to make a ROM dumper for an Atari 2600. Why would he want to do that, why would he dedicate one of the 60 or so years of his adult life helping you make images of programs for a 40 year old PC?