Closed enjoysmath closed 1 year ago
You mean you want a language server for a language that is defined by a PEG? You will still have to implement some kind of semantic analyser, a parser alone will be insufficient. A language server needs to build a symbol table, and for that you need to know what rules in the grammar define symbols, and how scope works.
Or do you want some kind of syntax highlighting for the PEG grammar itself?
Yes, the first one.
On Fri, Oct 7, 2022 at 3:46 PM Bastiaan Veelo @.***> wrote:
You mean you want a language server for a language that is defined by a PEG? You will still have to implement some kind of semantic analyser, a parser alone will be insufficient. A language server needs to build a symbol table, and for that you need to know what rules in the grammar define symbols, and how scope works.
Or do you want some kind of syntax highlighting for the PEG grammar itself?
— Reply to this email directly, view it on GitHub https://github.com/PhilippeSigaud/Pegged/issues/315#issuecomment-1272141800, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMIF55RZMLS54MED5YFI53WCCR53ANCNFSM6AAAAAAQ7YR6A4 . You are receiving this because you authored the thread.Message ID: @.***>
You mean you want a language server for a language that is defined by a PEG? You will still have to implement some kind of semantic analyser, a parser alone will be insufficient. A language server needs to build a symbol table, and for that you need to know what rules in the grammar define symbols, and how scope works.
Or do you want some kind of syntax highlighting for the PEG grammar itself?
@veelo do you know of a good article on how to do that using a symbol table as you've mentioned?
Everyone wants to know this. Please show us how that would go. For example, can we view the grammar as a tree?
I guess we could use the provided PEG example in the example grammars and get a tree, but just wondering if anyone's already solved this problem.