> For the complete documentation index, see [llms.txt](https://furesoft.gitbook.io/silverfly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://furesoft.gitbook.io/silverfly/experts/custom-naming-rules.md).

# Custom Naming Rules

Silverfly has two default naming conventions to choose. The default with lower case letters and underscore or a c-style naming. You can set the naming convention by calling the UseNameAdvancer method.

To build a custom naming convention you can implement the INameAdvancer interface.

A name has to be identified by its first character with the IsNameStart method. The AdvanceName advances the lexer to the right most valid name character that is included.

```csharp
public class SampleNameAdvancer : INameAdvancer
{
    public bool IsNameStart(char c)
    {
        return char.IsLetter(c);
    }

    public void AdvanceName(Lexer lexer)
    {
        lexer.Advance();

        while (lexer.IsNotAtEnd())
        {
            if (!char.IsLetterOrDigit(lexer.Peek(0)) && lexer.Peek(0) != '_')
            {
                break;
            }

            lexer.Advance();
        }
    }
}
```
