Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
my ears are burning... ;)
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Clifford Heath, post: 4620318"] Such protocols always consist of a continuous stream of packets, and you can parse those one by one. That's not what happens with Treetop, which is pure PEG, and emits more useful error messages that most hard-core parsers. It simply records for the furthermost failure point which terminals would have allowed it to get further. Cheap and cheerful, but eminently comprehensible to a human. I should say that the goal of Treetop is different from most parser generators - it's to be able to incrementally re-parse input that's being edited with insertions and deletions, using whatever is still valid of the memoization. Nathan's still working on subtle bugs in the invalidation mechanism, but I think it's an interesting project, no? That's not as much of an issue as you might think. Many actions down in the leaves can be side-effect free, so the effects get lost when that branch is abandoned. Near the top of the tree there are very often rules that cannot backtrack, and actions with side-effects are ok there. It does take a little care and comprehension, but all coding does. At present, Treetop offers no mechanism for runtime execution, unless you build it into the constructors of custom SyntaxNodes. I believe I've established some counter-arguments, though in general I agree that avoidance of backtracking is preferable if you have an effective tool for it. I'd like to find the time to make ANTLR work properly with Ruby, but I already have a (more) significant project under way. Maybe Eric will do it? Clifford Heath. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
my ears are burning... ;)
Top