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

Type reification code does not support character class combinators such as || union #2085

Open
jurgenvinju opened this issue Nov 20, 2024 · 0 comments
Assignees

Comments

@jurgenvinju
Copy link
Member

Describe the bug

The interpreter crashes on #[a-z] || [A-Z] with an ambiguity:

rascal>#[a-z] || [A-Z]
Unexpected failure during parsing of current command: 
Ambiguous code (internal error), #[a-z] || [A-Z]
org.rascalmpl.interpreter.asserts.Ambiguous: Ambiguous code (internal error), #[a-z] || [A-Z]
        at org.rascalmpl.parser.uptr.UPTRNodeFactory.buildAmbiguityNode(UPTRNodeFactory.java:76)
        at org.rascalmpl.parser.uptr.UPTRNodeFactory.createAmbiguityNode(UPTRNodeFactory.java:85)
        at org.rascalmpl.parser.uptr.UPTRNodeFactory.createAmbiguityNode(UPTRNodeFactory.java:1)
        at org.rascalmpl.parser.gtd.result.out.SortContainerNodeFlattener.convertToUPTR(SortContainerNodeFlattener.java:183)
        at org.rascalmpl.parser.gtd.result.out.DefaultNodeFlattener.convert(DefaultNodeFlattener.java:63)

brackets don't help:

rascal>#([a-z] || [A-Z])
Unexpected failure during parsing of current command: 
Ambiguous code (internal error), ([a-z] || [A-Z])
org.rascalmpl.interpreter.asserts.Ambiguous: Ambiguous code (internal error), ([a-z] || [A-Z])
        at org.rascalmpl.parser.uptr.UPTRNodeFactory.buildAmbiguityNode(UPTRNodeFactory.java:76)
        at org.rascalmpl.parser.uptr.UPTRNodeFactory.createAmbiguityNode(UPTRNodeFactory.java:85)
        at org.rascalmpl.parser.uptr.UPTRNodeFactory.createAmbiguityNode(UPTRNodeFactory.java:1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant