... That's all very well, but if it's supposed to give you associativity, then why can't you define the '=' assignment operator to be right-associative, ...
Rainer Thonnes
rainer@...
Apr 1, 2008 9:07 am
925
... rules ... Because the version of the parser you are talking about was the old operator precedence parser, in which assignment was never really parsed as an...
... OK ... If you can get your TD parser to match the structure of its rules to the structure of the parse tree it returns, then you could build associativity...
Rainer Thonnes
rainer@...
Apr 1, 2008 1:57 pm
927
... I've been thinking about that and some way of linking a 'next op' to an operator that would generalise the whole infix/outfix thing. I.e. the "Insane...
Ok I'm supremely proud of myself tonight(yes yes it might be small to you all knowing guys ;), I didn't (well not yet, and the night is still young) get to...
... Not bad, but are you using a "private definition" by which "++d" means "d+1"? I think most of us would expect "(b=++d)" to mean "(b=(d=d+1))", and so your...
Rainer Thonnes
rainer@...
Apr 1, 2008 4:41 pm
930
... Excuse me for a second. (ROFL Chortle Ho ho ho!) OK, I'm back :-) Been there, done that. Quite recently actually, in fact just this morning! I was...
... as i said an abortion of a language feature, since I expect it to mean (b = (d = d+1, d)) :-) At least in this particular context. It actually gets quite...
Interestingly, it was the ++ and -- operators that actually spurred me to rewrite the lexer, Python doesn't have increment/decrement operators(the language i...
... Don't ask me, I have no frickin' idea! Even though in C the && and || are sequence points, the '=' isn't which makes it quite undefined. Quite often when...
... Tim, the zip is missing and I was hoping to download and try your code. Liked the top-down parser so far, and I'm looking forward to seeing you add some ...
from http://bytes.com/forum/thread216373.html "A sequence point is a point of time in the evaluation of a C expression, where all side effects are guaranteed...
Oops, try http://gallery.hiddenworlds.org/srcpck.zip :) I can change the style to any colours you like, and my lexer probably wouldn't like python yet since it...
... after finding it in the compilers subdirectory and downloading, I got this: gtoal@linux:~/public_html/compilers101/intro/tim> unzip *zip Archive:...
Ok all fixed, it was probably a combination of things, probably most of all the fact that I've never coded anything ftp before, i assumed using the python...
Here's a guy who thinks a lot like we do... There's at least 2 articles in here that should be of interest... http://tratt.net/laurie/tech_articles/ G...
There's some interesting stuff in there, things that I think I will come back to, I was most interested in his article about novel language features, seems all...
... It may be easier to move to your top-down parser now and add the data structure to that, then come back to see how you would add the same structure to the...
... It's amazingly easy to get lazy and slip into using "X++" all the time. But "X += 1" is just as bad (well, OK, half as bad). If you want your soul to...
Rainer Thonnes
rainer@...
Apr 2, 2008 8:13 pm
945
Ok this was much easier once someone put my on the right path :) I was in a way already using a stack, but I'd implemented it implicitly inside the recursive...
Tim, I spotted your nice tree pics this morning: http://gallery.hiddenworlds.org/compiler/syntax_tree.png Nicer than ascii art if you can assume a web page to...
It’s been a busy day, but I’ve managed to get the syntax tree implementation mostly(more on this in a bit) working and implemented a couple of ‘dumb’ ...
I just thought of another couple of things I wanted to bring up: Should I leave all the syntax tree nodes fully expanded, or should I make it more like an...
... Don't know the language but it looks like you're exposing a local static. If you don't like the structure, refactor it and make the part that is common to...
... I see you've reinvented Lisp :-) There's a reason Lisp looks like it does - and why it was implemented the way it was. It's actually a good paradigm for a...
... ?array of tokens you won't have to worry about lookahead any more :-) Interestingly, the whole source code is tokenised on the first call to get_symbol...
... I have no idea what you're talking about, must be that 'object oriented' stuff all the kids are using nowadays ;-) It does sound awfully complicated...