Lets say we use type-checked Lua (possibly in a special mode), since that aids new parsing techniques. And allows us to reuse the scanner I designed for parsing Lua, inlining those routines. Wrapped in a routine to track line number & filename, which can be set via the #line directive.
Getting back to lexing... GLSL has similar lexing rules to C, except we don't have strings. Too high-level for GLSL!
That is we split the file into numbers, identifiers & keywords, symbols, & punctuation.
2/3!