I wrote a #parser in #go this week for a custom file format that has a similar, yet distinct enough grammar from C-like languages that nothing worked out of the box. I was on a roll finding a library that gave me a customisable #lexer, then completely hit a wall on the parser. Turns out just writing it yourself in a bunch of functions over a number of files is way faster and more flexible than any library out there!
🔊 #NowPlaying on BBCRadio1's #PowerDownPlaylist with #SianEleri
Lexer:
🎵 This World (feat. IDER)
https://thisneverhappenedlabel.bandcamp.com/album/this-world-feat-ider
#nowplaying #powerdownplaylist #sianeleri #bbcr1 #lexer
🔊 #NowPlaying on BBCRadio1's #PowerDownPlaylist with #SianEleri
Lexer:
🎵 Never Said Goodbye (feat. Jens Kuross)
https://open.spotify.com/track/1msjh5u6Mn6BlLv7hoAfOg
https://thisneverhappenedlabel.bandcamp.com/track/never-said-goodbye-feat-jens-kuross-extended-mix
#nowplaying #powerdownplaylist #sianeleri #bbcr1 #lexer
So this just happened...
Working on an #LALR #Parser generator with #DFA and wanted a diagram illustrating their relationship, so I googled it. :blobcatcoffee:
#parsing #lexer #automata #programming #humor #relationships
#lalr #parser #dfa #parsing #lexer #automata #programming #humor #relationships
Anyone have experience with formal #lexer / #parser libraries in #python? (e.g. lark)
I have a feature request for jc to parse the output of scutils and ipconfig on macOS (not Windows ipconfig), but it looks like a formal grammar to me - not something you could parse with a simple custom parser or regex.
Anyone have experience with formal #lexer / #parser libraries in #python? (e.g. lark)
I have a feature request for jc to parse the output of scutils and ipconfig on macOS (not Windows ipconfig), but it looks like a formal grammar to me - not something you could parse with a simple custom parser or regex.
One of my favorite #lexer techniques is, if the host language supports it, to write a big regex with named capture groups and abuse leftmost-longest semantics and zero-width assertions to iterate over all the tokens in the input.
It can get unwieldy for some things, but a lexer for Manatee is a single 33 line regex.
(Obviously the regex can't, e.g., convert numeric lexemes to numeric type, but for the actual tokenization, it works really well and can be very fast.)
One of my favorite #lexer techniques is, if the host language supports it, to write a big regex with named capture groups and abuse leftmost-longest semantics and zero-width assertions to iterate over all the tokens in the input.
It can get unwieldy for some things, but a lexer for Manatee is a single 33 line regex.
(Obviously the regex can't, e.g., convert numeric lexemes to numeric type, but for the actual tokenization, it works really well and can be very fast.)
🔊 #NowPlaying on BBCRadio1's #Radio1sPowerDownPlaylistWithSianEleri
Lexer:
🎵 This World (feat. IDER)
#nowplaying #Radio1sPowerDownPlaylistWithSianEleri #bbcr1 #lexer
Teacher in #Maths & #ComputerScience #numérique, #sciences #informatiques #NSI.
Toot on #Science, #Tech, #Education, #Politics, and any stuff. #introduction
RTs≠Endorsement.
#OpenSource #foss #developer
#mkdocs extensions & add-ons :
#mkdocs-#graphviz , #mkdocs-#asy ,
#Massilia CSS/Javascript add-ons for #mkdocs.
#Pygments (French) #Pseudocode #lexer.
#OpenEducation #OpenEdu
Sites : #mkhack3rs #eskool
(ex?)Twitter/Gitlab/Github @rod2ik
#maths #computerscience #numerique #sciences #informatiques #nsi #science #tech #education #politics #introduction #free #opensource #foss #developer #mkdocs #graphviz #asy #massilia #pygments #pseudocode #lexer #openeducation #openedu #mkhack3rs #eskool