File: GrpToken.hpp

package info (click to toggle)
grcompiler 5.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,076 kB
  • sloc: cpp: 48,200; ansic: 7,669; sh: 4,427; makefile: 198; xml: 190; perl: 127; sed: 21
file content (65 lines) | stat: -rw-r--r-- 1,250 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*--------------------------------------------------------------------*//*:Ignore this sentence.
Copyright (C) 1999, 2001 SIL International. All rights reserved.

Distributable under the terms of either the Common Public License or the
GNU Lesser General Public License, as specified in the LICENSING.txt file.

File: GrpToken.cpp
Responsibility: Sharon Correll
Last reviewed: Not yet.

Description:
    Customized lexer token.
-------------------------------------------------------------------------------*//*:End Ignore*/

#ifndef GRP_TOKEN
#define GRP_TOKEN

class GrpToken : public CommonToken
{
public:
	//	Additional instance variables:
	GrpLineAndFile m_lnf;

	//	And methods to handle it:
	GrpToken()
		: CommonToken()
	{
	}

	static RefToken factory()
	{
		return RefToken(new GrpToken);
	}

	virtual int getLine() const
	{
		return m_lnf.PreProcessedLine();
	}

	virtual void setLine(int l)
	{
		CommonToken::setLine(l);
		m_lnf.SetPreProcessedLine(l);
	}

	GrpLineAndFile LineAndFile()
	{
		return m_lnf;
	}

	void SetOrigLineAndFile(int nOrig, std::string sta)
	{
		m_lnf.SetOriginalLine(nOrig);
		m_lnf.SetFile(sta);
	}

//	void initialize(RefToken t)
//	{
//		CommonToken::initialize(t);
//		// add here
//	}
};


#endif // !GRP_TOKEN