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

minor change for camlp5 8.03.00 compat #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chetmurthy
Copy link

Hello, here is a tiny patch that seems to work. I don't know much about matita, so this could be incorrect. I'll be releasing a new version of Camlp5, marking it incompatible with matita <= 0.99.5 (b/c build fails). I'd be happy to help you figure out what a better fix is, if this one isn't suitable.

===================
This breaks compat with previous versions of Camlp5

OCaml 5.2.0 supports raw identifiers, e.g. "\begin". The Camlp5 pretty-printer needs to know which "identifier-like" strings are keywords, so it can escape them as raw identifiers when pretty-printing. Since Camlp5 supports more than one syntax, that means different syntaxes can have different sets of identifiers. Hence, the lexer has to support exposing the set of keywords, and the pretty-printer has to support being parameterized by the keywords.

matita creates a Camlp5 lexer, so it needs to be changed to have that keyword-table slot (even though it seems it doesn't use it).

This breaks compat with previous versions of Camlp5

OCaml 5.2.0 supports raw identifiers, e.g. "\begin".  The Camlp5
pretty-printer needs to know which "identifier-like" strings are
keywords, so it can escape them as raw identifiers when
pretty-printing.  Since Camlp5 supports more than one syntax, that
means different syntaxes can have different sets of identifiers.
Hence, the lexer has to support exposing the set of keywords, and the
pretty-printer has to support being parameterized by the keywords.

matita creates a Camlp5 lexer, so it needs to be changed to have that
keyword-table slot (even though it seems it doesn't use it).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant