まとめ 【トークン読み込み用クラス (PL/SQL用)】

TokenReaderPlsql.cs


using System;

namespace SourceToHtml
{
//*******************************************************************************************************
// トークンごとに 文字列と その種類を返す (PL/SQL 用)
//*******************************************************************************************************
public class TokenReaderPlsql : TokenReaderNoCase
{
//---------------------------------------------------------------------------------------------------
// 初期化
//---------------------------------------------------------------------------------------------------
public TokenReaderPlsql(Reader reader, string langType) : base(reader, langType) {}
//---------------------------------------------------------------------------------------------------
// 単一行コメントか?
//---------------------------------------------------------------------------------------------------
protected override bool IsComSingle()
{
return ((_context.currChar == '-') && (_context.nextChar == '-'));
}
//---------------------------------------------------------------------------------------------------
// エスケープされた識別子か?
//---------------------------------------------------------------------------------------------------
protected override bool IsEscape()
{
return (_context.currChar == '\"');
}
//---------------------------------------------------------------------------------------------------
// 16進表記か?
//---------------------------------------------------------------------------------------------------
protected override bool IsNotHex()
{
return true;
}
//---------------------------------------------------------------------------------------------------
// 状態を更新 (エスケープされた識別子)
//---------------------------------------------------------------------------------------------------
protected override void getNextStateIdwEsc()
{
base.getNextStateIdwEsc();

if (_context.currToken.tokenString.Length > 1)
{
if ((_context.currToken.tokenString[0] == '\"') && (_context.currChar == '\"'))
_context.State = "その他";
}
}
}
}