Skip to content

Number atom parsing edge case#124

Merged
patham9 merged 1 commit intomainfrom
AtomNumberParses
Feb 11, 2026
Merged

Number atom parsing edge case#124
patham9 merged 1 commit intomainfrom
AtomNumberParses

Conversation

@patham9
Copy link
Collaborator

@patham9 patham9 commented Feb 11, 2026

No description provided.

…values from mork space matches with just a single output var or atom, it shall also be a number
@patham9 patham9 merged commit 41c0a65 into main Feb 11, 2026
5 checks passed
sexpr(S,E,E) --> blanks, string_lit(S), blanks, !.
sexpr(T,E0,E) --> blanks, "(", blanks, seq(T,E0,E), blanks, ")", blanks, !.
sexpr(N,E,E) --> blanks, number(N), lookahead_any(" ()\t\n\r"), blanks, !.
sexpr(N,E,E) --> blanks, number(N), ( lookahead_any(" ()\t\n\r") ; \+ [_] ), blanks, !.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference \+ [_] means there is nothing to look ahead to even (reached the end of the string to parse)

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.

2 participants