Lexes a comment statement

@throws RuntimeException Thrown if the statement has an invalid token
181223
private function lexCommentStatement()
    {
        $this->lexDelimitedExpressionStatement(
            TokenTypes::T_COMMENT_OPEN,
            $this->commentDelimiters[0],
            TokenTypes::T_COMMENT_CLOSE,
            $this->commentDelimiters[1],
            false
        );
    }
80995
protected function consumeMultipleLineComment()
    {
        $this->get();
        $comment = '';
        for(;;) {
            $get = $this->get();
            if ($get === '*') {
                if ($this->peek() === '/') { // end of comment reached
                    $this->get();
                    if (0 === strpos($comment, '!')) {
                        // preserved by YUI Compressor
                        if (!$this->keptComment) {
                            // don't prepend a newline if two comments right after one another
                            $this->keptComment = "\n";
                        }
                        $this->keptComment .= "/*!" . substr($comment, 1) . "*/\n";
                    } else if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
                        // IE conditional
                        $this->keptComment .= "/*{$comment}*/";
                    }
                    return;
                }
            } elseif ($get === null) {
                throw new UnterminatedCommentException(
                    "JSMin: Unterminated comment at byte {$this->inputIndex}: /*{$comment}");
            }
            $comment .= $get;
        }
    }
650163
public void addComment(String comment) throws IOException {
		prepareToAddChildNode();
		SXCommentNode commentNode = new SXCommentNode(comment, writer, 0, tabString);
		lastChildNode = commentNode;
	}
1371459
private static void comment(SourceCode cfml, boolean removeSpace) throws TemplateException {
	if (!removeSpace) {
	    comment(cfml);
	}
	else {
	    cfml.removeSpace();
	    if (comment(cfml)) cfml.removeSpace();
	}

    }
202622
private function _processComment($token) {
		// Count the lines of comment
		if ($token->id === T_COMMENT) {
			$this->_ncssTotalSingleComment ++;
			$this->_ncssFileSingleComment ++;
		} else if ($token->id === T_ML_COMMENT) {
			$this->_ncssTotalMultiComment ++;
			$this->_ncssFileMultiComment ++;
		} else if ($token->id === T_DOC_COMMENT) {
			$this->_ncssTotalPhpdoc ++;
			$this->_ncssFilePhpdoc ++;
			$this->_ncssTotalLinesPhpdoc ++;
			$this->_ncssFileLinesPhpdoc ++;
			if ($this->_isFileDocComment()) {
				$this->_processAnnotation(T_FILE, $token->text);
			}
		}

		// Count the @params, @returns and @throw
		if (stripos($token->text, '/**') !== false) {
			// Reset the count of elements if it's a new docblock
			$this->statementStack->getCurrentStackItem()->docblocNbParams = 0;
			$this->statementStack->getCurrentStackItem()->docblocNbReturns = 0;
			$this->statementStack->getCurrentStackItem()->docblocNbThrows = 0;
		}
		if (stripos($token->text, '@param') !== false) {
			$this->statementStack->getCurrentStackItem()->docblocNbParams ++;
		}
		if (stripos($token->text, '@return') !== false) {
			$this->statementStack->getCurrentStackItem()->docblocNbReturns ++;
		}
		if (stripos($token->text, '@throw') !== false) {
			$this->statementStack->getCurrentStackItem()->docblocNbThrows ++;
		}
		if (stripos($token->text, '@inheritdoc') !== false) {
			$this->statementStack->getCurrentStackItem()->docblocInheritDoc = true;
		}

		// Check if the comment starts with '#'
		if ($this->_isActive('noShellComments')) {
			$todoStr = strpos($token->text, '#');
			if ($todoStr === 0) {
				$this->_writeError('noShellComments', $this->_getMessage('NO_SHELL_COMMENTS'));
			}
		}

		// Check if the comment contains a TO DO
		$this->_processTODO($token);
	}
1094345
public final void mRULE_ML_COMMENT() throws RecognitionException {
        try {
            int _type = RULE_ML_COMMENT;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // InternalXtype.g:2805:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
            // InternalXtype.g:2805:19: '/*' ( options {greedy=false; } : . )* '*/'
            {
            match("/*"); 

            // InternalXtype.g:2805:24: ( options {greedy=false; } : . )*
            loop8:
            do {
                int alt8=2;
                int LA8_0 = input.LA(1);

                if ( (LA8_0=='*') ) {
                    int LA8_1 = input.LA(2);

                    if ( (LA8_1=='/') ) {
                        alt8=2;
                    }
                    else if ( ((LA8_1>='\u0000' && LA8_1<='.')||(LA8_1>='0' && LA8_1<='\uFFFF')) ) {
                        alt8=1;
                    }


                }
                else if ( ((LA8_0>='\u0000' && LA8_0<=')')||(LA8_0>='+' && LA8_0<='\uFFFF')) ) {
                    alt8=1;
                }


                switch (alt8) {
            	case 1 :
            	    // InternalXtype.g:2805:52: .
            	    {
            	    matchAny(); 

            	    }
            	    break;

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

            match("*/"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
375928
def comment_tokens(self, value):
        """"""
        if not isinstance(value, str):
            raise TypeError('comment_tokens attribute must be a string.')
        self._comment_tokens = value
963173
public final void updateStatement() throws RecognitionException {
		int updateStatement_StartIndex = input.index();

		Token s=null;
		Token c=null;
		ParserRuleReturnScope expression8 =null;

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

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:939:5: (s= 'update' '(' expression c= ')' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:939:7: s= 'update' '(' expression c= ')'
			{
			s=(Token)match(input,117,FOLLOW_117_in_updateStatement4046); if (state.failed) return;
			match(input,36,FOLLOW_36_in_updateStatement4048); if (state.failed) return;
			pushFollow(FOLLOW_expression_in_updateStatement4054);
			expression8=expression();
			state._fsp--;
			if (state.failed) return;
			c=(Token)match(input,37,FOLLOW_37_in_updateStatement4064); if (state.failed) return;
			if ( state.backtracking==0 ) {
			        JavaStatementBlockDescr d = new JavaStatementBlockDescr( (expression8!=null?input.toString(expression8.start,expression8.stop):null), JavaBlockDescr.BlockType.UPDATE );
			        d.setStart( ((CommonToken)s).getStartIndex() );
			        this.addBlockDescr( d );
			        d.setEnd( ((CommonToken)c).getStopIndex() ); 
			        }
			}

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

		}
	}
112967
public void setComment(String comment) {
		this.comment = comment;
		if (!Strings.isEmpty(comment)) {
			this.name = MessageFormat.format("{0} [{1}]", getClass().getName(), comment); //$NON-NLS-1$
		} else {
			this.name = getClass().getName();
		}
	}
566279
public final void throwStatement() throws RecognitionException {
		int throwStatement_StartIndex = input.index();

		Token s=null;
		Token c=null;
		ParserRuleReturnScope expression3 =null;


		        JavaThrowBlockDescr d = null;
		    
		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 84) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:754:5: (s= 'throw' expression c= ';' )
			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:754:7: s= 'throw' expression c= ';'
			{
			s=(Token)match(input,112,FOLLOW_112_in_throwStatement3171); if (state.failed) return;
			pushFollow(FOLLOW_expression_in_throwStatement3177);
			expression3=expression();
			state._fsp--;
			if (state.failed) return;
			c=(Token)match(input,52,FOLLOW_52_in_throwStatement3187); if (state.failed) return;
			if ( state.backtracking==0 ) {
			        d = new JavaThrowBlockDescr( );
			        d.setStart( ((CommonToken)s).getStartIndex() );
			        d.setTextStart( ((CommonToken)(expression3!=null?(expression3.start):null)).getStartIndex() );        
			        this.addBlockDescr( d );
			        d.setEnd( ((CommonToken)c).getStopIndex() ); 
			        }
			}

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

		}
	}
1270048
private static void emitFinishCommentIndentN(PrintWriter fp, int indent) {
		final String spaces = "                                                                   ";
		synchronized (lock) {
			String comment = spaces.substring(0, indent) + " */";
			fp.println(comment);
		}
	}
459253
function parseStatements(lex, endTokens, isRoot) {
    endTokens = Array.isArray(endTokens) ? endTokens : [endTokens];
    var statements = [];
    var temp = lex.peek();
    while (endTokens.indexOf(temp) === -1 &&
           (temp.type && endTokens.indexOf(temp.type) === -1)) {
        var statement = parseStatement(lex, isRoot);
        if (!statement) {
            throw new Error('Invalid statement');
        }
        temp = lex.peek();
        statements.push(statement);
    }
    return statements;
}
66738
protected function processComment()
    {
        $comment=strtr(trim(preg_replace('/^\s*\**( |\t)?/m','',trim($this->getDocComment(),'/'))),"\r",'');
        if(preg_match('/^\s*@\w+/m',$comment, $matches, PREG_OFFSET_CAPTURE)){
            $meta=substr($comment,$matches[0][1]);
            $this->processTags($meta);
        }
    }
1083092
private void commentLinesAfter( String content, int line ) {
        int offset = rootElement.getElement(line).getEndOffset();
        // End of comment not found, nothing to do
        int endDelimiter = indexOf(content, getEndDelimiter(), offset);
        if (endDelimiter < 0)
            return;
        // Matching start/end of comment found, comment the lines
        int startDelimiter = lastIndexOf(content, getStartDelimiter(), endDelimiter);
        if (startDelimiter < 0 || startDelimiter <= offset) {
            doc.setCharacterAttributes(offset, endDelimiter - offset + 1, comment, false);
        }
    }
899908
public final void mMULTI_LINE_COMMENT() throws RecognitionException {
		try {
			int _type = MULTI_LINE_COMMENT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:324:5: ( '/*' ( options {greedy=false; } : . )* '*/' )
			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:324:7: '/*' ( options {greedy=false; } : . )* '*/'
			{
			match("/*"); if (state.failed) return;

			// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:324:12: ( options {greedy=false; } : . )*
			loop59:
			while (true) {
				int alt59=2;
				int LA59_0 = input.LA(1);
				if ( (LA59_0=='*') ) {
					int LA59_1 = input.LA(2);
					if ( (LA59_1=='/') ) {
						alt59=2;
					}
					else if ( ((LA59_1 >= '\u0000' && LA59_1 <= '.')||(LA59_1 >= '0' && LA59_1 <= '\uFFFF')) ) {
						alt59=1;
					}

				}
				else if ( ((LA59_0 >= '\u0000' && LA59_0 <= ')')||(LA59_0 >= '+' && LA59_0 <= '\uFFFF')) ) {
					alt59=1;
				}

				switch (alt59) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL5Lexer.g:324:38: .
					{
					matchAny(); if (state.failed) return;
					}
					break;

				default :
					break loop59;
				}
			}

			match("*/"); if (state.failed) return;

			if ( state.backtracking==0 ) { _channel=HIDDEN; }
			}

			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
337695
protected void readComment(DTDEventListener l)
        throws XMLStreamException
    {
        TextBuffer tb = getTextBuffer();
        char[] outBuf = tb.getCurrentSegment();
        int outPtr = 0;

        while (true) {
            char c = (mInputPtr < mInputEnd)
                ? mInputBuffer[mInputPtr++] : dtdNextFromCurr();
            if (c < CHAR_SPACE) {
                if (c == '\n' || c == '\r') {
                    skipCRLF(c);
                    c = '\n';
                } else if (c != '\t') {
                    throwInvalidSpace(c);
                }
            } else if (c == '-') {
                c = dtdNextFromCurr();
                if (c == '-') { // Ok, has to be end marker then:
                    // Either get '>' or error:
                    c = dtdNextFromCurr();
                    if (c != '>') {
                        throwParseError(ErrorConsts.ERR_HYPHENS_IN_COMMENT);
                    }
                    break;
                }
                c = '-';
                --mInputPtr; // need to push back the second char read
            }
            // Need more room?
            if (outPtr >= outBuf.length) {
                outBuf = tb.finishCurrentSegment();
                outPtr = 0;
            }
            // Ok, let's add char to output:
            outBuf[outPtr++] = c;
        }
        tb.setCurrentLength(outPtr);
        tb.fireDtdCommentEvent(l);
    }
791226
function tokenComment(stream, state) {
    var maybeEnd = false, maybeNested = false, nestedCount = 0, ch;
    while (ch = stream.next()) {
      if (ch == ")" && maybeEnd) {
        if(nestedCount > 0)
          nestedCount--;
        else {
          popStateStack(state);
          break;
        }
      }
      else if(ch == ":" && maybeNested) {
        nestedCount++;
      }
      maybeEnd = (ch == ":");
      maybeNested = (ch == "(");
    }
    
    return ret("comment", "comment");
  }