robrix / Hammer

Parsing and pattern matching in Objective-C
BSD 3-Clause "New" or "Revised" License
75 stars 1 forks source link

Bind & null are extremely similar #94

Open robrix opened 10 years ago

robrix commented 10 years ago

Instead of binding out to a thread local array during pattern matching, capturing the result would allow us to handle backtracking/etc more naturally and would reuse the existing machinery for parse forests.

robrix commented 10 years ago

Key difference is that the null reduction combinator matches the empty string, while bind matches everything. But it still seems related.