Josh @ Dreamland
Prince of all Goldfish
 Joined: Feb 2008
Posts: 2,950
|
 |
Reply #45 Posted on: August 22, 2009, 01:34:27 AM |
|
|
|
Well, hey, if any of you experts want to show me how it's done, feel free. When your parser can outperform mine, I'll use it. It's that simple.
Until then, however, we'll be sticking with what I'm coding.
|
|
|
score_under
 Joined: Aug 2008
Posts: 308
|
 |
Reply #46 Posted on: August 24, 2009, 12:46:06 AM |
|
|
Quote from: miky on August 21, 2009, 05:14:18 PM Good thing you like fake, hard-coded, inflexible, unreadable, take-forever-to-write parsers.
Okay, let's pick that apart... Fake? It parses. There's no fake about it, and I can see no possible way for a working parser to be fake. Hard-coded/Inflexible? How do you make a fully-customizable parser, then? Why would you need to? Unreadable? You must have never touched a programming language before. Take-forever-to-write? Josh chooses how long Josh programs. Good thing I like trolls.
|
|
|
|
|
score_under
 Joined: Aug 2008
Posts: 308
|
 |
Reply #48 Posted on: August 24, 2009, 06:35:33 PM |
|
|
|
Wikipedia says: In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens (for example, words), to determine its grammatical structure with respect to a given (more or less) formal grammar.
That's pretty much what it does. Reads through the "tokens" (variables, operators, numbers, etc) and determines the structure - without which it is completely impossible to insert the semicolons.
And by the way, modifications at a lower level does not equal bug-prone. I have proved this many times.
|
|
|
|
|
score_under
 Joined: Aug 2008
Posts: 308
|
 |
Reply #50 Posted on: August 24, 2009, 06:42:22 PM |
|
|
Quote from: Rusky on August 24, 2009, 06:40:40 PMModification at a lower level does equal bug-prone. Maybe you're exceptionally good at manually converting higher-level constructs to lower-level representations, but not everyone is I must admit I have had a lot of practice.
|
|
|
Micah
 Joined: Jun 2008
Posts: 128
|
 |
Reply #51 Posted on: August 26, 2009, 11:52:34 PM |
|
|
|
It is a fact that you cannot change, no matter how hard you try, that it is easier, faster and less bug-prone to write or to change a description of a parser containing only the information that will need to be changed, the grammar, than to write or to change code in a parser hard-coded around the grammar.
|
|
|
|
|
|
|
|
|
|
|
Rusky
 Joined: Feb 2008
Posts: 954
|
 |
Reply #56 Posted on: August 31, 2009, 11:23:30 PM |
|
|
Quote from: wikipediaparsing, or, more formally, syntactic analysis, is the process of analyzing a text Analyzing means parsing; parsing means analyzing. Either way, we already knew Josh's method didn't use a token syntax tree.
|
|
|
RetroX
Master of all things Linux
 Joined: Apr 2008
Posts: 1,055
|
 |
Reply #57 Posted on: September 01, 2009, 01:53:33 AM |
|
|
|
It's still tokens. Just not the kind of tokens you're thinking of.
|
|
|
|
|
score_under
 Joined: Aug 2008
Posts: 308
|
 |
Reply #59 Posted on: September 01, 2009, 04:09:08 PM |
|
|
Quote from: Rusky on September 01, 2009, 12:36:43 PM What the heck does that mean? Using tokens has nothing to do with whether or not it's parsing it. Besides, it is the kind of tokens I'm thinking of. variable names are tokens, keywords are tokens, symbols are tokens, etc...
The kind of tokens you were thinking of were arranged in a tree, not linearly.
|
|
|
|