Open Himujjal opened 3 years ago
Based on my experience trying to reduce the size of tree-sitter-vhdl, conflicts on expression primaries and with extras
rules increases the size of generated parser exponentially.
Removing primitives_type
(that conflicts with identifier) from zigs grammar, reduces the size in 5 MB.
Removing multiline_string_literal
(that, I think, its conflicting with extra
), reduces another 7 MB.
I added $._identifier_text
to word, that you already seems to have done but it isn't in the repo.
word: $ => $._identifier_text,
Related to #693.
hmm. thanks for this. i will be rewriting the whole grammar from scratch using another grammar. Please can you still keep this query open?
I was writing tree-sitter-zig grammar. The generated file size is 25 MB. 25 MB is really huge for the generated C file. Even TypeScript which is a huge language, has a file size of 8.7MB.
What are the ways to optimize this?