#lexer — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #lexer, aggregated by home.social.
-
Damn. My PLY lexer doesn't recognize hexadecimal numbers, it recognizes them as decimal(0) and symbol(x1).
edit: oh, it's a matter of definition order.
-
Компилятор языка моделирования в одиночку: от C++ к Rust — находки и откровения
Тема специального языка для моделирования многокомпонентных динамических систем давно меня зацепила и хотелось написать свою реализацию для него, так как было жгучее желание сделать лучше: чтобы работало надёжнее и быстрее, чем у авторов языка (MVL - в статье подробнее про язык), и к тому же ещё и кроссплатформенно. Расскажу про заходы к задаче на C++, почему перешёл в итоге к Rust - что приобрёл, где потерял - поделюсь деталями и самой реализации, которые, надеюсь, будут интересны и растаманам, и плюсовикам, и всем прочим доморощенным компиляторостроителям, а также тем, кого привлекают темы реализации языков, DSL или численного моделирования.
https://habr.com/ru/articles/980924/
#compiler_development #индиразработка #язык_моделирования #AnyDynamics #MVL #parser #lexer #lalrpop #lexgen #dsl
-
Компилятор языка моделирования в одиночку: от C++ к Rust — находки и откровения
Тема специального языка для моделирования многокомпонентных динамических систем давно меня зацепила и хотелось написать свою реализацию для него, так как было жгучее желание сделать лучше: чтобы работало надёжнее и быстрее, чем у авторов языка (MVL - в статье подробнее про язык), и к тому же ещё и кроссплатформенно. Расскажу про заходы к задаче на C++, почему перешёл в итоге к Rust - что приобрёл, где потерял - поделюсь деталями и самой реализации, которые, надеюсь, будут интересны и растаманам, и плюсовикам, и всем прочим доморощенным компиляторостроителям, а также тем, кого привлекают темы реализации языков, DSL или численного моделирования.
https://habr.com/ru/articles/980924/
#compiler_development #индиразработка #язык_моделирования #AnyDynamics #MVL #parser #lexer #lalrpop #lexgen #dsl
-
Компилятор языка моделирования в одиночку: от C++ к Rust — находки и откровения
Тема специального языка для моделирования многокомпонентных динамических систем давно меня зацепила и хотелось написать свою реализацию для него, так как было жгучее желание сделать лучше: чтобы работало надёжнее и быстрее, чем у авторов языка (MVL - в статье подробнее про язык), и к тому же ещё и кроссплатформенно. Расскажу про заходы к задаче на C++, почему перешёл в итоге к Rust - что приобрёл, где потерял - поделюсь деталями и самой реализации, которые, надеюсь, будут интересны и растаманам, и плюсовикам, и всем прочим доморощенным компиляторостроителям, а также тем, кого привлекают темы реализации языков, DSL или численного моделирования.
https://habr.com/ru/articles/980924/
#compiler_development #индиразработка #язык_моделирования #AnyDynamics #MVL #parser #lexer #lalrpop #lexgen #dsl
-
Компилятор языка моделирования в одиночку: от C++ к Rust — находки и откровения
Тема специального языка для моделирования многокомпонентных динамических систем давно меня зацепила и хотелось написать свою реализацию для него, так как было жгучее желание сделать лучше: чтобы работало надёжнее и быстрее, чем у авторов языка (MVL - в статье подробнее про язык), и к тому же ещё и кроссплатформенно. Расскажу про заходы к задаче на C++, почему перешёл в итоге к Rust - что приобрёл, где потерял - поделюсь деталями и самой реализации, которые, надеюсь, будут интересны и растаманам, и плюсовикам, и всем прочим доморощенным компиляторостроителям, а также тем, кого привлекают темы реализации языков, DSL или численного моделирования.
https://habr.com/ru/articles/980924/
#compiler_development #индиразработка #язык_моделирования #AnyDynamics #MVL #parser #lexer #lalrpop #lexgen #dsl
-
Programming languages are absolutely mortified of strings, aren’t they. All those arbitrary words with their alien systems of meaning. They have nightmares about stumbling on an unterminated “ AND THEN EVERYTHI #programming #lexer #syntax #electricsheep
-
Wîhennahtwoche! Das heißt wîenechtfîrtage inklusive wîenahtâbent und wînahtnaht. Vielleicht auch mit wîenachtbrôt und weinachtkaese?
Diese und weitere weihnachtliche Lemmata findet man (auch über API) in den Mittelhochdeutschen Wörterbüchern https://woerterbuchnetz.de/ #Lexer #BMZ #Findebuch #LODvent
-
To double quote or not, that's the question!
🔍 #PHP string interpolation occurs at compile-time, not runtime
🏎️ #SingleQuotes vs #DoubleQuotes debate: negligible performance difference
💻 #OPcache is crucial for optimizing PHP performance
🔧 #Lexer handles string interpolation during tokenization
🧠 #AST and opcode generation treat single and double quotes similarly
📊 #StringConcatenation options: interpolation, comma separation, or dot operator
Key takeaway: Use the latest #PHP version, enable #OPcache, and choose quotes based on readability, not micro-optimizations.
https://dev.to/realflowcontrol/too-double-quote-or-not-thats-the-question-78l
-
To double quote or not, that's the question!
🔍 #PHP string interpolation occurs at compile-time, not runtime
🏎️ #SingleQuotes vs #DoubleQuotes debate: negligible performance difference
💻 #OPcache is crucial for optimizing PHP performance
🔧 #Lexer handles string interpolation during tokenization
🧠 #AST and opcode generation treat single and double quotes similarly
📊 #StringConcatenation options: interpolation, comma separation, or dot operator
Key takeaway: Use the latest #PHP version, enable #OPcache, and choose quotes based on readability, not micro-optimizations.
https://dev.to/realflowcontrol/too-double-quote-or-not-thats-the-question-78l
-
To double quote or not, that's the question!
🔍 #PHP string interpolation occurs at compile-time, not runtime
🏎️ #SingleQuotes vs #DoubleQuotes debate: negligible performance difference
💻 #OPcache is crucial for optimizing PHP performance
🔧 #Lexer handles string interpolation during tokenization
🧠 #AST and opcode generation treat single and double quotes similarly
📊 #StringConcatenation options: interpolation, comma separation, or dot operator
Key takeaway: Use the latest #PHP version, enable #OPcache, and choose quotes based on readability, not micro-optimizations.
https://dev.to/realflowcontrol/too-double-quote-or-not-thats-the-question-78l
-
To double quote or not, that's the question!
🔍 #PHP string interpolation occurs at compile-time, not runtime
🏎️ #SingleQuotes vs #DoubleQuotes debate: negligible performance difference
💻 #OPcache is crucial for optimizing PHP performance
🔧 #Lexer handles string interpolation during tokenization
🧠 #AST and opcode generation treat single and double quotes similarly
📊 #StringConcatenation options: interpolation, comma separation, or dot operator
Key takeaway: Use the latest #PHP version, enable #OPcache, and choose quotes based on readability, not micro-optimizations.
https://dev.to/realflowcontrol/too-double-quote-or-not-thats-the-question-78l
-
To double quote or not, that's the question!
🔍 #PHP string interpolation occurs at compile-time, not runtime
🏎️ #SingleQuotes vs #DoubleQuotes debate: negligible performance difference
💻 #OPcache is crucial for optimizing PHP performance
🔧 #Lexer handles string interpolation during tokenization
🧠 #AST and opcode generation treat single and double quotes similarly
📊 #StringConcatenation options: interpolation, comma separation, or dot operator
Key takeaway: Use the latest #PHP version, enable #OPcache, and choose quotes based on readability, not micro-optimizations.
https://dev.to/realflowcontrol/too-double-quote-or-not-thats-the-question-78l
-
SemVer grammar for Plex
Supports referencing other grammar rules by name using the (?&NAME) syntax, where NAME is the name of the grammar rule.
https://github.com/ghostwriter/plex
-
Компилятор за выходные: лексер и парсер
Продолжаем разговор. На прошлой неделе я пообещал за выходные написать компилятор из простенького мной придуманного языка в ассемблер. В назначенное время уложился, и компилятор даже вроде работает, см. заглавную картинку. Теперь дело за малым, потихоньку причесать и стройно изложить. На прошлой неделе я рассказал про синтаксические деревья и показал простейший транслятор в питон (по факту, обычный pretty print дерева). Но если в прошлой статье я синтаксическое дерево строил вручную, то сегодня всё же будем автоматизировать процесс. Сегодня я публикую две статьи разом, поскольку по дороге меня довольно круто занесло, и получился небольшой спин-офф . Очень рекомендую к прочтению :) Ну а тема этой статьи - автоматическое построение синтаксического дерево aka лексер и парсер.
https://habr.com/ru/articles/787800/
#азы_программирования #компилятор #синтаксическое_дерево #lexer #parser #программирование_для_пятого_класса
-
Beating the Fastest Lexer Generator in Rust, https://alic.dev/blog/fast-lexing.
-
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!
-
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.)
-
Interpreters in Scala - You might think of interpreters as only good for writing programs. Many people lea... - https://hackaday.com/2021/07/16/interpreters-in-scala/ #softwaredevelopment #interpreter #parser #lexer #scala
-
Customer data platform Lexer raises $25.5M Series B for global expansion - Left to right: Lexer founders Dave Whittle, Aaron Wallis, Chris Brewer
The massive shift to online s... - http://feedproxy.google.com/~r/Techcrunch/~3/JW-6x_hDl54/ #customerdataplatform #fundings&exits #australia #ecommerce #startups #lexer #tc -
#re2c is a fast #lexer generator.
re2c is a #publicdomain generator for #C or #Cpp programs that tokenize an input string and execute code based on the tokens found. re2c uses regexes (with optional submatches) for pattern matching, which is performed using a highly efficient goto-based state machine. re2c is very configurable and can accept many different input encodings.
Website 🔗️: https://re2c.org/
apt 📦️: re2c
#free #opensource #foss #fossmendations #programming #Cplusplus