$ANTLR start "UPDATE"
195652
public final void mUPDATE() throws RecognitionException {
		try {
			int _type = UPDATE;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:68:8: ( 'update' )
			// hql.g:68:10: 'update'
			{
			match("update"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
244951
private void read() throws IOException, GrammarException {
	try {
	    logger.debug("Read grammar file...");
	    logger.debug("Starting lexer...");
	    Lexer lexer = new RegExpLexer(uhuraGrammar);
	    TokenStream tokenStream = lexer.lex(SourceCode.read(reader,
		    new UnspecifiedSourceCodeLocation()));
	    logger.debug("Starting parser...");
	    parse(tokenStream);
	    logger.debug("done reading grammar file.");
	} catch (LexerException e) {
	    logger.error(e.getMessage(), e);
	    throw new IOException(e.getMessage(), e);
	} catch (ParserException e) {
	    logger.error(e.getMessage(), e);
	    throw new IOException(e.getMessage(), e);
	}
    }
1372389
public final void mSTRING() throws RecognitionException {
		try {
			int _type = STRING;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:5: ( ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' ) )
			int alt22=2;
			int LA22_0 = input.LA(1);
			if ( (LA22_0=='\"') ) {
				alt22=1;
			}
			else if ( (LA22_0=='\'') ) {
				alt22=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 22, 0, input);
				throw nvae;
			}

			switch (alt22) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:8: ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' )
					{
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:8: ( '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"' )
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:9: '\"' ( EscapeSequence |~ ( '\\\\' | '\"' ) )* '\"'
					{
					match('\"'); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:13: ( EscapeSequence |~ ( '\\\\' | '\"' ) )*
					loop20:
					while (true) {
						int alt20=3;
						int LA20_0 = input.LA(1);
						if ( (LA20_0=='\\') ) {
							alt20=1;
						}
						else if ( ((LA20_0 >= '\u0000' && LA20_0 <= '!')||(LA20_0 >= '#' && LA20_0 <= '[')||(LA20_0 >= ']' && LA20_0 <= '\uFFFF')) ) {
							alt20=2;
						}

						switch (alt20) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:15: EscapeSequence
							{
							mEscapeSequence(); if (state.failed) return;

							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:108:32: ~ ( '\\\\' | '\"' )
							{
							if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '!')||(input.LA(1) >= '#' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
								input.consume();
								state.failed=false;
							}
							else {
								if (state.backtracking>0) {state.failed=true; return;}
								MismatchedSetException mse = new MismatchedSetException(null,input);
								recover(mse);
								throw mse;
							}
							}
							break;

						default :
							break loop20;
						}
					}

					match('\"'); if (state.failed) return;
					}

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:8: ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' )
					{
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:8: ( '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\'' )
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:9: '\\'' ( EscapeSequence |~ ( '\\\\' | '\\'' ) )* '\\''
					{
					match('\''); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:14: ( EscapeSequence |~ ( '\\\\' | '\\'' ) )*
					loop21:
					while (true) {
						int alt21=3;
						int LA21_0 = input.LA(1);
						if ( (LA21_0=='\\') ) {
							alt21=1;
						}
						else if ( ((LA21_0 >= '\u0000' && LA21_0 <= '&')||(LA21_0 >= '(' && LA21_0 <= '[')||(LA21_0 >= ']' && LA21_0 <= '\uFFFF')) ) {
							alt21=2;
						}

						switch (alt21) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:16: EscapeSequence
							{
							mEscapeSequence(); if (state.failed) return;

							}
							break;
						case 2 :
							// src/main/resources/org/drools/compiler/lang/DRL6Lexer.g:109:33: ~ ( '\\\\' | '\\'' )
							{
							if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&')||(input.LA(1) >= '(' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
								input.consume();
								state.failed=false;
							}
							else {
								if (state.backtracking>0) {state.failed=true; return;}
								MismatchedSetException mse = new MismatchedSetException(null,input);
								recover(mse);
								throw mse;
							}
							}
							break;

						default :
							break loop21;
						}
					}

					match('\''); if (state.failed) return;
					}

					if ( state.backtracking==0 ) { setText( normalizeString( getText() ) ); }
					}
					break;

			}
			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
720665
public final void typeArgument() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:147:5: ( type | QUESTION ( ( extends_key | super_key ) type )? )
			int alt15=2;
			int LA15_0 = input.LA(1);
			if ( (LA15_0==ID) ) {
				alt15=1;
			}
			else if ( (LA15_0==QUESTION) ) {
				alt15=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 15, 0, input);
				throw nvae;
			}

			switch (alt15) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:147:7: type
					{
					pushFollow(FOLLOW_type_in_typeArgument668);
					type();
					state._fsp--;
					if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:148:7: QUESTION ( ( extends_key | super_key ) type )?
					{
					match(input,QUESTION,FOLLOW_QUESTION_in_typeArgument676); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:148:16: ( ( extends_key | super_key ) type )?
					int alt14=2;
					int LA14_0 = input.LA(1);
					if ( (LA14_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))||((helper.validateIdentifierKey(DroolsSoftKeywords.EXTENDS)))))) {
						alt14=1;
					}
					switch (alt14) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:148:17: ( extends_key | super_key ) type
							{
							// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:148:17: ( extends_key | super_key )
							int alt13=2;
							int LA13_0 = input.LA(1);
							if ( (LA13_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))||((helper.validateIdentifierKey(DroolsSoftKeywords.EXTENDS)))))) {
								int LA13_1 = input.LA(2);
								if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.EXTENDS)))) ) {
									alt13=1;
								}
								else if ( (((helper.validateIdentifierKey(DroolsSoftKeywords.SUPER)))) ) {
									alt13=2;
								}

								else {
									if (state.backtracking>0) {state.failed=true; return;}
									int nvaeMark = input.mark();
									try {
										input.consume();
										NoViableAltException nvae =
											new NoViableAltException("", 13, 1, input);
										throw nvae;
									} finally {
										input.rewind(nvaeMark);
									}
								}

							}

							switch (alt13) {
								case 1 :
									// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:148:18: extends_key
									{
									pushFollow(FOLLOW_extends_key_in_typeArgument680);
									extends_key();
									state._fsp--;
									if (state.failed) return;
									}
									break;
								case 2 :
									// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:148:32: super_key
									{
									pushFollow(FOLLOW_super_key_in_typeArgument684);
									super_key();
									state._fsp--;
									if (state.failed) return;
									}
									break;

							}

							pushFollow(FOLLOW_type_in_typeArgument687);
							type();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					}
					break;

			}
		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
