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

« back to all changes in this revision

Viewing changes to Puma/src/scanner/OrangeRecognizer.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:
1
 
// This file is part of PUMA.
2
 
// Copyright (C) 1999-2003  The PUMA developer team.
3
 
//                                                                
4
 
// This program is free software;  you can redistribute it and/or 
5
 
// modify it under the terms of the GNU General Public License as 
6
 
// published by the Free Software Foundation; either version 2 of 
7
 
// the License, or (at your option) any later version.            
8
 
//                                                                
9
 
// This program is distributed in the hope that it will be useful,
10
 
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
11
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
12
 
// GNU General Public License for more details.                   
13
 
//                                                                
14
 
// You should have received a copy of the GNU General Public      
15
 
// License along with this program; if not, write to the Free     
16
 
// Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
17
 
// MA  02111-1307  USA                                            
18
 
 
19
 
#include "Puma/OrangeRecognizer.h"
20
 
#include "Puma/ScanBuffer.h"
21
 
#include <iostream>
22
 
using namespace std;
23
 
 
24
 
namespace Puma {
25
 
 
26
 
 
27
 
// try to recognize the current token in the character buffer
28
 
// returns 1 on success, 0 on unknown token, -1 on buffer error
29
 
 
30
 
//int OrangeRecognizer::recognize (ScanBuffer *scan_buffer, int &token, int &len) {
31
 
//  int  NextState;
32
 
//  char Character;
33
 
//  char CharClass;
34
 
//  int  NextStatePos;
35
 
//  int  State;
36
 
//  int  LookAheadLen;
37
 
//  int  AcceptLen;
38
 
//  int  AcceptState;
39
 
//  ScanBuffer::State buffer_state = ScanBuffer::STATE_OK;
40
 
//
41
 
//  State = _start;
42
 
//  AcceptState = -1;
43
 
//  LookAheadLen = 0;
44
 
//  AcceptLen = 0;
45
 
//
46
 
//  do { 
47
 
//    Character = scan_buffer->next ();
48
 
//
49
 
//    CharClass = _map[(unsigned char)Character];
50
 
//    if (CharClass == -1)
51
 
//      break;
52
 
//
53
 
//    NextStatePos = _state[State].Start + CharClass;
54
 
//    if (NextStatePos < 0 || NextStatePos >= _tab_size ||
55
 
//        _control[NextStatePos] != State)
56
 
//      break;
57
 
//
58
 
//    if ((NextState = _next[NextStatePos]) == -1)
59
 
//      break;
60
 
//
61
 
//    State = NextState;
62
 
//
63
 
//    if (_state[State].Type > 0) {
64
 
//      AcceptState = State; // remember this (terminal) state
65
 
//      AcceptLen = scan_buffer->len ();
66
 
//    }
67
 
//
68
 
//    if (_state[State].LookAhead)
69
 
//      LookAheadLen = scan_buffer->len ();
70
 
//
71
 
//    buffer_state = scan_buffer->state ();
72
 
//  } while (NextState != -1 && buffer_state == ScanBuffer::STATE_OK);
73
 
//
74
 
//  if (buffer_state == ScanBuffer::STATE_ERROR)
75
 
//    return -1;
76
 
//
77
 
//  if (AcceptState == -1)
78
 
//    return 0;
79
 
//
80
 
//  len   = (_state[AcceptState].Type == 2) ? LookAheadLen : AcceptLen;
81
 
//  token = _state[AcceptState].Expression;
82
 
//
83
 
//  return 1;
84
 
//}
85
 
 
86
 
 
87
 
} // namespace Puma