juan_gandhi: (VP)
[personal profile] juan_gandhi
1. Is it true that transforming a word in a context-free language into an AST takes linear time and finite space (except for the growing AST), so it could be done by an FSM? If so, all the stack requirements are about evaluating the trees...

2. Say, I have a language for some kind of expressions, and I want to use the fact that operations are associative (or maybe even commutative); is there a way to stipulate it somehow; or, rather, does it give us something that can be used to facilitate compilation? I wonder...

Date: 2014-06-23 05:28 pm (UTC)
From: [identity profile] thedeemon.livejournal.com
LR needs some temp storage that doesn't resemble parse tree, so it's hardly possible, however for recursive descent that's an interesting idea, yes. Needs some more thought and experiments to find the answer.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

June 2025

S M T W T F S
1 2345 6 7
8 9 10 11 121314
15161718 1920 21
222324252627 28
29 30     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 2nd, 2025 10:19 am
Powered by Dreamwidth Studios