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

Add COOL language #704

Merged
merged 1 commit into from May 16, 2017

Conversation

Projects
None yet
3 participants
@linonetwo
Contributor

linonetwo commented May 16, 2017

Classroom Object Oriented Language is a widely used language in CS classes.

This Grammar defination comes from COOL manual.

This is a byproduct from a COOL-to-javascript compiler.

@KvanTTT

This comment has been minimized.

Show comment
Hide comment
@KvanTTT

KvanTTT May 16, 2017

Member

Cool!

Member

KvanTTT commented May 16, 2017

Cool!

ONE_LINE_COMMENT: '--' .*? '\n' -> channel(HIDDEN);
// key words
CLASS: ('C'|'c')('L'|'l')('A'|'a')('S'|'s')('S'|'s');

This comment has been minimized.

@KvanTTT

KvanTTT May 16, 2017

Member

Can we use a more clear syntax here? I mean fragment rules: Case insensitive keywords.

@KvanTTT

KvanTTT May 16, 2017

Member

Can we use a more clear syntax here? I mean fragment rules: Case insensitive keywords.

This comment has been minimized.

@linonetwo

linonetwo May 16, 2017

Contributor

Sure, I will PR for that tomorrow morning. Thanks for that suggestion.

@linonetwo

linonetwo May 16, 2017

Contributor

Sure, I will PR for that tomorrow morning. Thanks for that suggestion.

@teverett

This comment has been minimized.

Show comment
Hide comment
@teverett

teverett May 16, 2017

Member

@KvanTTT I'm going to pull this, but I agree with your comment about clear syntax. Could you submit a issue for it?

@linonetwo thanks very much for your contribution. Also, thanks for submitting so many test cases; they will ensure that as the Antlr tree evolves, your grammar will continue to work.

Member

teverett commented May 16, 2017

@KvanTTT I'm going to pull this, but I agree with your comment about clear syntax. Could you submit a issue for it?

@linonetwo thanks very much for your contribution. Also, thanks for submitting so many test cases; they will ensure that as the Antlr tree evolves, your grammar will continue to work.

@teverett teverett merged commit c864cd8 into antlr:master May 16, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@KvanTTT

This comment has been minimized.

Show comment
Hide comment
@KvanTTT

KvanTTT May 16, 2017

Member

Ok, maybe later.

Member

KvanTTT commented May 16, 2017

Ok, maybe later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment