home.social

#pyparsing — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #pyparsing, aggregated by home.social.

  1. Парсер для подростков с помощью pyparsing

    Привет, Хабр! Если ты подросток и начинаешь свой путь в программировании, или просто хочешь понять, как программы анализируют текст и превращают его в структуру, эта статья для тебя. Сегодня поговорим о том, что такое парсер, зачем он нужен и как с помощью библиотеки pyparsing создать свой собственный парсер — основу для мини‑языка. Разберём, как создать парсер для арифметических выражений, добавить поддержку скобок, встроить вычисление выражений, работать с переменными и обрабатывать ошибки.

    habr.com/ru/companies/otus/art

    #python #парсер #pyparsing

  2. I just released pyparsing 3.2.1 with a very cool addition to the railroad diagrams that pyparsing generates for its parsers - non-terminal diagram elements now link to their definitions elsewhere in the diagram! This is pretty handy when the diagram is for a complex parser, as in this demo of a parser/evaluator for time references like "3 weeks from today" or "0800 two days from now" or "in exactly twenty-four hours".

  3. Attention pyparsing users: I just pushed release 3.2.0b1 which mostly just drops support for Python 3.6-3.8, but also changes some exception messages. Please give this release a try before I push the final release in early October.

    Also includes:
    - some nice enhancements to mongodb_query_expression.py
    - a parser for the Lox language defined in Robert Nystrom's "Crafting Interpreters"

    Full release notes here: github.com/pyparsing/pyparsing