Every ShaderProgramCreator and ShaderCreator has a ShaderParserFactory that is used to instantiate appropriate ShaderParser for every shader source file.
Without any modification, the default IncludingShaderParser will be used that supports the ACGLimport pragma for source file inclusion.
In principle, a ShaderParserFactory may return a different parser based on the source file. In practice, the same parser for all files is often sufficient. To make things easier, the SimpleShaderParserFactory can be used as a factory that returns a parser of type ShaderParserType for every file.
This example presents a simple shader parser that reacts to "#pragma CustomCode" by replacing it with some custom text. The parser is a subclass of IncludingShaderParser and is therefore also able to use the ACGLimport pragma.