You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand correctly, Rowan's use in rust-analyzer relies on a recursive descent parser that emits events for nodes beginning or ending and those events are converted by a TreeSink into calls to GreenNodeBuilder's start_node and finish_node.
I'm wondering if it could make sense to use Rowan's syntax tree abstraction with a different sort of parser, say GLR for example, which uses a shift-reduce mechanism for constructing trees and may even fork at some point to attempt multiple non-deterministic branches of the grammar in parallel. In such an algorithm, the context may not be known in advance, so nodes would have to be combined differently.
Can you clarify how I might accomplish this? Would I just make a different Builder abstraction?
The text was updated successfully, but these errors were encountered:
If I understand correctly, Rowan's use in rust-analyzer relies on a recursive descent parser that emits events for nodes beginning or ending and those events are converted by a TreeSink into calls to GreenNodeBuilder's start_node and finish_node.
I'm wondering if it could make sense to use Rowan's syntax tree abstraction with a different sort of parser, say GLR for example, which uses a shift-reduce mechanism for constructing trees and may even fork at some point to attempt multiple non-deterministic branches of the grammar in parallel. In such an algorithm, the context may not be known in advance, so nodes would have to be combined differently.
Can you clarify how I might accomplish this? Would I just make a different Builder abstraction?
The text was updated successfully, but these errors were encountered: