[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter introduction documentation
From: |
Eli Zaretskii |
Subject: |
Re: Tree-sitter introduction documentation |
Date: |
Tue, 27 Dec 2022 19:10:55 +0200 |
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Dmitry Gutov <dgutov@yandex.ru>, theophilusx@gmail.com,
> emacs-devel@gnu.org
> Date: Tue, 27 Dec 2022 11:36:35 -0500
>
> > It doesn't need any project, it is literally two command lines.
> > Here's an example:
> >
> > gcc -O2 -I. -c -o parser.o parser.c
> > gcc -shared parser.o scanner.o -ltree-sitter -o
> > libtree-sitter-c-sharp.dll
>
> AFAIK `parser.c` is a file generated from the actual grammar's source,
> itself written in Javascript.
>
> So the above instructions are akin to downloading a precompiled binary
> and installing it. While it is the most convenient path for the
> end-users, it's important w.r.t Freedom to make sure that grammars can
> also be regenerated from source by the end users.
When you clone the Git repository of those grammar libraries (which
AFAIK is the only way to get their sources), you get all the source
files, including the Javascript sources of the grammar, the corpus of
text that they used, the test files, etc. You also get the C/C++
sources of the parser and the scanner (produced from the grammar
files), which you then need to compile and link into a library.
So in the above you are barking up the wrong tree, and you should know
me better than lecture me on software freedom and what it means.
- Re: Tree-sitter introduction documentation, (continued)
- Re: Tree-sitter introduction documentation, Yuan Fu, 2022/12/30
- Re: Tree-sitter introduction documentation, Stefan Monnier, 2022/12/30
- Re: Tree-sitter introduction documentation, Yuan Fu, 2022/12/31
- Re: Tree-sitter introduction documentation, Eli Zaretskii, 2022/12/31
- Re: Tree-sitter introduction documentation, Yuan Fu, 2022/12/31
- Re: Tree-sitter introduction documentation, Yuan Fu, 2022/12/31
- Re: Tree-sitter introduction documentation, Gregory Heytings, 2022/12/30
- Re: Tree-sitter introduction documentation, Richard Stallman, 2022/12/31
- Re: Tree-sitter introduction documentation,
Eli Zaretskii <=
- Re: Tree-sitter introduction documentation, Stefan Monnier, 2022/12/27
- Re: Tree-sitter introduction documentation, Eli Zaretskii, 2022/12/27
- Re: Tree-sitter introduction documentation, Stefan Monnier, 2022/12/27
- Re: Tree-sitter introduction documentation, Philip Kaludercic, 2022/12/27
- Re: Tree-sitter introduction documentation, Stefan Monnier, 2022/12/27
- Re: Tree-sitter introduction documentation, Yuan Fu, 2022/12/27
- Re: Tree-sitter introduction documentation, Gregory Heytings, 2022/12/28
- Re: Tree-sitter introduction documentation, Lynn Winebarger, 2022/12/28
- Re: Tree-sitter introduction documentation, Danny Freeman, 2022/12/28
- Re: Tree-sitter introduction documentation, Philip Kaludercic, 2022/12/29