/** For a RECORD_NAME node, do checks and assignments for the TableBuffer. */ private void recordNodeSymbol(JPNode node, TableBuffer buffer) throws SemanticException { String nodeText = node.getText(); if (buffer == null) { throw new TreeParserException("Could not resolve table '" + nodeText + "'", node.getFilename(), node.getLine(), node.getColumn()); } ITable table = buffer.getTable(); prevTableReferenced = lastTableReferenced; lastTableReferenced = buffer; // For an unnamed buffer, determine if it's abbreviated. // Note that named buffers, temp and work table names cannot be abbreviated. if (buffer.isDefault() && table.getStoretype() == IConstants.ST_DBTABLE) { String[] nameParts = nodeText.split("\\."); int tableNameLen = nameParts[nameParts.length - 1].length(); if (table.getName().length() > tableNameLen) node.attrSet(IConstants.ABBREVIATED, 1); } }
/** For a RECORD_NAME node, do checks and assignments for the TableBuffer. */ private void recordNodeSymbol(JPNode node, TableBuffer buffer) throws SemanticException { String nodeText = node.getText(); if (buffer == null) { throw new TreeParserException("Could not resolve table '" + nodeText + "'", node.getFilename(), node.getLine(), node.getColumn()); } ITable table = buffer.getTable(); prevTableReferenced = lastTableReferenced; lastTableReferenced = buffer; // For an unnamed buffer, determine if it's abbreviated. // Note that named buffers, temp and work table names cannot be abbreviated. if (buffer.isDefault() && table.getStoretype() == IConstants.ST_DBTABLE) { String[] nameParts = nodeText.split("\\."); int tableNameLen = nameParts[nameParts.length - 1].length(); if (table.getName().length() > tableNameLen) node.attrSet(IConstants.ABBREVIATED, 1); } }
if (parentType == ProParserTokenTypes.FIELDS || parentType == ProParserTokenTypes.EXCEPT) return; throw new TreeParserException( idNode.getFilename() + ":" + idNode.getLine() + " Unknown field or variable name: " + fieldPart);
if (parentType == ProParserTokenTypes.FIELDS || parentType == ProParserTokenTypes.EXCEPT) return; throw new TreeParserException( idNode.getFilename() + ":" + idNode.getLine() + " Unknown field or variable name: " + fieldPart);