Skip to content
  • David Himmelstrup's avatar
    Parse OPTIONS properly and cache the result. · d700953c
    David Himmelstrup authored
    Use the lexer to parse OPTIONS, LANGUAGE and INCLUDE pragmas.
    This gives us greater flexibility and far better error
    messages. However, I had to make a few quirks:
      * The token parser is written manually since Happy doesn't
        like lexer errors (we need to extract options before the
        buffer is passed through 'cpp'). Still better than
        manually parsing a String, though.
      * The StringBuffer API has been extended so files can be
        read in blocks.
    I also made a new field in ModSummary called ms_hspp_opts
    which stores the updated DynFlags. Oh, and I took the liberty
    of moving 'getImports' into HeaderInfo together with
    'getOptions'.
    d700953c