Added initial version of PatternScanner, which flex scanners will be
converted to use.