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

Added BrainF*ck Language #1037

Merged
merged 8 commits into from
Jun 16, 2019
Merged

Added BrainF*ck Language #1037

merged 8 commits into from
Jun 16, 2019

Conversation

espositoandrea
Copy link
Contributor

I added a lexer for the BrainF*ck language.

This was my first time using Ruby, so I think it's a pretty dirty code, but it works. It can be improved in many ways, but it's a starting point.

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, thanks for submitting your lexer. I'm trying to help clean out the pull request backlog... I've commented on a few things in your lexer. It'd be great if you take a look, and I'm sure we can get it tidied up so it can be included.

lib/rouge/lexers/brainfuck.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/brainfuck.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/brainfuck.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/brainfuck.rb Outdated Show resolved Hide resolved
lib/rouge/lexers/brainfuck.rb Outdated Show resolved Hide resolved
@espositoandrea
Copy link
Contributor Author

After the useful comments of @vidarh I decided to revisit the BrainFuck lexer.

I have improved my knowledge of Ruby during this time so I wrote a much better lexer (improving a lot its complexity).

It's all written in :root, but given the fact that it's just made of four rules it's not a very big deal.

@vidarh
Copy link
Contributor

vidarh commented Jan 11, 2019

@espositoandrea Wow that was a quick turnaround. (Don't worry about the CI failure; it's broken for all commits at the moment - we can rerun that once its fixed).

@vidarh
Copy link
Contributor

vidarh commented Jan 13, 2019

@espositoandrea Just one more small nitpick: Can you fix the indentation so it's in line with the others? (2 spaces per indentation level)

@espositoandrea
Copy link
Contributor Author

@vidarh sure! Done!

@pyrmont
Copy link
Contributor

pyrmont commented Jun 14, 2019

Hi there, @espositoandrea :) I posted a suggested change to your branch as a PR.

I might have screwed it up by rebasing against master first. If I did, feel free to just copy and paste into your own file!

@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Jun 14, 2019
@espositoandrea
Copy link
Contributor Author

Hi, @pyrmont. I've merged your PR.

@pyrmont pyrmont merged commit 004b6f4 into rouge-ruby:master Jun 16, 2019
@pyrmont
Copy link
Contributor

pyrmont commented Jun 16, 2019

Thanks for contributing to Rouge! :)

@pyrmont pyrmont removed the author-action The PR has been reviewed but action by the author is needed label Aug 5, 2019
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.

3 participants