nemiver r646 - in trunk: . src/langs tests



Author: dodji
Date: 2007-12-09 22:17:52 +0000 (Sun, 09 Dec 2007)
New Revision: 646
ViewCVS link: http://svn.gnome.org/viewcvs/nemiver?rev=646&view=rev

Modified:
   trunk/ChangeLog
   trunk/src/langs/nmv-cpp-ast.cc
   trunk/src/langs/nmv-cpp-ast.h
   trunk/src/langs/nmv-cpp-lexer.cc
   trunk/src/langs/nmv-cpp-parser.cc
   trunk/src/langs/nmv-cpp-parser.h
   trunk/tests/test-cpp-parser.cc
Log:
heavy bugfix to start parsing real world output of "info variable".

	* src/langs/nmv-cpp-ast.cc:
	  (QName::to_string ()): fix a bug in here.
	  (QualifiedIDExpr::to_string): ditto.
	* src/langs/nmv-cpp-ast.h: Make QName (scope) support template-id, not
	  only identifiers.
	* src/langs/nmv-cpp-lexer.cc:
	  (Lexer::scan_keyword()): bugfix: when a keyword is followed by characters that
	  could make it an identifier, well, it's not a keyword.
	* src/langs/nmv-cpp-parser.cc:
	  (Parser::parse_class_or_namespace_name()): make this parse into an
	   UnqualifiedIDExpr, not a bare string. Yeah, class or namespace names
	   can be more complicated than simple identifiers.
	  (Parser::parse_nested_name_specifier()): propagate the above change.
	  (Parser::parse_unqualified_id): bugfix: a plain keyword can be an
	  unqualified ID.
	 (Parser::parse_qualified_id()): bugfix: don't consume tokens for real
	  when doing tentative parsing.
	  Also, make sure to always try to parse the remaining unqualified id
	  part when we parsed a nested name specifier first.
	 (Parser::parse_id_expr()): cleanup&fix: always try to parse the longest
	  valid sequence.
	* tests/test-cpp-parser.cc: heavy cleanup here. Put the parser inputs
	  into arrays. Added more " real life" tests coming from the output of
	  "info variable" on fooprog.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]