|
|
|
A structure that holds a lexeme, including the symbol id and associated value
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Oh good. So what's a "symbol id"?
|
|
|
|
|
an id for a symbol
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
nice clue - how many letters?
ok that was erk.
How bout (4)
CARD
modified 27-Nov-19 1:39am.
|
|
|
|
|
i explain it all here
How to Build a Regex Engine in C#[^]
but basically a symbol is something you attach to an expression. as you move through text, several patterns/expressions are evaluated and the one that matches on each move is reported. The symbol id is what is reported.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
tl;dr - but I still think it's a nifty clue - hmm... now if we could do that for anagrams... hmmm
|
|
|
|
|
Ah, so it's basically a classification of the value -- such as the part-of-speech of a word.
I'm mainly asking due to my recent foray into the parsing (or probably just lexing) of JSON.
As it stands, my "tokens" are just bare strings with no classification -- or all have the implicit classification of "token".
|
|
|
|
|
|
honey the codewitch wrote: IT WORKED ON THE FIRST TRY. Haha, enjoy the feeling of magic
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Hmmmm,
If you are trying to get back on the Visual Studio team... it ain't gonna happen there is a sign at all building entrances that says 'No witches allowed'.
If you are looking for a job you should approach Saruman the White. I heard they are looking for witches to assist with building the network of seven palantíri[^].
|
|
|
|
|
I thought the sign was: "Don't feed the programmers"
|
|
|
|
|
honey the codewitch wrote: IT WORKED ON THE FIRST TRY. sits back and waits for Murphy's law* to strike
* If it worked at the first time, you did it wrong
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I did eventually find a very minor bug in it, but I fixed it.
What's funny is while I was building the code generation based on a reference implementation I made, I found a bug in the reference implementation in the process.
Though that never would have happened if I hadn't wrapped the CodeDOM.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I am Invincible! (YouTube)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Most madmen think they are
|
|
|
|
|
honey the codewitch wrote: It generates a whole lot of really complicated code
That's the gold in the message.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
I Am Inevitable[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Quote: IT WORKED ON THE FIRST TRY. The very first program I ever wrote which was on 31st May 1975 worked first time - it feels great doesn't it?
Congratulations!
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
I've done it before but maybe never with something this complicated. =)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I'm replacing a ruby on rails site with C#/mvc. For the most part it's a complete rewrite because of problems with the site being scrapped. There're occasional parts where some logic is worth a directish port though. One is scoring standardized tests.
I've got a test responses table full of columns like:
Section1Question1Answer CHAR(1),
Section1Question2Answer CHAR(1),
...
Section1Question5Answer CHAR(1),
Section2Question1Answer CHAR(1),
Section2Question2Answer CHAR(1),
...
Section13Question5Answer CHAR(1),
The ruby code is then able to access the data like:
for section in 1..SECTION_COUNT
for question in 1..QUESTION_COUNT
test_to_score["Section{section}Question{question}Answer"] #do stuff
end
end
In C# I'm stuck with accessing them 1 at a time
TestToScore.Section1Question1Answer
TestToScore.Section1Question2Answer
I'm not doing enough processing for load/unloading temp arrays to be worthwhile, and every time I've thought to myself that reflection would be a good way to solve a problem I've ended up regretting it. Redoing the DB to store a single answer/row instead of a test attempt/row would just change where the pain points are; and since the test will always be M sections of N questions each keeping the entire response together is a lot simpler.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Reflection.
Or put a reference to the fields, or whatever, into an array... and iterate.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Did you read what I wrote to the end? Every time I've done reflection it ends up becoming a footgun at some point in the future; and for what amounts to a single pass over the scores loading/unloading into arrays is just as verbose as accessing everything once directly.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
My first was "reflection" as well, but then I read what you wrote at the end
I don't think reflection could hurt here though.
It's just a small piece with a clear function.
It wouldn't be much different than how Ruby solves it, which is calling the member using a literal string.
It could go wrong if your naming convention changes or if someone added QuestionXSectionYAnswer (switching Question and Section), but that goes for the Ruby code as well.
|
|
|
|