-
Notifications
You must be signed in to change notification settings - Fork 12
infinite loop on SUNDAY 2.30 #4
Copy link
Copy link
Open
Description
The code goes into an infinite loop when trying to parse "SUNDAY 2.30".
The problem is that this is getting parsed as:
FindLater(Present,Map(DayOfWeek -> 7, MonthOfYear -> 2, DayOfMonth -> 30))
That is, Sunday, the 30th of February. It then goes into an infinite loop trying to search for an impossible day. You can get a failure instead of an infinite loop by deleting this line from the grammar:
[Nil] ||| . ||| ||| 1.0
Avoiding this infinite loop would require somehow recognizing that the field values MonthOfYear -> 2 and DayOfMonth -> 30 cannot be combined. I'm not sure how to detect that.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels