Lexer: Rework Integer (and Float) literals to make them easier to parse #11
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: j/Conlang#11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, the Lexer includes the base marker inside the string. However, it would likely be neater to match on the base marker and use that to determine whether the string is a valid literal at parse time.
#Requirements:
Grammar:
Tokens:
BaseHex
:=0x
: base-16 markerBaseTen
:=0d
: base-10 marker (I find this one fun :P)BaseOct
:=0o
: base-8 markerBaseBin
:=0b
: base-2 markerLexer:
Rule::integer
AST:
Parser:
Issue has been obsoleted with the lexer rewrite