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

Identifiers equal to integer > max_int are not accepted in terms #947

Closed
fblanqui opened this issue Jan 28, 2023 · 1 comment
Closed

Identifiers equal to integer > max_int are not accepted in terms #947

fblanqui opened this issue Jan 28, 2023 · 1 comment

Comments

@fblanqui
Copy link
Member

symbol 1000000000000000000000000000 : TYPE;
symbol foo: 1000000000000000000000000000;
[/home/blanqui/src/lambdapi/tmp/toobig.lp:2:12-40] Too big number (max is 4611686018427387903).

This is a problem in the parser. In terms, natural numbers are parsed as P_NLit.
To fix this, one should convert identifiers to P_NLit's at scoping time (instead of at parsing time).
To get around this, enclose big numbers in {|...|}.

@fblanqui
Copy link
Member Author

Fixed in #1182 as desugaring is now defined by recursion on the string: there is no conversion to int anymore.
Note however that integers are not allowed as identifiers anymore.

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

No branches or pull requests

1 participant