I'd like to understand how to construct a parser in .NET to process source files. For example, maybe I could begin by learning how to parse SQL or HTML or CSS and then act on the results to be able to format them for readability or something similar.
Where can I learn how to do this? Are there specific books I can refer to? Do I need to learn about lexers/parsers?
Specifically for the .NET platform since I'm comfortable in C#.