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

scheme: add support for Racket #1877

Closed
cwfoo opened this issue Sep 16, 2018 · 5 comments
Closed

scheme: add support for Racket #1877

cwfoo opened this issue Sep 16, 2018 · 5 comments
Assignees

Comments

@cwfoo
Copy link

cwfoo commented Sep 16, 2018

Add support for the Racket language.

The Scheme parser could be reused for Racket. Racket file extensions (e.g. *.rkt) could be added to these lines:

ctags/parsers/scheme.c

Lines 113 to 118 in e522743

static const char *const extensions [] = {
"SCM", "SM", "sch", "scheme", "scm", "sm", NULL
};
static const char *const aliases [] = {
"gosh", "guile", NULL
};

@masatake
Copy link
Member

Could you open a pull request?

@masatake
Copy link
Member

I don't know Racket well.

As far as reading its web site quikcly, racket can switch grammer (syntax?) for the input file with #lang notation. So choosing the scheme parser for ".rkt" file doesn't make good result.

What we need is a Rapcker parser which recognizes #lang notation and run a proper subparser.
http://docs.racket-lang.org/search/index.html?q=H%3A

Which non-S-exp language is popoular as Racker language extentsion?
datalog?

@cwfoo
Copy link
Author

cwfoo commented Sep 17, 2018

Racket is practically always written using s-expressions. I believe people only switch syntax for experiments. I think the Scheme parser is sufficient. Otherwise, you would need to maintain a huge number of subparsers that aren't used by many people (e.g. a parser for Algol 60, parsers for the endless list of experimental languages made by the Racket community).

Which non-S-exp language is popular as Racket language extension?

There aren't really any. The only mainstream one is the Scribble language (#lang scribble) used for Racket documentation, and it has a separate file extension (*.scrbl).

@masatake
Copy link
Member

I see. Thank you.

@masatake masatake changed the title Add support for Racket scheme: add support for Racket Oct 8, 2018
@masatake masatake self-assigned this Oct 8, 2018
@masatake
Copy link
Member

Solved by #2315. Sorry to be late for solving this issue.
Scribble language is interesting but it is not the time for working for the language.

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