Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ANTLRInputStream and ANTLRFileStream #3113

Merged
merged 11 commits into from
Mar 10, 2021
Merged

Fixed ANTLRInputStream and ANTLRFileStream #3113

merged 11 commits into from
Mar 10, 2021

Commits on Jan 3, 2021

  1. Configuration menu
    Copy the full SHA
    e24f97d View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2021

  1. Configuration menu
    Copy the full SHA
    8391136 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2021

  1. Fixed ANTLRInputStream and ANTLRFileStream

    A previous change to add std::string_view support to ANTLRInputStream for C++17 caused some trouble because of ABI changes. This has been changed to define 2 constructors, one for std::string_view (for C++17) and the original one for std::string.
    This is turn caused an error in ANTLRFileStream, which also takes a string in the constructor (but handling it as file name instead of input). To make this clearer the c-tor taking a std::string has been deleted in ANTLRFileStream and the class now requires to load input via the loadFile() function. This might cause some trouble for those users who had used the std::string constructor of ANTLRFileStream, but I think the better error reporting outweighs the little annoyance.
    mike-lischke committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    62a829f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    faa64fd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    93c0621 View commit details
    Browse the repository at this point in the history
  4. Wrong load call fixed.

    mike-lischke committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    f881e3e View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2021

  1. More changes to the ANTLRInputStream and ANTLRFileStream classes

    - Added a default c-tor to the input stream to avoid an ambiquity.
    - Changed the input stream API so that it can take a string pointer + length and use that for UTF conversion, avoiding so unnecessary copies. Convenience methods exist to use a std::string or a std::string_view.
    - With that only a single load() method is necessary.
    - In ANTLRFileStream the other c-tors are now also deleted, as they make no sense there.
    mike-lischke committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    84d4ce7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5731e64 View commit details
    Browse the repository at this point in the history
  3. Build fix

    mike-lischke committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    9d1737f View commit details
    Browse the repository at this point in the history
  4. Another build fix

    C++ is not <any other language where you don't need a useless constructor>
    mike-lischke committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    ff629d5 View commit details
    Browse the repository at this point in the history
  5. Small improvement

    mike-lischke committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    4431f1f View commit details
    Browse the repository at this point in the history