1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
     20
     21
     22
     23
     24
     25
     26
     27
     28
     29
     30
     31
     32
     33
     34
     35
     36
     37
     38
     39
     40
     41
     42
     43
     44
#include <f77crash/cursor.h>


bool
Cursor::operator<(const Cursor &cursor) const
{
    if (fromLine<cursor.fromLine) {
        return true;
    }
    if (fromLine==cursor.fromLine && fromCol<cursor.fromCol) {
        return true;
    }
    return false;
}

bool
Cursor::operator==(const Cursor &cursor) const
{
    if (fromLine!=cursor.fromLine) {
        return false;
    }
    if (toLine!=cursor.toLine) {
        return false;
    }
    if (fromCol!=cursor.fromCol) {
        return false;
    }
    if (toCol!=cursor.toCol) {
        return false;
    }
    if (content!=cursor.content) {
        return false;
    }
    if (tokenId!=cursor.tokenId) {
        return false;
    }
    if (statementNumber!=cursor.statementNumber) {
        return false;
    }
    return true;
}

Cursor  cursor;
Cursor  voidCursor;