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

C11 preprocessing tokenizer #114

Merged
merged 1 commit into from
Feb 22, 2019
Merged

Conversation

jameysharp
Copy link
Contributor

This is a larger sample input for lx, which may also be useful in its own right. I think it makes sense to ship it with libfsm, and I'm happy to license it under the same 2-clause BSD license that's given in LICENCE.

@katef
Copy link
Owner

katef commented Feb 22, 2019

It's a wonderful example, thank you. I'll probably come back and add equivalent lexers for C89 and C99 too, when I can (unless you want to get there first). It'd be neat if they can produce the same tokens and share a superset for the header.

/./ -> $chr;
}

'//' -> $line_comment_start .. /\n+/ -> $newline {
Copy link
Owner

Choose a reason for hiding this comment

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

I want to see if I can borrow this trick for katef/kgt#11

@katef katef merged commit 939d573 into katef:master Feb 22, 2019
@jameysharp jameysharp deleted the c11-preprocessor branch February 22, 2019 03:20
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