Click here to Skip to main content
14,605,926 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Quick C# quiz Pin
JohaViss611-Dec-19 22:08
professionalJohaViss611-Dec-19 22:08 
GeneralRe: Quick C# quiz Pin
Stuart Dootson1-Dec-19 23:16
professionalStuart Dootson1-Dec-19 23:16 
GeneralRe: Quick C# quiz Pin
Gerry Schmitz2-Dec-19 5:31
mveGerry Schmitz2-Dec-19 5:31 
GeneralRe: Quick C# quiz Pin
honey the codewitch2-Dec-19 5:33
mvahoney the codewitch2-Dec-19 5:33 
GeneralRe: Quick C# quiz Pin
zezba90002-Dec-19 8:35
Memberzezba90002-Dec-19 8:35 
GeneralRe: Quick C# quiz Pin
honey the codewitch2-Dec-19 13:16
mvahoney the codewitch2-Dec-19 13:16 
GeneralRe: Quick C# quiz Pin
zezba90002-Dec-19 14:05
Memberzezba90002-Dec-19 14:05 
GeneralRe: Quick C# quiz Pin
honey the codewitch2-Dec-19 14:12
mvahoney the codewitch2-Dec-19 14:12 
It might be my fault. Let's see if I can explain better:

Say I'm parsing C# and I encounter the following:

Console.WriteLine(Int32.MaxValue);

My parser can interpret Console as a field, property, method, variable or type. Any one of them is valid here, but we can't know which it is without having type information during the parse.

Similarly:

Also WriteLine(Int32.MaxValue) could be a delegate invoke on a field, or property reference, or it could be a method call. You can't know during the parse without type information.

That's what i mean by needing type information during the parse.

It's not that strong typing is bad. It's that requiring type information during a parse dramatically complicates parsing.

What I do, is I create multiple trees on a single parse, and then resolve which tree it is after i have the type information for it. Some other parsers (like microsoft's research C# GLR parser) do that too, but it's not easy.

The other option is to preparse, but only up to the member definitions (ignoring method bodies and such) and then parsing again once you have all that info.
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.

GeneralRe: Quick C# quiz Pin
zezba90002-Dec-19 14:42
Memberzezba90002-Dec-19 14:42 
GeneralRe: Quick C# quiz Pin
honey the codewitch2-Dec-19 14:46
mvahoney the codewitch2-Dec-19 14:46 
GeneralRe: Quick C# quiz Pin
Member 140926054-Dec-19 21:33
MemberMember 140926054-Dec-19 21:33 
GeneralRe: Quick C# quiz Pin
honey the codewitch4-Dec-19 21:37
mvahoney the codewitch4-Dec-19 21:37 
GeneralHomo Hackabilis ? Pin
BillWoodruff29-Nov-19 3:37
mveBillWoodruff29-Nov-19 3:37 
AnswerRe: Homo Hackabilis ? Pin
lopatir29-Nov-19 3:54
Memberlopatir29-Nov-19 3:54 
GeneralRe: Homo Hackabilis ? Pin
Maximilien29-Nov-19 4:00
MemberMaximilien29-Nov-19 4:00 
GeneralRe: Homo Hackabilis ? Pin
CodeWraith29-Nov-19 4:10
MemberCodeWraith29-Nov-19 4:10 
GeneralRe: Homo Hackabilis ? Pin
Maximilien29-Nov-19 4:22
MemberMaximilien29-Nov-19 4:22 
GeneralRe: Homo Hackabilis ? Pin
Eddy Vluggen29-Nov-19 7:19
professionalEddy Vluggen29-Nov-19 7:19 
GeneralRe: Homo Hackabilis ? Pin
BillWoodruff29-Nov-19 19:28
mveBillWoodruff29-Nov-19 19:28 
GeneralAaahhh, Friday afternoon! Pin
glennPattonWork29-Nov-19 3:31
professionalglennPattonWork29-Nov-19 3:31 
GeneralRe: Aaahhh, Friday afternoon! Pin
lopatir29-Nov-19 3:46
Memberlopatir29-Nov-19 3:46 
GeneralRe: Aaahhh, Friday afternoon! Pin
RickZeeland29-Nov-19 3:58
mveRickZeeland29-Nov-19 3:58 
GeneralRe: Aaahhh, Friday afternoon! Pin
RickZeeland29-Nov-19 4:02
mveRickZeeland29-Nov-19 4:02 
GeneralRe: Aaahhh, Friday afternoon! Pin
stoneyowl229-Nov-19 5:04
Memberstoneyowl229-Nov-19 5:04 
PraiseRe: Aaahhh, Friday afternoon! Pin
RickZeeland29-Nov-19 5:57
mveRickZeeland29-Nov-19 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.