You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RenameAll is a [[grammar mutation]] that enforces the use of a particular naming convention for nonterminal symbols. A naming convention is characterised by specifying two parameters: its capitalisation policy and a word separator.
Possible capitalisation policy:
* UPPERCASE
* lowercase
* mixedCase
* CamelCase
A separator is just a string
## RenameAll implementations
There are three different implementations of RenameAll, varying in authorship, robustness and usage.
### [[Prolog]]
Four modes of operating:
* 1: convert everything to **UPPERCASE**
* 2: convert everything to **lowercase**
* 3: convert the first character to **Uppercase**
* 4: convert the first character to **lowerCase**
Any other combination is not implemented, and nonterminal names are perceived as containing one word each.
### [[Python]]
Implements all for capitalisation policies and separators that are:
* any one letter (usually `-`, `_` or `.`)
*`!`, meaning no separation
*`s`, meaning whitespace separation
(Using `s` to denote space makes sense since no naming conventions have been observed as having the actual letter “s” as a separator, and the expected use of the implementation as a [[command line tool]]).
Obviously, if the source naming convention is uppercase or lowercase without separators, no multiword names will be detected and processed correctly (advanced dictionary-based methods are required).
### [[Rascal]]
Defines an ADT for capitalisation policy and uses any (possibly empty) string as a separator. Contains a universal function, as well as several other pre-encoded functions to use together with the unified `mutate()` function.
There are no files selected for viewing