~ubuntu-branches/ubuntu/maverick/aspectc++/maverick

« back to all changes in this revision

Viewing changes to Puma/gen-release/step1/src/CCommentRecognizer.cc

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-04-10 17:40:52 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080410174052-xdnsm7oi8hauyyf1
Tags: 1.0pre4~svn.20080409+dfsg-3
Fix another missing include, this time in Ag++/StdSystem.cc

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
// MA  02111-1307  USA                                            
18
18
 
19
19
#include "Puma/CCommentRecognizer.h"
20
 
#include "Puma/ScanBuffer.h"
21
20
 
22
21
// Token definitions for comment tokens
23
22
#include "Puma/CCommentTokens.h"
49
48
   
50
49
 
51
50
int CCommentRecognizer::recognize (CScanBuffer *scan_buffer, int &expr, int &len) {
52
 
  int result;
 
51
  int result = 0;
53
52
 
54
 
  if (comment_mode == ML_COMMENT) {
 
53
  if (comment_mode == NO_COMMENT) {
 
54
    if ((result = comment_recognizer.recognize (scan_buffer, expr, len)) > 0) {
 
55
      switch (expr) {
 
56
      case TOK_CCSINGLE: comment_mode = SL_COMMENT; break;
 
57
      case TOK_CCMULTIBEGIN: comment_mode = ML_COMMENT; break;
 
58
      default: break;
 
59
      }
 
60
    }
 
61
  }
 
62
  else if (comment_mode == ML_COMMENT) {
55
63
    bool done = false;
56
64
    while (! done) {
57
65
      if ((result = ml_comment_recognizer.recognize (scan_buffer, expr, len)) > 0) {
71
79
  } else if (comment_mode == SL_COMMENT) {
72
80
    result = sl_comment_recognizer.recognize (scan_buffer, expr, len);
73
81
    comment_mode = NO_COMMENT;
74
 
  } else {
75
 
    if ((result = comment_recognizer.recognize (scan_buffer, expr, len)) > 0)
76
 
      comment_mode = (expr == TOK_CCSINGLE) ? SL_COMMENT : ML_COMMENT;
77
82
  }
78
83
  return result;
79
84
}