Interesting Blog Post On Parsers

30 views
Skip to first unread message

Thomas Passin

unread,
Oct 10, 2022, 6:00:41 PM10/10/22
to leo-editor
It's possible to imagine doing more with the text of Leo nodes, such as supporting syntax checking during typing for a range of languages.   Here is an interesting post (interesting if you are interested in parsers and parser techniques, anyway) especially for parsers to be used in editors -  Lezer.

jkn

unread,
Oct 11, 2022, 3:04:32 AM10/11/22
to leo-editor
Thanks, that looks like a good read
J^n

Edward K. Ream

unread,
Oct 12, 2022, 11:35:01 AM10/12/22
to leo-editor
On Monday, October 10, 2022 at 5:00:41 PM UTC-5 tbp1...@gmail.com wrote:
It's possible to imagine doing more with the text of Leo nodes, such as supporting syntax checking during typing for a range of languages. 

Thanks for the link. I just briefly scanned the post about Lezer. It illustrates the joy of engineering :-)

Leo's syntax coloring and importers are highly optimized examples of the general parsing/tokenizing problem. Both have gone through multiple iterations.

Leo's syntax coloring is (indirectly) driven by jEdit language description files. Leo's code depends on the details of Qt's syntax coloring classes, so adapting Leo's code to vs-code might be challenging.

Leo's importers use per-language syntax (token) tables. leoJS could probably use the importer scheme without major changes.

I'll leave my comments at that for now.

Edward


Reply all
Reply to author
Forward
0 new messages