· @lasagne
27 followers · 166 posts · Server hostux.social

I wrote a in 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 , 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!

#parser #go #lexer

Last updated 1 year ago

· @BBC1MusicBot
7 followers · 15219 posts · Server mastodonapp.uk
· @BBC1MusicBot
8 followers · 9650 posts · Server mastodonapp.uk

So this just happened...

Working on an generator with and wanted a diagram illustrating their relationship, so I googled it. :blobcatcoffee:

#lalr #parser #dfa #parsing #lexer #automata #programming #humor #relationships

Last updated 2 years ago

Kelly Brazil · @kellyjonbrazil
87 followers · 101 posts · Server sfba.social

Anyone have experience with formal / libraries in ? (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.

github.com/kellyjonbrazil/jc/i

#lexer #parser #python

Last updated 2 years ago

Kelly Brazil · @kellyjonbrazil
91 followers · 111 posts · Server sfba.social

Anyone have experience with formal / libraries in ? (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.

github.com/kellyjonbrazil/jc/i

#lexer #parser #python

Last updated 2 years ago

lorddimwit · @lorddimwit
238 followers · 558 posts · Server mastodon.social

One of my favorite 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.)

#lexer #parsing

Last updated 2 years ago

lorddimwit · @lorddimwit
332 followers · 1478 posts · Server mastodon.social

One of my favorite 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.)

#lexer #parsing

Last updated 2 years ago

🔊 on BBCRadio1's

Lexer:
🎵 This World (feat. IDER)

#nowplaying #Radio1sPowerDownPlaylistWithSianEleri #bbcr1 #lexer

Last updated 2 years ago

Dipti · @dipti
26 followers · 85 posts · Server astrodon.social

Yes, dear machine, humans sometimes swear when emotions are high.

#writing #scifi #ltex #lexer

Last updated 2 years ago

Alfonso Siciliano · @alfonsosiciliano
95 followers · 391 posts · Server bsd.network

Compiling my software by my :flan_aww:​

#compiler #coding #ast #lexer #parser #semant #oop

Last updated 5 years ago