{$IFNDEF CLR}

{$I AccessDac.inc}
unit AccessParserUni;
{$ENDIF}

interface

uses
  Classes, SysUtils, CRParser, CRTypes;

type
  TAccessParser = class (TSQLParser)
  protected
    function IsIdentQuote(Ch: char): boolean; override;
    procedure ToRightQuote(LeftQuote: char); override;
  end;

implementation

function TAccessParser.IsIdentQuote(Ch: char): boolean;
begin
  case Ch of
    '"', '[', ']','`':
      Result := True;
    else
      Result := False;
  end;
end;

procedure TAccessParser.ToRightQuote(LeftQuote: char);
begin
  if LeftQuote = '[' then
    inherited ToRightQuote(']')
  else
    inherited;
end;

end.
