{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicpuyhg2myp42tekj4ytmerspfdzxvchu2dzjrs4ta3krmxdd6ibm",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mlkvrspnitw2"
  },
  "path": "/t/how-to-parse-specific-syntax-elements-and-discard-the-rest/14047#post_6",
  "publishedAt": "2026-05-11T08:30:28.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "VegOwOtenks:\n\n> What you’re describing sounds very similar to the `find-all-matches` mode of regular expression drivers.\n\nCool! I didn’t think about making a `findAll` function. Thanks for the idea.\n\nVegOwOtenks:\n\n> Assuming, it’s impossible to mistake your token for another token in the target language if context is missing. E.g. it would be impossible to exclusively find all variable names in Rust code because they overlap with Type Identifiers and more.\n\nThat is true. I realized this a while after posting this. When trimming away the first character a non path syntax element might become a valid syntax element, and this is not what I want. Furthermore, I can’t distinguish whether the path I found is in a string literal or not, which is also not what I want. I think I’ll go with the Haskell nix parser route.",
  "title": "How to parse specific syntax elements and discard the rest?"
}