Re: Palabras reservadas de SQL en OOo e LibO

2011-06-07 Conversa mvillarino
A ver, eu entendo que as palabras reservadas son as que figuran no
ficheiro ao que se fai referencia no enderezo que citas:
 http://192.18.196.107/en/forum/viewtopic.php?f=83t=24684

Se abres o ficheiro Token.java do hyper sql ese verás un código tal que:

//omitida a  licenza e inclusións

/**
 * Defines and enumerates reserved and non-reserved SQL
 * keywords. p
 *
 * @author  Nitin Chauhan
 * @author  fredt@users
 * @since 1.7.2
 * @version 1.7.2
 */
public class Token {

private static IntValueHashMap commandSet;

//
static final StringT_ASTERISK = *;
static final StringT_COMMA= ,;
static final StringT_CLOSEBRACKET = );
static final StringT_EQUALS   = =;
public static final String T_DIVIDE   = /;
static final StringT_OPENBRACKET  = (;
static final StringT_SEMICOLON= ;;
static final StringT_MULTIPLY = *;
static final StringT_PERCENT  = %;
static final StringT_PLUS = +;
static final StringT_QUESTION = ?;

// SQL 200n reserved tokens
static final StringT_ADD = ADD;
//reserved
static final StringT_ALL = ALL;
//reserved

polo que entendo, a chicha (as palabras reservadas do SQL que emprega
o hyper non sei que mais ese son as que veñen despois dese comentario
//SQL 200n e antes do seguinte //other tokens.

Pois ben, penso que podes sacar a lista (digo penso, porque non estou
diante dunha máquina cun ilo en condicións, senón nunha xp), facendo
unha canalización de comandos tais que:
1- obten as liñas da 64 á 314 (incluidas ambas as dúas): head -314
Token.java | tail -64  cortado.quasijava
2 - considera as liñas rexistros dun ficheiro csv que empregue como
delimitador as aspas (). Colle a segunda coluna: cut -d\ -f 2
cortado.quasijava
(nota: tal vez non se escapen así as aspas nin sexa ese o número de
coluna. nota2: podes aforrar o ficheiro temporal chamado aquí
cortado.quasijava se fas unha canalización entre 1 e 2, nese caso
substitue o  por un | e quita o nome do ficheiro de ambos os dous
sitios onde aparece)
(Nota 3: si, pode facerse con awk, pero hoxe non me apetece o rollete sado).
___
Proxecto mailing list
Proxecto@trasno.net
http://listas.trasno.net/listinfo/proxecto


Palabras reservadas de SQL en OOo e LibO

2011-06-05 Conversa Antón Méixome
Esta lista sae de aquí porque non encontro outro sitio máis claro.

http://192.18.196.107/en/forum/viewtopic.php?f=83t=24684

A ver se me axudades. Entendo que se trata do segundo elemento da columna
nesta lista.
O que pretendo é ter unha lista, en limpo, das palabras reservadas (keywords
de SQL) que se manexan en LibO-OOo.



public class Token {

String  tokenString = ;
int tokenType   = Tokens.X_UNKNOWN_TOKEN;
TypedataType;
Object  tokenValue;
String  namePrefix;
String  namePrePrefix;
String  namePrePrePrefix;
String  charsetSchema;
String  charsetName;
String  fullString;
int lobMultiplierType = Tokens.X_UNKNOWN_TOKEN;
boolean isDelimiter;
boolean isDelimitedIdentifier;
boolean isDelimitedPrefix;
boolean isDelimitedPrePrefix;
boolean isDelimitedPrePrePrefix;
boolean isUndelimitedIdentifier;
boolean isReservedIdentifier;
boolean isCoreReservedIdentifier;
boolean isHostParameter;
boolean isMalformed;

//
intposition;
Object expression;

void reset() {

tokenString  = ;
tokenType= Tokens.X_UNKNOWN_TOKEN;
dataType = null;
tokenValue   = null;
namePrefix   = null;
namePrePrefix= null;
namePrePrePrefix = null;
charsetSchema= null;
charsetName  = null;
fullString   = null;
expression   = null;
lobMultiplierType= Tokens.X_UNKNOWN_TOKEN;
isDelimiter  = false;
isDelimitedIdentifier= false;
isDelimitedPrefix= false;
isDelimitedPrePrefix = false;
isDelimitedPrePrePrefix  = false;
isUndelimitedIdentifier  = false;
isReservedIdentifier = false;
isCoreReservedIdentifier = false;
isHostParameter  = false;
isMalformed  = false;
}

Token duplicate() {

Token token = new Token();

token.tokenString  = tokenString;
token.tokenType= tokenType;
token.dataType = dataType;
token.tokenValue   = tokenValue;
token.namePrefix   = namePrefix;
token.namePrePrefix= namePrePrefix;
token.namePrePrePrefix = namePrePrePrefix;
token.charsetSchema= charsetSchema;
token.charsetName  = charsetName;
token.fullString   = fullString;
token.lobMultiplierType= lobMultiplierType;
token.isDelimiter  = isDelimiter;
token.isDelimitedIdentifier= isDelimitedIdentifier;
token.isDelimitedPrefix= isDelimitedPrefix;
token.isDelimitedPrePrefix = isDelimitedPrePrefix;
token.isDelimitedPrePrePrefix  = isDelimitedPrePrePrefix;
token.isUndelimitedIdentifier  = isUndelimitedIdentifier;
token.isReservedIdentifier = isReservedIdentifier;
token.isCoreReservedIdentifier = isCoreReservedIdentifier;
token.isHostParameter  = isHostParameter;
token.isMalformed  = isMalformed;
___
Proxecto mailing list
Proxecto@trasno.net
http://listas.trasno.net/listinfo/proxecto