810388
private void parseSetItem(UpdateQueryBuilder query)
  {
    Token token;

    if ((token = scanToken()) != Token.IDENTIFIER) {
      throw error(L.l("expected identifier at '{0}'", token));
    }

    String columnName = _lexeme;

    if ((token = scanToken()) != Token.EQ) {
      throw error("expected '=' at {0}", token);
    }

    ExprKraken expr = parseExpr();

    query.addItem(columnName, expr);
  }
667845
public final void mINSERT() throws RecognitionException {
		try {
			int _type = INSERT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:36:8: ( 'insert' )
			// hql.g:36:10: 'insert'
			{
			match("insert"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
400055
public final void mAS() throws RecognitionException {
		try {
			int _type = AS;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:10:4: ( 'as' )
			// hql.g:10:6: 'as'
			{
			match("as"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
25489
private function updateRepr(): void
    {
        $this->message = $this->rawMessage;

        $dot = false;
        if (mb_substr($this->message, -1) === '.') {
            $this->message = mb_substr($this->message, 0, -1);
            $dot = true;
        }

        if ($this->parsedLine >= 0) {
            $this->message .= sprintf(' at line %d', $this->parsedLine);
        }

        if ($this->snippet) {
            $this->message .= sprintf(' (near "%s")', $this->snippet);
        }

        if ($dot) {
            $this->message .= '.';
        }
    }
1045868
function update(args, done) {
    app = this.fractal;

    let typo3cli = path.join(typo3path, '../vendor/bin/typo3');
    let typo3args = ['extbase', 'component:discover'];
    try {
        if (fs.statSync(typo3cli).isFile()) {
            typo3args.shift();
        }
    } catch (e) {
        typo3cli = path.join(typo3path, 'typo3/cli_dispatch.phpsh');
    }

    try {
        if (fs.statSync(typo3cli).isFile()) {
            typo3args.unshift(typo3cli);
            const componentsJSON = execFileSync('php', typo3args).toString();
            const components = JSON.parse(componentsJSON);
            for (const component of components) {
                processComponent(component);
            }

            // Write the general shared context
            const context = { context: { typo3: typo3url } };
            writeFile(path.resolve(app.components.get('path'), 'components.config.json'), JSON.stringify(context, null, 4));

            // See if there's a component file manifest
            const manifest = path.resolve(app.components.get('path'), 'components.files.json');
            try {
                if (fs.statSync(manifest).isFile()) {
                    const currentFiles = new Set(files);
                    const prevFiles = new Set(JSON.parse(fs.readFileSync(manifest)));

                    // Delete all redundant files
                    [...prevFiles].filter(f => !currentFiles.has(f)).forEach(f => fs.unlinkSync(path.resolve(app.components.get('path'), f)));
                }
            } catch (e) {
                // Ignore errors
            } finally {
                writeFile(manifest, JSON.stringify(files));
                deleteEmpty.sync(app.components.get('path'));
            }
        }
        done();
    } catch (e) {
        console.log(e);
        process.exit(1);
    }
}
242544
def update_highlighter
      formatter = Formatter.new
      lexer ||= @lexer.new

      formatter.format(lexer.lex(to_s))

      Log.specific('prelex.log').debug(to_s) if Mad.debug?
      Log.common.debug(formatter.toks.inspect)

      @highlighter_tokens = formatter.toks
    end
585408
def _update(self, tree):
        
        tablename = tree.table
        table = self.describe(tablename, require=True)
        kwargs = {}

        if tree.returns:
            kwargs["returns"] = "_".join(tree.returns)
        else:
            kwargs["returns"] = "NONE"

        visitor = Visitor(self.reserved_words)
        updates = UpdateExpression.from_update(tree.update)
        kwargs["expression"] = updates.build(visitor)
        if tree.where:
            constraints = ConstraintExpression.from_where(tree.where)
            kwargs["condition"] = constraints.build(visitor)
        kwargs["expr_values"] = visitor.expression_values
        kwargs["alias"] = visitor.attribute_names
        return self._query_and_op(tree, table, "update_item", kwargs)
1317439
public final void mVERSIONED() throws RecognitionException {
		try {
			int _type = VERSIONED;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// hql.g:69:11: ( 'versioned' )
			// hql.g:69:13: 'versioned'
			{
			match("versioned"); if (state.failed) return;

			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
264799
public final void booleanLiteral() throws RecognitionException {
		int booleanLiteral_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 63) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:602:5: ( 'true' | 'false' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:
			{
			if ( input.LA(1)==82||input.LA(1)==115 ) {
				input.consume();
				state.errorRecovery=false;
				state.failed=false;
			}
			else {
				if (state.backtracking>0) {state.failed=true; return;}
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 63, booleanLiteral_StartIndex); }

		}
	}
943050
static void update(AbstractCompiler compiler, Node externs, Node root) {
    compiler.setExternGetterAndSetterProperties(gather(compiler, externs));
    compiler.setSourceGetterAndSetterProperties(gather(compiler, root));
  }
299071
public final void forUpdate() throws RecognitionException {
		int forUpdate_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 103) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1097:5: ( expressionList )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:1097:7: expressionList
			{
			pushFollow(FOLLOW_expressionList_in_forUpdate4775);
			expressionList();
			state._fsp--;
			if (state.failed) return;
			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 103, forUpdate_StartIndex); }

		}
	}
444636
String buildUpdateExpression(SubstitutionContext context) {
        StringBuilder sb = new StringBuilder();
        for (Map.Entry<String, List<UpdateAction>> e: updates.entrySet()) {
            boolean firstOfUpdateType = true;
            for (UpdateAction expr: e.getValue()) {
                if (firstOfUpdateType) {
                    firstOfUpdateType = false;
                    final String operator = e.getKey();
                    if (sb.length() > 0)
                        sb.append(" ");
                    sb.append(operator).append(" ");
                } else {
                    sb.append(", ");
                }
                sb.append(expr.asSubstituted(context));
            }
        }
        return sb.toString();
    }
146746
def visit_update(self, update_stmt, **kw):
        

        if not update_stmt.parameters and \
                not hasattr(update_stmt, '_crate_specific'):
            return super(CrateCompiler, self).visit_update(update_stmt, **kw)

        self.isupdate = True

        extra_froms = update_stmt._extra_froms

        text = 'UPDATE '

        if update_stmt._prefixes:
            text += self._generate_prefixes(update_stmt,
                                            update_stmt._prefixes, **kw)

        table_text = self.update_tables_clause(update_stmt, update_stmt.table,
                                               extra_froms, **kw)

        dialect_hints = None
        if update_stmt._hints:
            dialect_hints, table_text = self._setup_crud_hints(
                update_stmt, table_text
            )

        crud_params = self._get_crud_params(update_stmt, **kw)

        text += table_text

        text += ' SET '
        include_table = extra_froms and \
            self.render_table_with_column_in_update_from

        set_clauses = []

        for k, v in crud_params:
            clause = k._compiler_dispatch(self,
                                          include_table=include_table) + \
                ' = ' + v
            set_clauses.append(clause)

        for k, v in update_stmt.parameters.items():
            if isinstance(k, str) and '[' in k:
                bindparam = sa.sql.bindparam(k, v)
                set_clauses.append(k + ' = ' + self.process(bindparam))

        text += ', '.join(set_clauses)

        if self.returning or update_stmt._returning:
            if not self.returning:
                self.returning = update_stmt._returning
            if self.returning_precedes_values:
                text += " " + self.returning_clause(
                    update_stmt, self.returning)

        if extra_froms:
            extra_from_text = self.update_from_clause(
                update_stmt,
                update_stmt.table,
                extra_froms,
                dialect_hints,
                **kw)
            if extra_from_text:
                text += " " + extra_from_text

        if update_stmt._whereclause is not None:
            t = self.process(update_stmt._whereclause)
            if t:
                text += " WHERE " + t

        limit_clause = self.update_limit_clause(update_stmt)
        if limit_clause:
            text += " " + limit_clause

        if self.returning and not self.returning_precedes_values:
            text += " " + self.returning_clause(
                update_stmt, self.returning)

        return text