Skip to content

jcinnamond/treetop-time-range

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick treetop example for parsing date ranges.

You can run 'parser' and either provide examples on the command line
(you might need to double quote these to avoid upsetting your shell)
or type them in at a prompt if no command line args given.

The parser checks that there are three parts separated by slashes. Only
the day part is validated and it currently accepts a single day, a range
of <day>-<day> and a two days joined by 'AND'. It currently accepts invalid
ranges where the same day repeats (e.g., 'MONDAY-MONDAY').

Filling in times and repeats is left as an exercise for the reader :-)

It might make sense adding some new node classes if you intend to use
the parsed result for anything other than validation.

About

A quick example of parsing a date/time range using treetop.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages