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

iCalendar grammar #19

Open
sarambasich opened this issue Nov 9, 2014 · 1 comment
Open

iCalendar grammar #19

sarambasich opened this issue Nov 9, 2014 · 1 comment

Comments

@sarambasich
Copy link

I'm using PEGKit to make an iCalendar (RFC 5545) parser. It takes in a .ics file and reads it and will parse out the first class objects. I am running into an issue, however. How is one to handle EOFs? I'm having difficulty with this. My code gets stuck in an infinite loop when it finds them:

No viable alternative found in rule 'calprops'.
Line : 9223372036854775807
Near : «EOF» «EOF» 
Found : «EOF»

Is there any handling of this? I've tried searching for EOF but with no luck.

@yepher
Copy link
Contributor

yepher commented Nov 19, 2016

This looks pretty old and I think PegKit did not handle this sort of parsing very well at the time. I am doing some very similar parsing in a DSL I am working on.

I found this post on StackOverflow to be very valuable when figuring out how to do that sort or parsing.

I would assume this issue can be closed since the StackOverFlow response from PegKit author has a good working example that is very easily adapted to iCal parsing.

It would be nice to have an iCal grammar as one of the samples.

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

No branches or pull requests

2 participants