ThomasMertes / seed7

Source code of Seed7
GNU General Public License v2.0
207 stars 11 forks source link

Is there a tree-sitter or grammar specification? #13

Closed swork1 closed 1 year ago

swork1 commented 1 year ago

I was wondering if seed7 already has a tree-sitter implementation somewhere. If not, is there a grammar specification I can bounce off of when create the tree-sitter?

ThomasMertes commented 1 year ago

There is no tree-sitter implementation of Seed7 that I know of. Seed7 uses the Seed7 Structured Syntax Description (see: https://seed7.sourceforge.net/manual/syntax.htm), to describe its syntax. Most syntax definitions of Seed7 can be found in the file lib/syntax.s7i. But since the syntax of Seed7 can be improved in any program or library some syntax descriptions are outside of lib/syntax.s7i. The syntax of comments and literals is hard coded and can be found here: https://seed7.sourceforge.net/manual/tokens.htm