What are the best (and ideally still in print) textbooks that cover parsing expression grammars (PEGs) and Packrat parsers?
#ComputerScience #ProgrammingLanguages #ProgrammingLanguageTheory #Programming #Parsers #Parsing #PEG #Learning #Textbooks
#computerscience #programminglanguages #programminglanguagetheory #programming #parsers #parsing #peg #learning #textbooks
@clementd They certainly are extremely handy. And apparently these people have even found a way to make them extremely performant, i.e., only about 50% slower than a bison generated parser: https://dl.acm.org/doi/epdf/10.1145/3409002
#stagedmetaprogramming #parsers #TemplateHaskell #haskell
Aaaaaand... it's out! Pyparsing 3.1.0a1 pre-release available for testing. As easy as firing up a new virtual environment and then `pip install pyparsing==3.1.0a1`! #pyparsing #python #parsers
I am fascinated by the elegantly hand-crafted recursive-descent LL(1) #parsers, which were invented by Stearns and Lewis way back in 1969, when even the most powerful machines still had magnetic cores and drums.
I am fascinated by the elegantly hand-crafted recursive-descent LL(1) #parsers invented by Stearns and Lewis way back in 1969, when even the most powerful machines still had magnetic cores and drums.
@underlap
I second monadic #parsers, both useful and #elegant in the extreme. But this doesn't just apply to parsers of languages, it applies to parsers of binary, and of wire protocols as well.
My next favorite use case for #monads is sort of the inverse operation of parsers: #ProceduralGeneration. Think of list comprehension (which in #Haskell is just syntactic sugar around a monad), but applied to any data structure at all (trees, directed graphs). You define a monad that contains state and constraint rules, and then use the monad to define the production rules for each node of the structure.
When I define a parser, I also often define a procedural generator to test the parser. It is easier to generate than to parse, so I can quickly write tests that genreate random grammatically correct syntax trees and see if the parser can parse anything I throw at it.
#parsers #elegant #monads #proceduralgeneration #haskell
Hello everyone! Moved instances so thought it would be a good time for a proper #introduction. Interests include:
* #music (#punk, #soul, #funk, #hipHop)
* #rust, #javascript, #plt, #parsers, #compilers
* #nintendo, #games
and combinations of all the above.
I work as a software architect (whatever that means) and live in southern california.
#Introduction #Music #punk #soul #funk #hiphop #rust #javascript #plt #parsers #compilers #nintendo #games #antifascist
Me: keyword
Lexer: looks good to me
Me: keyword
Lexer: yep no problem
Me: so what is this keyword
Lexer: identifier
Me: keyword
Lexer: looks good to me
Me: keyword
Lexer: yep no problem
Me: so what is this keyword
Lexer: identifier
An amazing paper on training #rgg #parsers on only a limited amount of #annotated #data on #low_resource_languages, in this case #Daakaka, by @texttheater, @laurakallmeyer, Jakub Waszczuk, @kilu, Tatiana Bladier, & Simon Petitjean (all affiliated with @HHU).
#linguistics #deeplearning #computationalLinguistics, #lowresourcelanguages
#rgg #parsers #annotated #data #low_resource_languages #daakaka #linguistics #deeplearning #computationallinguistics #LowResourceLanguages
extract main article from given URL with Node.js
https://github.com/extractus/article-extractor
#ArticleExtractor #parsers #extractors #tools #JavaScript #NodeJs #DevEx
#articleextractor #parsers #extractors #tools #javascript #nodejs #devex
Anyway, I’m getting close to having a manual visitor running for a subset of S-expressions (variants).
What I’m afraid of is that there is no clear uniform interface for futures or readers (buffered or otherwise, sync or async) in the ecosystem, which makes it impossible to reuse parsers in other libraries (yojson, sexplib, tyxml, etc) out of the box.
Some say this is a feature. But in this case it looks like I’m going to have to borrow a lot of code to make these #parsers fit into #serde.ml
lrlna, an #introduction!
I am Ukrainian-Canadian software engineer living in Copenhagen. I do #compilers, #parsers, #rust.
I am into #plants and #gardening, and grow a bit of food and flowers on my balcony.
I make #zines! Some computer related, some are #art projects. I am recently into #risograph printing (#riso community anyone??).
I'll occasionally also toot about #hiking, #literature, #poetry and my #cats (ok fine,,,,, a lot about cats).
🕯️ hoping for a cozy community 🕯️
(boosts okkkk)
#cats #poetry #literature #hiking #riso #risograph #art #zines #gardening #plants #rust #parsers #compilers #introduction
Can all Context-Free Grammars be described in Backus-Naur Form/Syntax?
Is BNF a "form" like Chomsky Normal Form or Greiback Normal Form, or is it just a "syntax" that can encode all CFG's and all BNF documents describe a CFG (a bijective encoding)?
The internet only tells me things that are so Basic I don't trust them to know about such questions, or so advanced they already assume I know the answer to this X'D
#Math
#FormalGrammars
#ContextFreeGrammar
#BNF #EBNF #BackusNaur
#Parsing #Parsers
#parsers #parsing #BackusNaur #ebnf #bnf #ContextFreeGrammar #FormalGrammars #math
nlcst (https://github.com/syntax-tree/nlcst) looks quite appealing to me as something to create syntax trees out of natural language. I've loads of experience with its sister projects (hast, mdast, the unified ecosystem), gotta poke at it today.
I'm on a roll! 3 videos this week and I have a couple more coming. The parser is taking shape!
Language Hacking: Parsing Method Calls https://youtu.be/gBnuvL4yvm8
#programming #video #ruby #cpp #parsers
Language Hacking: Operator Precedence Parsing with PEG https://youtu.be/Pt7yCmgYySQ
#programming #video #ruby #cpp #parsers #peg
RT @idiWork@twitter.com
Check out the second part form our #Framework article by our greatest @SuperJMN@twitter.com where he explains what #parsers are and how to create your own #parsers using #Superpower, the parser combinator #framework by @nblumhardt@twitter.com
#net #Devs #Geek #tech
https://www.idiwork.com/superpower-the-parser-combinator-library-part-2/
#framework #parsers #superpower #net #devs #geek #tech