1. 11
  1. 4

    the approach of having your parser written in a DSL inside a string is so jarringly modern to see used in C.

    1. 1

      But then what’s jarring in the other direction is how the lexer uses some behind-the-scenes global state instead of an explicit instance: clexRegisterKind("return", RETURN) :/

      1. 2

        Issue created. Will look into fixing it when I have time.

    2. 1

      Is it possible to construct the grammar manually with a C API instead of strings?

      1. 2

        Not yet, but if you make an issue in GitHub I might look into implementing it.

        1. 1

          Cool! I may or may not have time/energy but no pressure. It’s an idle question

          1. 2

            Issue created. Will look into fixing it when I have time.

      Stories with similar links:

      1. cparse is an LR(1) parser generator for C authored by jafarlihi 6 months ago | 6 points | 8 comments