⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqlgrammar.jj

📁 derby database source code.good for you.
💻 JJ
📖 第 1 页 / 共 5 页
字号:
    }    private ValueNode getJdbcIntervalNode( int intervalType) throws StandardException    {        return (ValueNode) nodeFactory.getNode( C_NodeTypes.INT_CONSTANT_NODE,                                                ReuseFactory.getInteger( intervalType),                                                getContextManager());    }}PARSER_END(SQLParser)TOKEN_MGR_DECLS :{	void	CommonTokenAction(Token t)	{		t.beginOffset = input_stream.getBeginOffset();		t.endOffset = input_stream.getEndOffset();	}}SKIP :{	/* white space */	  " "	| "\t"	| "\n"	| "\r"}SKIP :{	/* comments */  <SINGLE_LINE_SQLCOMMENT: "--" (~["\n","\r"])* ("\n"|"\r"|"\r\n")?>}/*	This list should contain only and all SQL92 keywords that are reserved.	Reserved keywords can be used as identifiers in the language only	as delimited identifiers. *//* NOTE - If you add a keyword, then you must add it to reservedKeyword() *	      or nonReservedKeyword() as well! */TOKEN [IGNORE_CASE] :{	/* SQL92 reserved Keywords */	<ADD: "add">|	<ALL: "all">|	<ALLOCATE: "allocate">|	<ALTER: "alter">|	<AND: "and">|	<ANY: "any">|	<ARE: "are">|	<AS: "as">|	<ASC: "asc">|	<ASSERTION: "assertion">|	<AT: "at">|	<AUTHORIZATION: "authorization">|	<AVG: "avg">|	<BEGIN: "begin">|	<BETWEEN: "between">|	<BINARY: "binary">|	<BIT: "bit">|	<BOTH: "both">|	<BY: "by">|	<CASCADE: "cascade">|	<CASCADED: "cascaded">|	<CASE: "case">|	<CAST: "cast">|	<CHAR: "char">|	<CHARACTER: "character">|	<CHARACTER_LENGTH: "character_length">|	<CHECK: "check">|	<CLOSE: "close">|	<COALESCE: "coalesce">|	<COLLATE: "collate">|	<COLLATION: "collation">|	<COLUMN: "column">|	<COMMIT: "commit">|	<CONNECT: "connect">|	<CONNECTION: "connection">|	<CONSTRAINT: "constraint">|	<CONSTRAINTS: "constraints">|	<CONTINUE: "continue">|	<CONVERT: "convert">|	<CORRESPONDING: "corresponding">|	<COUNT: "count">|	<CREATE: "create">|	<CURRENT: "current">|	<CURRENT_DATE: "current_date">|	<CURRENT_TIME: "current_time">|	<CURRENT_TIMESTAMP: "current_timestamp">|	<CURRENT_USER: "current_user">|	<CURSOR: "cursor">|	<D: "d">|	<DEALLOCATE: "deallocate">|	<DEC: "dec">|	<DECIMAL: "decimal">|	<DECLARE: "declare">|	<_DEFAULT: "default">|	<DEFERRABLE: "deferrable">|	<DEFERRED: "deferred">|	<DELETE: "delete">|	<DESC: "desc">|	<DESCRIBE: "describe">|	<DIAGNOSTICS: "diagnostics">|	<DISCONNECT: "disconnect">|	<DISTINCT: "distinct">|	<DOUBLE: "double">|	<DROP: "drop">|	<ELSE: "else">|	<END: "end">|	<ENDEXEC: "end-exec">|	<ESCAPE: "escape">|	<EXCEPT: "except">|	<EXCEPTION: "exception">|	<EXEC: "exec">|	<EXECUTE: "execute">|	<EXISTS: "exists">|	<EXTERNAL: "external">|	<FALSE: "false">|	<FETCH: "fetch">|	<FIRST: "first">|	<FLOAT: "float">|	<FOR: "for">|	<FOREIGN: "foreign">|	<FOUND: "found">|	<FROM: "from">|	<FULL: "full">|	<FUNCTION: "function">|	<GET: "get">|	<GLOBAL: "global">|	<GO: "go">|	<GOTO: "goto">|	<GRANT: "grant">|	<GROUP: "group">|	<HAVING: "having">|	<HOUR: "hour">|	<IDENTITY: "identity">|	<IMMEDIATE: "immediate">|	<IN: "in">|	<INDICATOR: "indicator">|	<INITIALLY: "initially">|	<INNER: "inner">|	<INPUT: "input">|	<INSENSITIVE: "insensitive">|	<INSERT: "insert">|	<INT: "int">|	<INTEGER: "integer">|	<INTERSECT: "intersect">|	<INTO: "into">|	<IS: "is">|	<ISOLATION: "isolation">|	<JOIN: "join">|	<KEY: "key">|	<LAST: "last">|	<LEFT: "left">|	<LIKE: "like">|	<LOWER: "lower">|	<MATCH: "match">|	<MAX: "max">|	<MIN: "min">|	<MINUTE: "minute">|	<MODULE: "module">|	<NATIONAL: "national">|	<NATURAL: "natural">|	<NCHAR: "nchar">|	<NEXT: "next">|	<NO: "no">|	<NOT: "not">|	<NULL: "null">|	<NULLIF: "nullif">|	<NUMERIC: "numeric">|	<OF: "of">|	<ON: "on">|	<ONLY: "only">|	<OPEN: "open">|	<OPTION: "option">|	<OR: "or">|	<ORDER: "order">|	<OUTER: "outer">|	<OUTPUT: "output">|	<OVERLAPS: "overlaps">|	<PAD: "pad">|	<PARTIAL: "partial">|	<PREPARE: "prepare">|	<PRESERVE: "preserve">|	<PRIMARY: "primary">|	<PRIOR: "prior">|	<PRIVILEGES: "privileges">|	<PROCEDURE: "procedure">|	<PUBLIC: "public">|	<READ: "read">|	<REAL: "real">|	<REFERENCES: "references">|	<RELATIVE: "relative">|	<RESTRICT: "restrict">|	<REVOKE: "revoke">|	<RIGHT: "right">|	<ROLLBACK: "rollback">|	<ROWS: "rows">|	<SCHEMA: "schema">|	<SCROLL: "scroll">|	<SECOND: "second">|	<SELECT: "select">|	<SESSION_USER: "session_user">|	<SET: "set">|	<SMALLINT: "smallint">|	<SOME: "some">|	<SPACE: "space">|	<SQL: "sql">|	<SQLCODE: "sqlcode">|	<SQLERROR: "sqlerror">|	<SQLSTATE: "sqlstate">|	<SUBSTRING: "substring">|	<SUM: "sum">|	<SYSTEM_USER: "system_user">|	<T: "t">|	<TABLE: "table">|	<TEMPORARY: "temporary">|	<TIMEZONE_HOUR: "timezone_hour">|	<TIMEZONE_MINUTE: "timezone_minute">|	<TO: "to">|	<TRANSACTION: "transaction">|	<TRANSLATE: "translate">|	<TRANSLATION: "translation">|	<TRUE: "true">|	<TS: "ts">|	<UNION: "union">|	<UNIQUE: "unique">|	<UNKNOWN: "unknown">|	<UPDATE: "update">|	<UPPER: "upper">|	<USER: "user">|	<USING: "using">|	<VALUE: "value">|	<VALUES: "values">|	<VARBINARY: "varbinary">|	<VARCHAR: "varchar">|	<VARYING: "varying">|	<VIEW: "view">|	<WHENEVER: "whenever">|	<WHERE: "where">|	<WITH: "with">|	<WORK: "work">|	<WRITE: "write">|	<YEAR: "year">}/*	This list should contain only and all SQL92 keywords that are non-reserved.	Non-reserved keywords can be used as identifiers in the language.	To make that happen, the individual tokens have to be repeated in	the nonReservedKeyword() rule -- unless there's some other JavaCC shorthand?	NOTE: I've commented out most of these because we won't be using them	right away and the grammar is taking forever to process. *//* NOTE - If you add a keyword, then you must add it to reservedKeyword() *	      or nonReservedKeyword() as well! */TOKEN [IGNORE_CASE] :{	/* SQL92 non-reserved Keywords */    <ABS: "abs">|    <ABSVAL: "absval">|	<ACTION: "action">|	<ALWAYS: "always">|	<BLOB: "blob">  |	<C: "c">  | <CALLED: "called">|	<CLOB: "clob">  |	<COBOL: "cobol">|	<COMMITTED: "committed">|   <CONCAT: "concat">|	<CONTAINS: "contains">|	<DATA: "data">|	<DATE: "date">|	<DAY: "day">|   <DYNAMIC: "dynamic">|	<FORTRAN: "fortran">|   <GENERATED: "generated">|	<IDENTITY_VAL_LOCAL: "identity_val_local">|	<INCREMENT: "increment">|	<INITIAL: "initial">|   <INOUT: "inout">|	<INTERVAL: "interval">|	<LANGUAGE: "language">|	<LARGE: "large">|	<LENGTH: "length">|	<LEVEL: "level">|	<LOCKS: "locks">|	<LOCKSIZE: "locksize">|	<LOGGED: "logged">|       <MOD: "mod">|	<MODIFIES: "modifies">|	<MODIFY: "modify">|	<MONTH: "month">|	<_MORE: "more">|	<MUMPS: "mumps">|	<NAME: "name">|	<NCLOB: "nclob">|	<NULLABLE: "nullable">|	<NUMBER: "number">|	<OBJECT: "object">|	<PASCAL: "pascal">|	<PLI: "pli">|	<PRECISION: "precision">|	<RELEASE: "release">|	<REPEATABLE: "repeatable">|	<RETURNS: "returns">|	<ROW: "row">|	<SAVEPOINT: "savepoint">|	<SCALE: "scale">|	<SERIALIZABLE: "serializable">|	<SQL_TSI_FRAC_SECOND: "sql_tsi_frac_second">|	<SQL_TSI_SECOND: "sql_tsi_second">|	<SQL_TSI_MINUTE: "sql_tsi_minute">|	<SQL_TSI_HOUR: "sql_tsi_hour">|	<SQL_TSI_DAY: "sql_tsi_day">|	<SQL_TSI_WEEK: "sql_tsi_week">|	<SQL_TSI_MONTH: "sql_tsi_month">|	<SQL_TSI_QUARTER: "sql_tsi_quarter">|	<SQL_TSI_YEAR: "sql_tsi_year">|	<START: "start">|	<STATEMENT: "statement">|	<SYNONYM: "synonym">|	<THEN: "then">|	<TIME: "time">|	<TIMESTAMP: "timestamp">|	<TIMESTAMPADD: "timestampadd">|	<TIMESTAMPDIFF: "timestampdiff">|	<TRUNCATE: "truncate">|	<TYPE: "type">|	<UNCOMMITTED: "uncommitted">|	<USAGE: "usage">|	<WHEN: "when">}/*	The next lists should contain non-SQL92 keywords, and should	specify whether their keywords are reserved or non-reserved.	If they are non-reserved, they need to be added to the identifier() rule.	NOTE: XML, XMLPARSE, XMLSERIALIZE, and XMLEXISTS are considered reserved	words to comply with the SQL/XML (2003) standard, section 5.1. *//* NOTE - If you add a keyword, then you must add it to reservedKeyword() *	      or nonReservedKeyword() as well! */TOKEN [IGNORE_CASE] :{	/* Additional JSQL reserved keywords -- non-SQL92 reserved Keywords */	<BOOLEAN: "boolean">|	<CALL: "call">|	<CURDATE: "curdate">|	<CURTIME: "curtime">|   <DATABASE: "database">|	<GET_CURRENT_CONNECTION: "getCurrentConnection">|	<EXPLAIN: "explain">|	<LONGINT: "bigint">|	<LONG: "long">|	<LTRIM: "ltrim">|	<RTRIM: "rtrim">|	<SUBSTR:	"substr">|	<XML:	"xml">|	<XMLPARSE:	"xmlparse">|	<XMLSERIALIZE:	"xmlserialize">|	<XMLEXISTS:	"xmlexists">}/* NOTE - If you add a keyword, then you must add it to reservedKeyword() *	      or nonReservedKeyword() as well! * * NOTE: CONTENT, DOCUMENT, STRIP, WHITESPACE and PASSING are considered NON- * reserved words to comply with the SQL/XML (2003) standard, section 5.1. * PRESERVE is also listed as non-reserved in the SQL/XML spec, but * since that word is already reserved, we leave it alone. */TOKEN [IGNORE_CASE] :{	/* Additional JSQL keywords -- non-SQL92 non-reserved Keywords */	<AFTER: "after">|	<BEFORE: "before">|	<CLASS: "class">|	<COMPRESS: "compress">|	<CONTENT: "content">|   <CS: "cs">|	<CURSORS: "cursors">|	<DB2SQL: "db2sql">|       <DIRTY: "dirty">|	<DOCUMENT: "document">|	<EACH: "each">|	<EXCLUSIVE: "exclusive">|	<FN: "fn">|	<INDEX: "index">|	<JAVA: "java">|   <LCASE: "lcase">|   <LOCATE: "locate">|	<LOCK: "lock">|	<MESSAGE_LOCALE: "message_locale">|	<METHOD: "method">|	<MODE: "mode">|	<NEW: "new">|   <NEW_TABLE: "new_table">|	<NVARCHAR: "nvarchar"> |	<OJ: "oj">|	<OFF: "off">|	<OLD: "old">|   <OLD_TABLE: "old_table">|   <OUT: "out">|	<PARAMETER: "parameter">|	<PASSING: "passing">|	<PROPERTIES: "properties">|	<READS: "reads">|	<REF: "ref">|	<REFERENCING: "referencing">|	<RENAME: "rename">|       <RESET: "reset">|	<RESULT: "result">|	<RETAIN: "retain">|   <RR: "rr">|   <RS: "rs">|	<SEQUENTIAL: "sequential">|	<SETS: "sets">|	<SHARE: "share">|	<SQLID: "sqlid">|	<SPECIFIC: "specific">|   <SQRT: "sqrt">|       <STABILITY: "stability">|   <STRIP: "strip">|   <STYLE: "style">|	<TRIGGER: "trigger">|   <UCASE: "ucase">|   <UR: "ur">|   <WHITESPACE: "whitespace">}TOKEN :{	/* Operators and punctuation */	<DOUBLE_QUOTE: "\"">|	<PERCENT: "%">|	<AMPERSAND: "&">|	<QUOTE: "'">|	<LEFT_BRACE: "{">|	<RIGHT_BRACE: "}">|	<LEFT_PAREN: "(">|	<RIGHT_PAREN: ")">|	<ASTERISK: "*">|	<PLUS_SIGN: "+">|	<COMMA: ",">|	<MINUS_SIGN: "-">|	<PERIOD: ".">|	<SOLIDUS: "/">|	<COLON: ":">|	<DOUBLE_COLON: "::">|	<SEMICOLON: ";">|	<LESS_THAN_OPERATOR: "<">|	<LESS_THAN_OR_EQUALS_OPERATOR: "<=">|	<EQUALS_OPERATOR: "=">|	<NOT_EQUALS_OPERATOR: "<>">|	<NOT_EQUALS_OPERATOR2: "!=">|	<GREATER_THAN_OPERATOR: ">">|	<GREATER_THAN_OR_EQUALS_OPERATOR: ">=">|	<QUESTION_MARK: "?">|	<UNDERSCORE: "_">|	<VERTICAL_BAR: "|">|	<LEFT_BRACKET: "[">|	<RIGHT_BRACKET: "]">|	<CONCATENATION_OPERATOR: "||">|	<FIELD_REFERENCE: "->">}TOKEN :{	/* Identifiers */	<IDENTIFIER: ( <LETTER> ) (<LETTER> | "_" | <DIGIT>)* >}TOKEN: {	<K: "K" >	 }TOKEN: {	<M: "M" >	 }TOKEN: {	<G: "G" >	 }TOKEN:{	<#LETTER: [				"a"-"z",				"A"-"Z",				"\u00aa",				"\u00b5",				"\u00ba",				"\u00c0" - "\u00d6",				"\u00d8" - "\u00f6",				"\u00f8" - "\u01f5",				"\u01fa" - "\u0217",				"\u0250" - "\u02a8",				"\u02b0" - "\u02b8",				"\u02bb" - "\u02c1",				"\u02d0" - "\u02d1",				"\u02e0" - "\u02e4",				"\u037a",				"\u0386",				"\u0388" - "\u038a",				"\u038c",				"\u038e" - "\u03a1",				"\u03a3" - "\u03ce",				"\u03d0" - "\u03d6",				"\u03da",				"\u03dc",				"\u03de",				"\u03e0",				"\u03e2" - "\u03f3",				"\u0401" - "\u040c",				"\u040e" - "\u044f",				"\u0451" - "\u045c",				"\u045e" - "\u0481",				"\u0490" - "\u04c4",				"\u04c7" - "\u04c8",				"\u04cb" - "\u04cc",				"\u04d0" - "\u04eb",				"\u04ee" - "\u04f5",				"\u04f8" - "\u04f9",				"\u0531" - "\u0556",

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -