1. 11

  2. 4

    http://rosie-lang.org/about/ is a much more useful URL.

    1. 4

      Rosie is based on PEG (Parsing Expression Grammar).

      The Rosie Pattern Language (RPL) addresses all of these scale challenges: big data is processed in linear time in the input size; packages of composable patterns are easily shared; and it has a readable syntax, with named patterns, flexible whitespace, and comments, like a programming language.

      Against these claims, the sections about advantages and disadvantages in the link above are worth considering: unlike for regular expressions, memory consumption is not constant and the choice operator (|) has a first-match semantics.

      1. 2

        Almost every implementation uses exponential backtracking, which can stall mining of big data, where input format anomalies are likely.

        This is not regular expression’s fault and there is a well known algorithm for turning nda’s into deterministic ones that I learned in sophomore year discrete structures. If you’re not using an implementation that compiles your regex in at least that basic way, then I’d start with that. Besides, if you have linear space requirements, then you might as well just use full CFG parsing, which is what PEG is, so one is not really a replacement for the other but an entirely different class of parser.

        1. 1

          What exactly is this? Instead of remembering a handful of regex syntax, we should use an English dictionary of names? This is exactly why Chinese are furious at English, “how can any humanly expression be expressed within the realm of 26 letters? No, capital letters do not count!”