single_statement : disable SEMICOLON
512632
def p_single_statement_disable(self, p):
        ''
        p[0] = SingleStatement(p[1], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
12170
def p_statement_border(p):
    
    p[0] = make_sentence('BORDER',
                         make_typecast(TYPE.ubyte, p[2], p.lineno(1)))
1055136
def double_quote(value)
      return if value.nil?

      case value.to_s
        # Ignore keys that contain double quotes or a Arel.star (*)[all columns]
        # or if a table has already been explicitly declared (ex: users.id)
      when "*", /((^".+"$)|(^[[:alpha:]]+\.[[:alnum:]]+))/
        value
      else
        PG::Connection.quote_ident(value.to_s)
      end
    end
754068
public final void mSTATEMENT_COMMENT() throws RecognitionException {
        try {
            int _type = STATEMENT_COMMENT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // BELScript.g:257:18: ( '//' ( ( '\\\\\\n' ) | ( '\\\\\\r\\n' ) | ~ ( '\\n' | '\\r' ) )* )
            // BELScript.g:258:5: '//' ( ( '\\\\\\n' ) | ( '\\\\\\r\\n' ) | ~ ( '\\n' | '\\r' ) )*
            {
            match("//"); 

            // BELScript.g:258:10: ( ( '\\\\\\n' ) | ( '\\\\\\r\\n' ) | ~ ( '\\n' | '\\r' ) )*
            loop2:
            do {
                int alt2=4;
                int LA2_0 = input.LA(1);

                if ( (LA2_0=='\\') ) {
                    switch ( input.LA(2) ) {
                    case '\n':
                        {
                        alt2=1;
                        }
                        break;
                    case '\r':
                        {
                        alt2=2;
                        }
                        break;

                    default:
                        alt2=3;
                        break;
                    }

                }
                else if ( ((LA2_0>='\u0000' && LA2_0<='\t')||(LA2_0>='\u000B' && LA2_0<='\f')||(LA2_0>='\u000E' && LA2_0<='[')||(LA2_0>=']' && LA2_0<='\uFFFF')) ) {
                    alt2=3;
                }


                switch (alt2) {
            	case 1 :
            	    // BELScript.g:258:11: ( '\\\\\\n' )
            	    {
            	    // BELScript.g:258:11: ( '\\\\\\n' )
            	    // BELScript.g:258:12: '\\\\\\n'
            	    {
            	    match("\\\n"); 


            	    }


            	    }
            	    break;
            	case 2 :
            	    // BELScript.g:258:22: ( '\\\\\\r\\n' )
            	    {
            	    // BELScript.g:258:22: ( '\\\\\\r\\n' )
            	    // BELScript.g:258:23: '\\\\\\r\\n'
            	    {
            	    match("\\\r\n"); 


            	    }


            	    }
            	    break;
            	case 3 :
            	    // BELScript.g:258:35: ~ ( '\\n' | '\\r' )
            	    {
            	    if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
            	        input.consume();

            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;}


            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
576130
static String getSQL(Token[] statement) {

        boolean      wasDelimiter = true;
        StringBuffer sb           = new StringBuffer();

        for (int i = 0; i < statement.length; i++) {
            // when the previous statement is ')', there should be a blank before the non-delimiter statement.
            if (!statement[i].isDelimiter &&
                    (!wasDelimiter
                            || (i > 0 && ")".equals(statement[i - 1].getSQL()))))
            {
                sb.append(' ');
            }

            sb.append(statement[i].getSQL());

            wasDelimiter = statement[i].isDelimiter;
        }

        return sb.toString();
    }
1314740
public void emit1Quoted(int width, Pointer _str, final int len) {
        byte[] bstr = _str.buffer;
        int str = _str.start;

        boolean do_indent = false;
        int mark = str;
        int start = str;
        int end = str;
        write(SINGLE_QUOTE, 1);
        while(mark < str + len) {
            if(do_indent) {
                emitIndent();
                do_indent = false;
            }
            switch(bstr[mark]) {
            case '\'':
                write(SINGLE_QUOTE, 1);
                break;
            case '\n':
                end = mark + 1;
                if(bstr[start] != ' ' && bstr[start] != '\n' && bstr[end] != '\n' && bstr[end] != ' ' ) {
                    write(TWO_NEWLINES, 2);
                } else {
                    write(NEWLINE, 1);
                }
                do_indent = true;
                start = mark + 1;
                break;
            case ' ':
                if(width > 0 && bstr[start] != ' ' && mark - end > width ) {
                    do_indent = true;
                    end = mark + 1;
                } else {
                    write(SPACE, 1);
                }
                break;
            default:
                write(_str.withStart(mark), 1);
                break;
            }


        }
        write(SINGLE_QUOTE, 1);
    }
141943
def handle_semicolon(pLine)
      commentLine = []

      if pLine =~ /^=begin(.*?)/
        @flagMultipleLineComment = true
      elsif pLine =~ /^=end/
        @flagMultipleLineComment = false
      end

      unless @flagMultipleLineComment == true || pLine =~ /#(.*)/
        return pLine.split(/;/)
      end
      commentLine << pLine
    end
387293
def p_statement(self, p):
        
        p[0] = ['statement', p[1][0], p[1][1]]

        if self.options.get('lowercasenames'):
            p[0][1] = p[0][1].lower()

        if (not self.options.get('nostripvalues') and
                not hasattr(p[0][2], 'is_single_quoted') and
                not hasattr(p[0][2], 'is_double_quoted')):
            p[0][2] = p[0][2].rstrip()
757534
def one_liner_str(self):
        """"""
        assert self.less_attrs is not None, "Forgot to set attrs class variable"
        s_format = "{}={}"
        s = "; ".join([s_format.format(x, self.__getattribute__(x)) for x in self.less_attrs])
        return s
800588
def parse_statements(queries_input, engine):
    

    queries = []
    query = ''
    sql_delimiter = ';'

    # Possible delimiters used in PostgreSQL functions
    postgres_func_delimiters = ['$$', '##']

    # Split input by lines
    lines = queries_input.strip().split('\n')

    for k, line in enumerate(lines):
        # Strip line
        line = line.strip()

        # Skip empty lines and comments
        if not line or line.startswith('--'):
            continue

        # Detect new SQL delimiter
        if engine == 'mysql' and line.upper().startswith('DELIMITER '):
            sql_delimiter = line.split()[1]
            continue
        elif engine == 'postgresql' and [delimiter for delimiter in postgres_func_delimiters if 'AS ' + delimiter in line.upper()]:
            sql_delimiter = line.split()[-1]

            # Ensure that we leave 'AS [DELIMITER]'
            query += line + '\n'

            continue

        # Statement is not finished
        if sql_delimiter not in line and k != len(lines) - 1:
            # Append line
            query += line + '\n'
        else:  # Statement is finished
            # Replace non default delimiter
            if sql_delimiter != ';' and engine == 'mysql' and line.endswith(sql_delimiter):
                line = line.replace(sql_delimiter, ';')

            queries.append(query + line)
            query = ''

    return queries
1002114
private void pruneStatement(final Statement stmt, final Document doc) {
        final List<StatementGroup> stmtgroups = doc.getAllStatementGroups();
        for (final StatementGroup stmtgroup : stmtgroups) {
            final Iterator<Statement> sgi = stmtgroup.getStatements()
                    .iterator();
            while (sgi.hasNext()) {
                final Statement sgs = sgi.next();
                if (stmt.equals(sgs)) {
                    // prune
                    sgi.remove();
                    return;
                }
            }
        }
    }
550994
public final void mSEMICOLON() throws RecognitionException {
        try {
            int _type = SEMICOLON;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // com/dyuproject/protostuff/parser/ProtoLexer.g:67:5: ( ';' )
            // com/dyuproject/protostuff/parser/ProtoLexer.g:67:9: ';'
            {
            match(';'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
99035
def p_namedblock_statement(self, p):
        
        if isinstance(p[1], Decl):
            for r in p[1].list:
                if (not isinstance(r, Reg) and not isinstance(r, Wire)
                    and not isinstance(r, Integer) and not isinstance(r, Real)
                        and not isinstance(r, Parameter) and not isinstance(r, Localparam)):
                    raise ParseError("Syntax Error")
        p[0] = p[1]
        p.set_lineno(0, p.lineno(1))
1181731
function shouldCommitValueSemicolon(text, cursorPosition)
        {
            // FIXME: should this account for semicolons inside comments?
            var openQuote = "";
            for (var i = 0; i < cursorPosition; ++i) {
                var ch = text[i];
                if (ch === "\\" && openQuote !== "")
                    ++i; // skip next character inside string
                else if (!openQuote && (ch === "\"" || ch === "'"))
                    openQuote = ch;
                else if (openQuote === ch)
                    openQuote = "";
            }
            return !openQuote;
        }
774637
private void getFKStatement(StringBuffer a) {

        if (!getName().isReservedName()) {
            a.append(Tokens.T_CONSTRAINT).append(' ');
            a.append(getName().statementName);
            a.append(' ');
        }

        a.append(Tokens.T_FOREIGN).append(' ').append(Tokens.T_KEY);

        int[] col = getRefColumns();

        getColumnList(getRef(), col, col.length, a);
        a.append(' ').append(Tokens.T_REFERENCES).append(' ');
        a.append(getMain().getName().getSchemaQualifiedStatementName());

        col = getMainColumns();

        getColumnList(getMain(), col, col.length, a);

        if (getDeleteAction() != Constraint.NO_ACTION) {
            a.append(' ').append(Tokens.T_ON).append(' ').append(
                Tokens.T_DELETE).append(' ');
            a.append(getDeleteActionString());
        }

        if (getUpdateAction() != Constraint.NO_ACTION) {
            a.append(' ').append(Tokens.T_ON).append(' ').append(
                Tokens.T_UPDATE).append(' ');
            a.append(getUpdateActionString());
        }
    }
1114815
def strip_inserts(fasta):
    
    for seq in parse_fasta(fasta):
        seq[1] = ''.join([b for b in seq[1] if b == '-' or b.isupper()])
        yield seq
560378
def semicolon_after_parenthesis?(node)
      last_char = character_at(node.source_range.end_pos)
      char_after = character_at(node.source_range.end_pos, 1)
      (last_char == ')' && char_after == ';') ||
        ([last_char, char_after].include?("\n") &&
         engine.lines[node.source_range.end_pos.line] =~ /\);(\s*})?$/)
    end