6cdh / tree-sitter-scheme Goto Github PK
View Code? Open in Web Editor NEWScheme grammar for tree-sitter
License: MIT License
Scheme grammar for tree-sitter
License: MIT License
This is a tracking issue for Chez Scheme support.
It supports R6RS.
The specific syntax can be found at Chez Scheme Syntax.
.+-
as long as it is not parsed as a number{
or }
are identifiers\
or |
in symbol#{
and }
#2r
, #3r
, #4r
, ..., #36r
. Digit values from 10 through 35 are specified as either lower- or upper-case alphabetic characters, just as for hexadecimal numbers.#\bel
, #\ls
, #\nel
, #\nul
, #\rubout
, #\vt
, #\vtab
#\
followed by a three octal digit sequence#vfx()
$primitive
form #%xxx
#!eof
, #!bwp
#true
, #false
Hi,
Given this grammar for scheme and emacs 21.1 with tree-sitter support, is there an emacs mode that uses this?
It would be nice to be mentioned if that is the case.
If not, are there any plans to add / support one?
Thanks
I'm trying to install this package from npm, but I end up with this error:
PS C:\Users\jackl> npm install -g tree-sitter-scheme
npm ERR! code 1
npm ERR! path C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
npm ERR!
npm ERR! parser.c
npm ERR! binding.cc
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,11): error C2065: 'Handle': undeclared identifier [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,18): error C2275: 'v8::Object': expected an expression instead of a type [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,26): error C2065: 'exports': undeclared identifier [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,35): error C2065: 'Handle': undeclared identifier [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,42): error C2275: 'v8::Object': expected an expression instead of a type [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,50): error C2065: 'module': undeclared identifier [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,6): error C2182: 'Init': this use of 'void' is not valid [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,58): error C2143: syntax error: missing ';' before '{' [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(13,58): error C2447: '{': missing function header (old-style formal list?) [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\src\binding.cc(26,1): warning C4312: 'type cast': conversion from 'int' to 'node::addon_register_func' of greater size [C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme\build\tree_sitter_scheme_binding.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.8.10 found at "C:\Users\jackl\AppData\Local\Programs\Python\Python38\python.exe"
npm ERR! gyp info find VS using VS2022 (17.5.33530.505) found at:
npm ERR! gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\jackl\AppData\Local\Programs\Python\Python38\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\jackl\\AppData\\Roaming\\npm\\node_modules\\tree-sitter-scheme\\build\\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\\Users\\jackl\\AppData\\Local\\node-gyp\\Cache\\18.17.1\\include\\node\\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\jackl\\AppData\\Local\\node-gyp\\Cache\\18.17.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\jackl\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\18.17.1\\\\<(target_arch)\\\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\jackl\\AppData\\Roaming\\npm\\node_modules\\tree-sitter-scheme',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\\Users\\jackl\\AppData\\Roaming\\npm\\node_modules\\tree-sitter-scheme\\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'build/binding.sln',
npm ERR! gyp info spawn args '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args '/nologo',
npm ERR! gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\jackl\AppData\Roaming\npm\node_modules\tree-sitter-scheme
npm ERR! gyp ERR! node -v v18.17.1
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in: C:\Users\jackl\AppData\Local\npm-cache\_logs\2023-08-19T21_31_03_172Z-debug-0.log
I'm not sure if it's something on my end or if the package doesn't support Windows. Thanks for the help!
No description provided.
This is a tracking issue for Guile Scheme support.
It supports R5RS, part R6RS and R7RS.
Their formal grammar can be found at R5RS Lexical structure section, and R6RS support, R7RS support
All extensions are obtained by search read syntax
.
#:xxx
\|
, \(
, \0
in string\xHH
, \uHHHH
, \uHHHHHH
#! any thing !#
extra features which incompatible with RnRS are omit.
Hey 6cdh,
just wanted to let you know that I have a working R5RS and most of R7RS tree-sitter grammar.
Maybe you want to join efforts.
Let me know.
Thomas
This is a tracking issue for Chicken Scheme support.
The specific syntax can be found at Chicken Scheme Syntax.
Chicken Scheme support R5RS with extension:
|
[
and {
are alternative as (
#\xXX
where XX
specifies the character code in hexadecimal#\uXXXX
or #\UXXXXXXXX
#\tab #\linefeed #\return #\alarm #\vtab #\nul #\page #\esc #\delete #\backspace
\n\r\b\t\v\a\f
\xXX\uXXXX\UXXXXXXXX
#|
and |#
#;
#, #$
#${ ... }
#:
#<<
#<#
#> ... <#
#!
#cs
, #ci
#+
The comment block seems to end at the first |#
pair, rather than the last matching one.
#| Block comments
can span multiple lines and...
#| can be nested
|#
|#
Will there be a support for Guile Scheme?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.