Skip to content

Replace LaTeX-style quotations and clean up #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions jvm/src/test/scala/scala/util/parsing/combinator/t9010.scala

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ trait JavaTokenParsers extends RegexParsers {
* <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8">The Java Language Spec</a>.
* Generally, this means a letter, followed by zero or more letters or numbers.
*/
def ident: Parser[String] = (
def ident: Parser[String] =
"" ~> // handle whitespace
rep1(acceptIf(Character.isJavaIdentifierStart)("identifier expected but '" + _ + "' found"),
elem("identifier part", Character.isJavaIdentifierPart(_: Char))) ^^ (_.mkString)
)

/** An integer, without sign or with a negative sign. */
def wholeNumber: Parser[String] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ class StdLexical extends Lexical with StdTokens {
)

protected def comment: Parser[Any] = (
rep (chrExcept (EofCh, '*')) ~ '*' ~ '/' ^^ { case _ => ' ' }
| rep (chrExcept (EofCh, '*')) ~ '*' ~ comment ^^ { case _ => ' ' }
rep (chrExcept (EofCh, '*')) ~ '*' ~ '/' ^^ { _ => ' ' }
| rep (chrExcept (EofCh, '*')) ~ '*' ~ comment ^^ { _ => ' ' }
)

/** The set of reserved identifiers: these will be returned as `Keyword`s. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package token
* @author Adriaan Moors
*/
trait Tokens {
/** Objects of this type are produced by a lexical parser or ``scanner'', and consumed by a parser.
/** Objects of this type are produced by a lexical parser or ``scanner``, and consumed by a parser.
*
* @see [[scala.util.parsing.combinator.syntactical.TokenParsers]]
*/
Expand All @@ -43,5 +43,5 @@ trait Tokens {
}

/** This token is produced by a scanner `Scanner` when scanning failed. */
def errorToken(msg: String): Token = new ErrorToken(msg)
def errorToken(msg: String): Token = ErrorToken(msg)
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package util.parsing.input
import scala.collection.mutable.ArrayBuffer

/** `OffsetPosition` is a standard class for positions
* represented as offsets into a source ``document''.
* represented as offsets into a source ``document``.
*
* @param source The source document
* @param offset The offset indicating the position
Expand Down Expand Up @@ -53,7 +53,7 @@ case class OffsetPosition(source: CharSequence, offset: Int) extends Position {
var lo = 0
var hi = index.length - 1
while (lo + 1 < hi) {
val mid = (hi + lo) / 2
val mid = lo + ((hi - lo) / 2)
if (offset < index(mid)) hi = mid
else lo = mid
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ trait Position {
/** Returns a string representation of the `Position`, of the form `line.column`. */
override def toString = ""+line+"."+column

/** Returns a more ``visual'' representation of this position.
/** Returns a more ``visual`` representation of this position.
* More precisely, the resulting string consists of two lines:
* 1. the line in the document referred to by this position
* 2. a caret indicating the column
Expand Down