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

Add Turing support #710

Closed
wants to merge 5 commits into from
Closed

Add Turing support #710

wants to merge 5 commits into from

Conversation

vincentmacri
Copy link

Turing is an educational language. While not very popular, it is used in many high schools in Ontario, Canada.

@vincentmacri
Copy link
Author

Does anything else need to be done for this to get merged? @gfx

Copy link
Contributor

@vidarh vidarh left a comment

Choose a reason for hiding this comment

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

Hi, I'm trying to help triage pull requests for Rouge so we can work down the backlog. Can you please have a look at the feedback?

rule %r(%.*?$), Comment::Single
rule %r(/\*.*?\*/)m, Comment::Multiline

rule /(?:#{constants.join('|')})\b/, Keyword::Constant
Copy link
Contributor

Choose a reason for hiding this comment

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

Please see how this is done in other lexers, with a Set constructed separately, combined with a single rule and set lookups. This is done because Rouge matches each regex in turn, so reducing the number of regex matches is preferable so that a string can be excluded quickly. E.g. search for "rule id" in the C lexer.

@@ -0,0 +1,14 @@
# -*- coding: utf-8 -*- #

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add '# frozen_string_literal: true'

@@ -0,0 +1,38 @@
var myStr : string := "hello"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please trim this down a bit. It's meant to be a small visual demo of what the lexer does, not of the language per se, for use e.g. on http://rouge.jneen.net/ - Most are 10-25 lines or so.

@@ -0,0 +1,164 @@
# -*- coding: utf-8 -*- #

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add '# frozen_string_literal: true'

@vincentmacri
Copy link
Author

vincentmacri commented Jan 14, 2019

Thanks for the feedback, I thought this was never going to get merged.

I'm a lot busier now than I was when I made this pull request, but I'll try and implement your requested changes in the next several weeks/couple months, whenever I have time (hopefully sooner rather than later).

@vincentmacri
Copy link
Author

I no longer have time to work on this, and don't think it's needed anymore as a lot of schools here in Ontario have been moving away from Turing in the past few years and they were the only organizations still using it. If nobody else wants to take on this pull request, feel free to close it @vidarh .

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.

None yet

2 participants