Skip to content

Commit a6b2b39

Browse files
author
Jendrik Wenke
committed
remove latex-style quoting
1 parent dc88d4d commit a6b2b39

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

shared/src/main/scala/scala/util/parsing/combinator/JavaTokenParsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trait JavaTokenParsers extends RegexParsers {
2828
*/
2929
def ident: Parser[String] = (
3030
"" ~> // handle whitespace
31-
rep1(acceptIf(Character.isJavaIdentifierStart)("identifier expected but `" + _ + "' found"),
31+
rep1(acceptIf(Character.isJavaIdentifierStart)("identifier expected but '" + _ + "' found"),
3232
elem("identifier part", Character.isJavaIdentifierPart(_: Char))) ^^ (_.mkString)
3333
)
3434

shared/src/main/scala/scala/util/parsing/combinator/RegexParsers.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ trait RegexParsers extends Parsers {
9595
if (i == s.length)
9696
Success(source.subSequence(start, j).toString, in.drop(j - offset))
9797
else {
98-
val found = if (start == source.length()) "end of source" else "`"+source.charAt(start)+"'"
99-
Failure("`"+s+"' expected but "+found+" found", in.drop(start - offset))
98+
val found = if (start == source.length()) "end of source" else "'"+source.charAt(start)+"'"
99+
Failure("'"+s+"' expected but "+found+" found", in.drop(start - offset))
100100
}
101101
}
102102
}
@@ -112,8 +112,8 @@ trait RegexParsers extends Parsers {
112112
Success(source.subSequence(start, start + matched.end).toString,
113113
in.drop(start + matched.end - offset))
114114
case None =>
115-
val found = if (start == source.length()) "end of source" else "`"+source.charAt(start)+"'"
116-
Failure("string matching regex `"+r+"' expected but "+found+" found", in.drop(start - offset))
115+
val found = if (start == source.length()) "end of source" else "'"+source.charAt(start)+"'"
116+
Failure("string matching regex '"+r+"' expected but "+found+" found", in.drop(start - offset))
117117
}
118118
}
119119
}

shared/src/main/scala/scala/util/parsing/combinator/token/StdTokens.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package token
1919
trait StdTokens extends Tokens {
2020
/** The class of keyword tokens */
2121
case class Keyword(chars: String) extends Token {
22-
override def toString = "`"+chars+"'"
22+
override def toString = "'"+chars+"'"
2323
}
2424

2525
/** The class of numeric literal tokens */

shared/src/test/scala/scala/util/parsing/combinator/JavaTokenParsersTest.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class JavaTokenParsersTest {
1616
assertEquals(".1", decimalNumber(new CharArrayReader(".1".toCharArray)).get)
1717
// should fail to parse and we should get Failure as ParseResult
1818
val failure = decimalNumber(new CharArrayReader("!1".toCharArray)).asInstanceOf[Failure]
19-
assertEquals("""string matching regex `(\d+(\.\d*)?|\d*\.\d+)' expected but `!' found""", failure.msg)
19+
assertEquals("""string matching regex '(\d+(\.\d*)?|\d*\.\d+)' expected but '!' found""", failure.msg)
2020
}
2121

2222
@Test
@@ -73,7 +73,7 @@ class JavaTokenParsersTest {
7373
parseResult1 match {
7474
case e @ Failure(message, next) =>
7575
assertEquals(next.pos.column, 7)
76-
assert(message.endsWith("string matching regex `(?i)AND' expected but `s' found"))
76+
assert(message.endsWith("string matching regex '(?i)AND' expected but 's' found"))
7777
case _ => sys.error(parseResult1.toString)
7878
}
7979

@@ -97,7 +97,7 @@ class JavaTokenParsersTest {
9797
case Failure(message, next) =>
9898
assertEquals(next.pos.line, 1)
9999
assertEquals(next.pos.column, 1)
100-
assert(message.endsWith(s"identifier expected but `-' found"))
100+
assert(message.endsWith(s"identifier expected but '-' found"))
101101
case _ => sys.error(parseResult.toString)
102102
}
103103

shared/src/test/scala/scala/util/parsing/combinator/PackratParsersTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class PackratParsersTest {
122122
val failure = parseResult.asInstanceOf[Failure]
123123
assertEquals(expectedFailureMsg, failure.msg)
124124
}
125-
assertFailure("'`b'' expected but `c' found", "a a a a b b b c c c c")
125+
assertFailure("''b'' expected but 'c' found", "a a a a b b b c c c c")
126126
assertFailure("end of input", "a a a a b b b b c c c")
127127
}
128128

shared/src/test/scala/scala/util/parsing/combinator/RegexParsersTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class RegexParsersTest {
2525
}
2626

2727
val failure1 = parseAll(p, "-x").asInstanceOf[Failure]
28-
assertEquals("string matching regex `\\d+' expected but `x' found", failure1.msg)
28+
assertEquals("string matching regex '\\d+' expected but 'x' found", failure1.msg)
2929
val failure2 = parseAll(p, "x").asInstanceOf[Failure]
30-
assertEquals("string matching regex `\\d+' expected but `x' found", failure2.msg)
30+
assertEquals("string matching regex '\\d+' expected but 'x' found", failure2.msg)
3131
assertEquals(result(-5), extractResult(parseAll(p, "-5")))
3232
assertEquals(result(5), extractResult(parseAll(p, "5")))
3333
val error1 = parseAll(q, "-x").asInstanceOf[Error]

0 commit comments

Comments
 (0)