Search Results

Search found 2 results on 1 pages for 'user2485710'.

Page 1/1 | 1 

  • Right recursive grammar or left recursive?

    - by user2485710
    I have little to no knowledge of what I'm about to ask, so I would like a suggestion based on the level of skills required to implemented a parser for the given grammar ( since I'm a beginner in this kind of formal approach to parsers and languages ). Just by going back of a couple of years, this situation reminds me a little of Pascal grammar vs C/C++ grammar, this left vs right stuff. But I'm not going to do any of that, my purpose is to implement a simple parser for a markup language for documents like Markdown. So considering that I'm starting with a markup language in mind, I want to keep things simple, which is the easiest one to handle between this 2 options and why . Another kind of grammar could be an easier option for me ? If yes which one do you suggest ?

    Read the article

  • C++11/14 and return( ... ) vs return

    - by user2485710
    In C++ you are allowed to write a return statement that looks like : return ( ... ); which is different from the more popular : return ... ; In particular the first version returns the address/reference of something that is local to the stack of the function which contains that return statement. Now why something would like to return a reference to something that, at that point, has no lifetime ? What are the use case for this idiom ? Considering the new buzzword and features from C++11 and C++14 there is a different usage for this ?

    Read the article

1