File: parse_keyword.c

package info (click to toggle)
orafce 4.16.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,856 kB
  • sloc: ansic: 12,643; sql: 8,984; lex: 1,049; makefile: 131; yacc: 82; python: 7; sh: 2
file content (19 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "postgres.h"
#include "parse_keyword.h"
#include "parser/scanner.h"
#include "common/keywords.h"

const char *
orafce_scan_keyword(const char *text, int *keycode)
{
	int			kwnum;

	kwnum = ScanKeywordLookup(text, &ScanKeywords);
	if (kwnum >= 0)
	{
		*keycode = ScanKeywordTokens[kwnum];
		return GetScanKeyword(kwnum, &ScanKeywords);
	}

	return NULL;
}