public void defineDataSource(Location loc, String name) {
            if (isCursor(name)) {
                throw new ProgramCompileException(loc, "Alias '%s' is already used.", name);
            }
            if (cursors.isEmpty()) {
                cursors = new HashSet<>();
            }
            cursors.add(name);
        }
Translate the ANTLR grammar into the logical representation.
container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java