Click here to Skip to main content
15,901,205 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.

 
AnswerRe: anyone have any ideas for this problem? Pin
Daniel Pfeffer25-Dec-19 1:51
professionalDaniel Pfeffer25-Dec-19 1:51 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 1:53
mvahoney the codewitch25-Dec-19 1:53 
AnswerRe: anyone have any ideas for this problem? Pin
Greg Utas25-Dec-19 2:18
professionalGreg Utas25-Dec-19 2:18 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 2:25
mvahoney the codewitch25-Dec-19 2:25 
GeneralRe: anyone have any ideas for this problem? Pin
Greg Utas25-Dec-19 2:45
professionalGreg Utas25-Dec-19 2:45 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 2:46
mvahoney the codewitch25-Dec-19 2:46 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 2:51
mvahoney the codewitch25-Dec-19 2:51 
GeneralRe: anyone have any ideas for this problem? Pin
Greg Utas25-Dec-19 3:09
professionalGreg Utas25-Dec-19 3:09 
Too theoretical! Laugh | :laugh: I just wrote the parser without using any tools. C++ probably doesn't even have a proper grammar!

But I might get theoretical too, if I was trying to support multiple languages.

Parentheses were also one of my problems:
bool Parser::HandleParentheses(ExprPtr& expr)
{
   //  The left parenthesis has already been parsed.  It could introduce a
   //  function call, a C-style cast, or simply parentheses for precedence
   //  (evaluation order).
   //
   auto back = expr->Back();

   //  A function name must precede the arguments for a function call.  The
   //  name could follow a selection operator, as in a.f() or a->f(), which
   //  is why Back(), and not just back(), is used.
   //
   if((back != nullptr) && (back->Type() == Cxx::QualName))
   {
      TokenPtr call;

      if(GetArgList(call))
      {
         expr->AddItem(call);
         return true;
      }
   }

   if(GetCast(expr)) return true;
   return GetPrecedence(expr);
}

GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 3:12
mvahoney the codewitch25-Dec-19 3:12 
AnswerRe: anyone have any ideas for this problem? Pin
Super Lloyd25-Dec-19 3:00
Super Lloyd25-Dec-19 3:00 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 3:03
mvahoney the codewitch25-Dec-19 3:03 
GeneralRe: anyone have any ideas for this problem? Pin
Super Lloyd25-Dec-19 3:12
Super Lloyd25-Dec-19 3:12 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 3:14
mvahoney the codewitch25-Dec-19 3:14 
AnswerRe: anyone have any ideas for this problem? Pin
User 1106097925-Dec-19 3:36
User 1106097925-Dec-19 3:36 
AnswerRe: anyone have any ideas for this problem? Pin
PIEBALDconsult25-Dec-19 5:41
mvePIEBALDconsult25-Dec-19 5:41 
AnswerRe: anyone have any ideas for this problem? Pin
Jon McKee25-Dec-19 19:28
professionalJon McKee25-Dec-19 19:28 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch25-Dec-19 19:51
mvahoney the codewitch25-Dec-19 19:51 
AnswerRe: anyone have any ideas for this problem? Pin
Dan Sutton27-Dec-19 9:19
Dan Sutton27-Dec-19 9:19 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch28-Dec-19 0:02
mvahoney the codewitch28-Dec-19 0:02 
AnswerRe: anyone have any ideas for this problem? Pin
MikeCO1028-Dec-19 3:47
MikeCO1028-Dec-19 3:47 
GeneralRe: anyone have any ideas for this problem? Pin
honey the codewitch28-Dec-19 3:57
mvahoney the codewitch28-Dec-19 3:57 
GeneralRe: anyone have any ideas for this problem? Pin
MikeCO1028-Dec-19 7:28
MikeCO1028-Dec-19 7:28 
GeneralToday, 20 years ago Pin
Mark_Wallace24-Dec-19 21:47
Mark_Wallace24-Dec-19 21:47 
GeneralRe: Today, 20 years ago Pin
RickZeeland24-Dec-19 22:22
mveRickZeeland24-Dec-19 22:22 
GeneralRe: Today, 20 years ago Pin
Mark_Wallace26-Dec-19 1:23
Mark_Wallace26-Dec-19 1:23 

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.


Straw Poll

Were you affected by the geomagnetic storms this past weekend?
Communication disruptions, electrified pipes, random unexplained blue-screens in Windows - the list of effects is terrifying.
  Results   502 votes