Grammar extracted by Vadim Zaytsev, see the Grammar Zoo entry for details: api/rascal/string/extracted
Source used for this grammar: Jurgen J. Vinju, Tijs van der Storm, Paul Klint, Arnold Lankamp, Vadim Zaytsev, String
, 2009–2013 [Explore]
str
, int
, list[int]
, bool
, real
, list[str]
, loc
), 0 root (—), 7 top (str
, int
, list[int]
, bool
, real
, list[str]
, loc
), 0 bottom (—).[center]
2, [charAt]
, [chars]
, [contains]
, [endsWith]
, [escape]
, [findAll]
, [findFirst]
, [findLast]
, [isEmpty]
, [left]
2, [replaceAll]
, [replaceFirst]
, [replaceLast]
, [reverse]
, [right]
2, [size]
, [startsWith]
, [stringChar]
, [stringChars]
, [isValidCharacter]
, [substring]
2, [toInt]
2, [toLowerCase]
, [toReal]
, [toUpperCase]
, [trim]
, [squeeze]
, [split]
, [capitalize]
, [uncapitalize]
, [wrap]
, [format]
, [rexpMatch]
, [toLocation]
, [subst1]
, [substitute]
.⟨s⟩
23, ⟨n⟩
7, ⟨pad⟩
4, ⟨i⟩
, ⟨input⟩
, ⟨find⟩
7, ⟨subject⟩
9, ⟨suffix⟩
, ⟨mapping⟩
, ⟨replacement⟩
3, ⟨prefix⟩
, ⟨char⟩
, ⟨chars⟩
, ⟨ch⟩
, ⟨begin⟩
2, ⟨end⟩
, ⟨r⟩
, ⟨src⟩
7, ⟨charSet⟩
, ⟨sep⟩
, ⟨wrapLength⟩
, ⟨dir⟩
, ⟨re⟩
, ⟨x⟩
, ⟨y⟩
.str ::= [center]::string ⟨n⟩:integer⟨s⟩:
str ::= [center]::string ⟨n⟩:integer ⟨pad⟩:string⟨s⟩:
int ::= [charAt]::string ⟨i⟩:integer⟨s⟩:
list[int] ::=
[chars]::⟨s⟩:string
bool ::= [contains]::string ⟨find⟩:string⟨input⟩:
bool ::= [endsWith]::string ⟨suffix⟩:string⟨subject⟩:
str ::= [escape]::string ⟨mapping⟩: string string⟨subject⟩:
list[int] ::= [findAll]::string ⟨find⟩:string⟨subject⟩:
int ::= [findFirst]::string ⟨find⟩:string⟨subject⟩:
int ::= [findLast]::string ⟨find⟩:string⟨subject⟩:
bool ::=
[isEmpty]::⟨s⟩:string
str ::= [left]::string ⟨n⟩:integer⟨s⟩:
str ::= [left]::string ⟨n⟩:integer ⟨pad⟩:string⟨s⟩:
str ::= [replaceAll]::string ⟨find⟩:string ⟨replacement⟩:string⟨subject⟩:
str ::= [replaceFirst]::string ⟨find⟩:string ⟨replacement⟩:string⟨subject⟩:
str ::= [replaceLast]::string ⟨find⟩:string ⟨replacement⟩:string⟨subject⟩:
str ::=
[reverse]::⟨s⟩:string
str ::= [right]::string ⟨n⟩:integer⟨s⟩:
str ::= [right]::string ⟨n⟩:integer ⟨pad⟩:string⟨s⟩:
int ::=
[size]::⟨s⟩:string
bool ::= [startsWith]::string ⟨prefix⟩:string⟨subject⟩:
str ::=
[stringChar]::⟨char⟩:integer
str ::=
[stringChars]::⟨chars⟩:integer
bool ::=
[isValidCharacter]::⟨ch⟩:integer
str ::= [substring]::string ⟨begin⟩:integer⟨s⟩:
str ::= [substring]::string ⟨begin⟩:integer ⟨end⟩:integer⟨s⟩:
int ::=
[toInt]::⟨s⟩:string
int ::= [toInt]::string ⟨r⟩:integer⟨s⟩:
str ::=
[toLowerCase]::⟨s⟩:string
real ::=
[toReal]::⟨s⟩:string
str ::=
[toUpperCase]::⟨s⟩:string
str ::=
[trim]::⟨s⟩:string
str ::= [squeeze]::string ⟨charSet⟩:string⟨src⟩:
list[str] ::= [split]::string ⟨src⟩:string⟨sep⟩:
str ::=
[capitalize]::⟨src⟩:string
str ::=
[uncapitalize]::⟨src⟩:string
str ::= [wrap]::string ⟨wrapLength⟩:integer⟨src⟩:
str ::= [format]::string ⟨dir⟩:string ⟨n⟩:integer ⟨pad⟩:string⟨s⟩:
bool ::= [rexpMatch]::string ⟨re⟩:string⟨s⟩:
loc ::=
[toLocation]::⟨s⟩:string
str ::= [subst1]::string ⟨x⟩:string ⟨y⟩:string⟨src⟩:
str ::= [substitute]::string ⟨s⟩: string string⟨src⟩: