Once you have the AST, it's easy to cross reference. So that's very easy.
-
-
Well, what "AST" are you going to make out of: a = (b)-d; ?
2 replies 0 retweets 3 likes -
Replying to @cmuratori @kssreeram and
Because if b is a type, the AST for the LHS is cast-expr b left and unary minus d right.
1 reply 0 retweets 0 likes -
Replying to @cmuratori @kssreeram and
But if b is a global variable, the AST for the LHS is binary subtraction with left b right d.
1 reply 0 retweets 0 likes -
Replying to @cmuratori @kssreeram and
So I don't see how that's a "simple cross-reference"?
1 reply 0 retweets 0 likes -
That's a great example. I'll write a gist and post the link. Hard to fit in a tweet.
1 reply 0 retweets 1 like -
Cool!
1 reply 0 retweets 0 likes -
Here’s one simple way to model C ambiguity: https://gist.github.com/kssreeram/a6f094c9caa8ed62461d29f398631fd0#gistcomment-1812625 …
1 reply 0 retweets 2 likes -
Replying to @kssreeram @cmuratori and
And you won't need fancy parsers. Simple RD will do.
1 reply 0 retweets 1 like -
I protest! :) That still requires a pausable parser, you've just moved the pausing part to later!
2 replies 0 retweets 0 likes
I could say "here I parsed this!" by just giving you a big AST that had only one node type.
-
-
Replying to @cmuratori @kssreeram and
That node type is just "thing" and on the left is a token and on the right is another "thing".
1 reply 0 retweets 0 likes -
Replying to @cmuratori @kssreeram and
But that _didn't parse the input_. The input is only parsed when the _correct_ meaning exists.
2 replies 0 retweets 0 likes - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.