ly.lex package
**************


Module contents
===============

This module is built on top of slexer and can parse LilyPond input and
other formats.

The base functionality is delegated to modules with an underscore in
this package. The modules describing parsing modes (filetypes) are the
files without underscore.

Currently available are modes for lilypond, latex, html, texinfo,
scheme, and docbook.

The 'underscored' modules should not be imported in application code.
What is needed from them is available here, in the ly.lex namespace.

If you add new files for parsing other file types, you should add them
in _mode.py. The _token.py module contains base Token types and Token
mixin classes.

The State, Parser, FallthroughParser and Fridge classes from slexer
are all slightly extended here,

Usage:

   >>> import ly.lex
   >>> txt = r"\relative c' { c d e f-^ g }"
   >>> s = ly.lex.state("lilypond")
   >>> for t in s.tokens(txt):
   ...     print(t, t.__class__.__name__)
   \relative Command
     Space
   c Name
   ' Unparsed
     Space
   { SequentialStart
     Space
   c Note
     Space
   d Note
     Space
   e Note
     Space
   f Note
   - Direction
   ^ ScriptAbbreviation
     Space
   g Note
     Space
   } SequentialEnd

A State() is used to parse text. The text is given to the tokens()
method, that returns an iterator iterating over Token instances as
they are found. Each token has a 'pos' and an 'end' attribute
describing its position in the original string.

While iterating over the tokens(), the State maintains information
about what kind of text is parsed. (So don't iterate over more than
one call to tokens() of the same State object at the same time.)

Use ly.lex.state("name") to get a state for a specific mode to start
parsing with. If you don't know the type of text, you can use
ly.lex.guessState(text), where text is the text you want to parse. A
quick heuristic is then used to determine the type of the text.

See for more information the documentation of the slexer module.

class ly.lex.BlockComment(string, pos)

   Bases: "Comment"

   Base class for tokens that belong to a block/multiline comment.

   end

   pos

class ly.lex.BlockCommentEnd(string, pos)

   Bases: "BlockComment"

   Base class for tokens that end a block/multiline comment.

   end

   pos

class ly.lex.BlockCommentStart(string, pos)

   Bases: "BlockComment"

   Base class for tokens that start a block/multiline comment.

   end

   pos

class ly.lex.Character(string, pos)

   Bases: "Token"

   Base class for tokens that are an (escaped) character.

   end

   pos

class ly.lex.Comment(string, pos)

   Bases: "Token"

   Base class for tokens that belong to a comment.

   end

   pos

class ly.lex.Dedent

   Bases: "object"

   Mixin class for tokens that have the text on the next line indent
   less.

class ly.lex.Error(string, pos)

   Bases: "Token"

   Base class for tokens that represent erroneous input.

   end

   pos

class ly.lex.FallthroughParser(argcount=None)

   Bases: "Parser", "FallthroughParser"

class ly.lex.Fridge(stateClass=<class 'ly.lex.State'>)

   Bases: "Fridge"

class ly.lex.Indent

   Bases: "object"

   Mixin class for tokens that have the text on the next line indent
   more.

class ly.lex.LineComment(string, pos)

   Bases: "Comment"

   Base class for items that are a whole line comment.

   end

   pos

class ly.lex.MatchEnd

   Bases: "object"

   Mixin class for tokens that have a matching token backward in the
   text.

   The matchname attribute should give a unique name.

   matchname = ''

class ly.lex.MatchStart

   Bases: "object"

   Mixin class for tokens that have a matching token forward in the
   text.

   The matchname attribute should give a unique name.

   matchname = ''

class ly.lex.Newline(string, pos)

   Bases: "Space"

   A token that is a single newline.

   end

   pos

   rx = '\\n'

class ly.lex.Numeric(string, pos)

   Bases: "Token"

   Base class for tokens that are a numerical value.

   end

   pos

class ly.lex.Parser(argcount=None)

   Bases: "Parser"

   argcount = 0

   default

      alias of "Unparsed"

   freeze()

      Return our instance values as a hashable tuple.

   mode = None

   re_flags = 40

class ly.lex.Space(string, pos)

   Bases: "Token"

   A token containing whitespace.

   end

   pos

   rx = '\\s+'

class ly.lex.State(initialParserClass)

   Bases: "State"

   endArgument()

      Decrease argcount and leave the parser if it would reach 0.

   mode()

      Returns the mode attribute of the first parser (from current
      parser) that has it.

class ly.lex.String(string, pos)

   Bases: "Token"

   Base class for tokens that belong to a quote-delimited string.

   end

   pos

class ly.lex.StringEnd(string, pos)

   Bases: "String"

   Base class for tokens that end a quote-delimited string.

   end

   pos

class ly.lex.StringStart(string, pos)

   Bases: "String"

   Base class for tokens that start a quote-delimited string.

   end

   pos

class ly.lex.Token(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.Unparsed(string, pos)

   Bases: "Token"

   Represents an unparsed piece of input text.

   end

   pos

ly.lex.guessMode(text)

   Tries to guess the type of the input text, using a quite fast
   heuristic.

   Returns one of the strings also present as key in the modes
   dictionary.

ly.lex.guessState(text)

   Returns a State instance, guessing the type of text.

ly.lex.state(mode)

   Returns a State instance for the given mode.


Submodules
==========


ly.lex.docbook module
=====================

Parses and tokenizes DocBook input, recognizing LilyPond in DocBook.

class ly.lex.docbook.ParseDocBook(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex._token.Space'>,)

   mode = 'docbook'

   pattern = re.compile('(?P<g_0>\\s+)', re.MULTILINE)


ly.lex.html module
==================

Parses and tokenizes HTML input, recognizing LilyPond in HTML.

class ly.lex.html.AttrName(string, pos)

   Bases: "Token"

   end

   pos

   rx = '\\w+([-_:]\\w+)?'

class ly.lex.html.Comment(string, pos)

   Bases: "Comment"

   end

   pos

class ly.lex.html.CommentEnd(string, pos)

   Bases: "Comment", "Leaver", "BlockCommentEnd"

   end

   pos

   rx = '-->'

class ly.lex.html.CommentStart(string, pos)

   Bases: "Comment", "BlockCommentStart"

   end

   pos

   rx = '<!--'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.EntityRef(string, pos)

   Bases: "Character"

   end

   pos

   rx = '\\&(#\\d+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);'

class ly.lex.html.EqualSign(string, pos)

   Bases: "Token"

   end

   pos

   rx = '='

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.LilyPondCloseTag(string, pos)

   Bases: "LilyPondTag", "Leaver"

   end

   pos

   rx = '</lilypond>'

class ly.lex.html.LilyPondFileTag(string, pos)

   Bases: "LilyPondTag"

   end

   pos

   rx = '</?lilypondfile\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.LilyPondFileTagEnd(string, pos)

   Bases: "LilyPondTag", "Leaver"

   end

   pos

   rx = '/?>'

class ly.lex.html.LilyPondInlineTag(string, pos)

   Bases: "LilyPondTag"

   end

   pos

   rx = '<lilypond\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.LilyPondInlineTagEnd(string, pos)

   Bases: "LilyPondTag", "Leaver"

   end

   pos

   rx = '/?>'

class ly.lex.html.LilyPondTag(string, pos)

   Bases: "Tag"

   end

   pos

class ly.lex.html.LilyPondTagEnd(string, pos)

   Bases: "LilyPondTag"

   end

   pos

   rx = '>'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.LilyPondVersionTag(string, pos)

   Bases: "LilyPondTag"

   end

   pos

   rx = '<lilypondversion/?>'

class ly.lex.html.ParseAttr(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.html.TagEnd'>, <class 'ly.lex.html.AttrName'>, <class 'ly.lex.html.EqualSign'>, <class 'ly.lex.html.StringDQStart'>, <class 'ly.lex.html.StringSQStart'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>/?>)|(?P<g_2>\\w+([-_:]\\w+)?)|(?P<g_3>=)|(?P<g_4>")|(?P<g_5>\')', re.MULTILINE)

class ly.lex.html.ParseComment(argcount=None)

   Bases: "Parser"

   default

      alias of "Comment"

   items = (<class 'ly.lex.html.CommentEnd'>,)

   pattern = re.compile('(?P<g_0>-->)', re.MULTILINE)

class ly.lex.html.ParseHTML(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.html.LilyPondVersionTag'>, <class 'ly.lex.html.LilyPondFileTag'>, <class 'ly.lex.html.LilyPondInlineTag'>, <class 'ly.lex.html.CommentStart'>, <class 'ly.lex.html.TagStart'>, <class 'ly.lex.html.EntityRef'>)

   mode = 'html'

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1><lilypondversion/?>)|(?P<g_2></?lilypondfile\\b)|(?P<g_3><lilypond\\b)|(?P<g_4><!--)|(?P<g_5></?\\w[-_:\\w]*\\b)|(?P<g_6>\\&(#\\d+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);)', re.MULTILINE)

class ly.lex.html.ParseLilyPond(argcount=None)

   Bases: "ParseGlobal"

   items = (<class 'ly.lex.html.LilyPondCloseTag'>, <class 'ly.lex.lilypond.Book'>, <class 'ly.lex.lilypond.BookPart'>, <class 'ly.lex.lilypond.Score'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.Paper'>, <class 'ly.lex.lilypond.Header'>, <class 'ly.lex.lilypond.Layout'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.Name'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.DecimalValue'>)

   pattern = re.compile('(?P<g_0></lilypond>)|(?P<g_1>\\\\book(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\bookpart(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\score(?![_-]?[^\\W\\d]))|(?P<g_4>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_5>\\\\markuplines(?![, re.MULTILINE)

class ly.lex.html.ParseLilyPondAttr(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.html.AttrName'>, <class 'ly.lex.html.EqualSign'>, <class 'ly.lex.html.StringDQStart'>, <class 'ly.lex.html.StringSQStart'>, <class 'ly.lex.html.LilyPondTagEnd'>, <class 'ly.lex.html.SemiColon'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>\\w+([-_:]\\w+)?)|(?P<g_2>=)|(?P<g_3>")|(?P<g_4>\')|(?P<g_5>>)|(?P<g_6>:)', re.MULTILINE)

class ly.lex.html.ParseLilyPondFileOptions(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.html.AttrName'>, <class 'ly.lex.html.EqualSign'>, <class 'ly.lex.html.StringDQStart'>, <class 'ly.lex.html.StringSQStart'>, <class 'ly.lex.html.LilyPondFileTagEnd'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>\\w+([-_:]\\w+)?)|(?P<g_2>=)|(?P<g_3>")|(?P<g_4>\')|(?P<g_5>/?>)', re.MULTILINE)

class ly.lex.html.ParseLilyPondInline(argcount=None)

   Bases: "ParseMusic"

   items = (<class 'ly.lex.html.LilyPondInlineTagEnd'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.Note'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.Octave'>, <class 'ly.lex.lilypond.OctaveCheck'>, <class 'ly.lex.lilypond.AccidentalCautionary'>, <class 'ly.lex.lilypond.AccidentalReminder'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.VoiceSeparator'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SequentialEnd'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.SimultaneousEnd'>, <class 'ly.lex.lilypond.ChordStart'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.SlurStart'>, <class 'ly.lex.lilypond.SlurEnd'>, <class 'ly.lex.lilypond.PhrasingSlurStart'>, <class 'ly.lex.lilypond.PhrasingSlurEnd'>, <class 'ly.lex.lilypond.Tie'>, <class 'ly.lex.lilypond.BeamStart'>, <class 'ly.lex.lilypond.BeamEnd'>, <class 'ly.lex.lilypond.LigatureStart'>, <class 'ly.lex.lilypond.LigatureEnd'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.TremoloColon'>)

   pattern = re.compile('(?P<g_0>/?>)|(?P<g_1>\\s+)|(?P<g_2>%{)|(?P<g_3>%.*$)|(?P<g_4>[#$](?![{}]))|(?P<g_5>")|(?P<g_6>\\\\[<!>]|\\\\(f{1,5}|p{1,5}|mf|mp|fp|spp?|sff?|sfz|rfz|n|cresc|decresc|dim|cr|decr)(?![A-Za-z]))|(?P<g_7, re.MULTILINE)

class ly.lex.html.ParseStringDQ(argcount=None)

   Bases: "Parser"

   default

      alias of "String"

   items = (<class 'ly.lex.html.StringDQEnd'>, <class 'ly.lex.html.EntityRef'>)

   pattern = re.compile('(?P<g_0>")|(?P<g_1>\\&(#\\d+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);)', re.MULTILINE)

class ly.lex.html.ParseStringSQ(argcount=None)

   Bases: "Parser"

   default

      alias of "String"

   items = (<class 'ly.lex.html.StringSQEnd'>, <class 'ly.lex.html.EntityRef'>)

   pattern = re.compile("(?P<g_0>')|(?P<g_1>\\&(#\\d+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);)", re.MULTILINE)

class ly.lex.html.ParseValue(argcount=None)

   Bases: "FallthroughParser"

   Finds a value or drops back.

   fallthrough(state)

      Called when no match is returned by parse().

      This implementation leaves the current parser and returns None
      (causing the State to continue parsing).

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.html.Value'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>\\w+)', re.MULTILINE)

class ly.lex.html.SemiColon(string, pos)

   Bases: "Token"

   end

   pos

   rx = ':'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.String(string, pos)

   Bases: "String"

   end

   pos

class ly.lex.html.StringDQEnd(string, pos)

   Bases: "String", "StringEnd", "Leaver"

   end

   pos

   rx = '"'

class ly.lex.html.StringDQStart(string, pos)

   Bases: "String", "StringStart"

   end

   pos

   rx = '"'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.StringSQEnd(string, pos)

   Bases: "String", "StringEnd", "Leaver"

   end

   pos

   rx = "'"

class ly.lex.html.StringSQStart(string, pos)

   Bases: "String", "StringStart"

   end

   pos

   rx = "'"

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.Tag(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.html.TagEnd(string, pos)

   Bases: "Tag", "Leaver"

   end

   pos

   rx = '/?>'

class ly.lex.html.TagStart(string, pos)

   Bases: "Tag"

   end

   pos

   rx = '</?\\w[-_:\\w]*\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.html.Value(string, pos)

   Bases: "Leaver"

   end

   pos

   rx = '\\w+'


ly.lex.latex module
===================

Parses and tokenizes LaTeX input, recognizing LilyPond in LaTeX.

class ly.lex.latex.ParseLaTeX(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex._token.Space'>,)

   mode = 'latex'

   pattern = re.compile('(?P<g_0>\\s+)', re.MULTILINE)


ly.lex.lilypond module
======================

Parses and tokenizes LilyPond input.

class ly.lex.lilypond.Accidental(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.AccidentalCautionary(string, pos)

   Bases: "Accidental"

   end

   pos

   rx = '\\?'

class ly.lex.lilypond.AccidentalReminder(string, pos)

   Bases: "Accidental"

   end

   pos

   rx = '!'

class ly.lex.lilypond.AccidentalStyle(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\accidentalStyle(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.AccidentalStyleSpecifier(string, pos)

   Bases: "Specifier"

   end

   pos

   rx = '\\b(choral|choral-cautionary|default|dodecaphonic|dodecaphonic-no-repeat|dodecaphonic-first|forget|modern|modern-cautionary|modern-voice|modern-voice-cautionary|neo-modern|neo-modern-cautionary|neo-modern-voice|neo-modern-voice-cautionary|no-reset|piano|piano-cautionary|teaching|voice)(?!-?\\w)'

class ly.lex.lilypond.AlterBroken(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\alterBroken(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Articulation(string, pos)

   Bases: "Token"

   Base class for articulation things.

   end

   pos

class ly.lex.lilypond.ArticulationCommand(string, pos)

   Bases: "Articulation", "IdentifierRef"

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.lilypond.BackSlashedContextName(string, pos)

   Bases: "ContextName"

   end

   pos

   rx = '\\\\(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTranscriptionLyrics|GregorianTranscriptionStaff|GregorianTranscriptionVoice|InternalGregorianStaff|KievanStaff|KievanVoice|Lyrics|MensuralStaff|MensuralVoice|NoteNames|NullVoice|OneStaff|PetrucciStaff|PetrucciVoice|PianoStaff|RhythmicStaff|Score|Staff|StaffGroup|StandaloneRhythmScore|StandaloneRhythmStaff|StandaloneRhythmVoice|TabStaff|TabVoice|Timing|VaticanaLyrics|VaticanaStaff|VaticanaVoice|Voice)\\b'

class ly.lex.lilypond.Beam(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.BeamEnd(string, pos)

   Bases: "Beam", "MatchEnd"

   end

   matchname = 'beam'

   pos

   rx = '\\]'

class ly.lex.lilypond.BeamStart(string, pos)

   Bases: "Beam", "MatchStart"

   end

   matchname = 'beam'

   pos

   rx = '\\['

class ly.lex.lilypond.BlockComment(string, pos)

   Bases: "Comment", "BlockComment"

   end

   pos

class ly.lex.lilypond.BlockCommentEnd(string, pos)

   Bases: "Comment", "BlockCommentEnd", "Leaver"

   end

   pos

   rx = '%}'

class ly.lex.lilypond.BlockCommentStart(string, pos)

   Bases: "Comment", "BlockCommentStart"

   end

   pos

   rx = '%{'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Book(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\book(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.BookPart(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\bookpart(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Change(string, pos)

   Bases: "Translator"

   end

   pos

   rx = '\\\\change(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.Chord(string, pos)

   Bases: "Token"

   Base class for Chord delimiters.

   end

   pos

class ly.lex.lilypond.ChordEnd(string, pos)

   Bases: "Chord", "Leaver"

   end

   pos

   rx = '>'

class ly.lex.lilypond.ChordItem(string, pos)

   Bases: "Token"

   Base class for chordmode items.

   end

   pos

class ly.lex.lilypond.ChordMode(string, pos)

   Bases: "InputMode"

   end

   pos

   rx = '\\\\(chords|chordmode)(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.ChordModifier(string, pos)

   Bases: "ChordItem"

   end

   pos

   rx = '((?<![a-z])|^)(aug|dim|sus|min|maj|m)(?![a-z])'

class ly.lex.lilypond.ChordSeparator(string, pos)

   Bases: "ChordItem"

   end

   pos

   rx = ':|\\^|/\\+?'

class ly.lex.lilypond.ChordStart(string, pos)

   Bases: "Chord"

   end

   pos

   rx = '<'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.ChordStepNumber(string, pos)

   Bases: "ChordItem"

   end

   pos

   rx = '\\d+[-+]?'

class ly.lex.lilypond.Clef(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\clef(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.ClefSpecifier(string, pos)

   Bases: "Specifier"

   end

   pos

   rx = '\\b(alto|altovarC|baritone|baritonevarC|baritonevarF|bass|blackmensural-c1|blackmensural-c2|blackmensural-c3|blackmensural-c4|blackmensural-c5|C|F|french|G|GG|G2|hufnagel-do-fa|hufnagel-do1|hufnagel-do2|hufnagel-do3|hufnagel-fa1|hufnagel-fa2|kievan-do|medicaea-do1|medicaea-do2|medicaea-do3|medicaea-fa1|medicaea-fa2|mensural-c1|mensural-c2|mensural-c3|mensural-c4|mensural-c5|mensural-f|mensural-g|mezzosoprano|moderntab|neomensural-c1|neomensural-c2|neomensural-c3|neomensural-c4|neomensural-c5|percussion|petrucci-c1|petrucci-c2|petrucci-c3|petrucci-c4|petrucci-c5|petrucci-f|petrucci-f2|petrucci-f3|petrucci-f4|petrucci-f5|petrucci-g|petrucci-g1|petrucci-g2|soprano|subbass|tab|tenor|tenorG|tenorvarC|treble|varbaritone|varC|varpercussion|vaticana-do1|vaticana-do2|vaticana-do3|vaticana-fa1|vaticana-fa2|violin)\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.CloseBracket(string, pos)

   Bases: "Delimiter", "MatchEnd", "Dedent"

   end

   matchname = 'bracket'

   pos

   rx = '\\}'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.CloseBracketMarkup(string, pos)

   Bases: "CloseBracket"

   end

   pos

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.CloseSimultaneous(string, pos)

   Bases: "Delimiter", "MatchEnd", "Dedent"

   end

   matchname = 'simultaneous'

   pos

   rx = '>>'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Command(string, pos)

   Bases: "Item", "IdentifierRef"

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.lilypond.Comment(string, pos)

   Bases: "Comment"

   end

   pos

class ly.lex.lilypond.Context(string, pos)

   Bases: "Translator"

   end

   pos

   rx = '\\\\context(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.ContextName(string, pos)

   Bases: "Token"

   end

   pos

   rx = '\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTranscriptionLyrics|GregorianTranscriptionStaff|GregorianTranscriptionVoice|InternalGregorianStaff|KievanStaff|KievanVoice|Lyrics|MensuralStaff|MensuralVoice|NoteNames|NullVoice|OneStaff|PetrucciStaff|PetrucciVoice|PianoStaff|RhythmicStaff|Score|Staff|StaffGroup|StandaloneRhythmScore|StandaloneRhythmStaff|StandaloneRhythmVoice|TabStaff|TabVoice|Timing|VaticanaLyrics|VaticanaStaff|VaticanaVoice|Voice)\\b'

class ly.lex.lilypond.ContextProperty(string, pos)

   Bases: "Variable"

   end

   pos

   rx = '\\b(aDueText|accidentalGrouping|additionalBassStrings|additionalPitchPrefix|alignAboveContext|alignBelowContext|alterationGlyphs|alternativeNumber|alternativeNumberingStyle|alternativeRestores|associatedVoice|associatedVoiceType|autoAccidentals|autoBeamCheck|autoBeaming|autoCautionaries|barCheckSynchronize|barExtraVelocity|barNumberFormatter|barNumberVisibility|baseMoment|beamExceptions|beamHalfMeasure|beatExtraVelocity|beatStructure|breathMarkType|caesuraType|caesuraTypeTransform|centerBarNumbers|chordChanges|chordNameExceptions|chordNameFunction|chordNameLowercaseMinor|chordNameSeparator|chordNoteNamer|chordPrefixSpacer|chordRootNamer|clefGlyph|clefPosition|clefTransposition|clefTranspositionFormatter|clefTranspositionStyle|codaMarkFormatter|completionBusy|completionFactor|completionUnit|connectArpeggios|countPercentRepeats|createKeyOnClefChange|createSpacing|crescendoSpanner|crescendoText|cueClefGlyph|cueClefPosition|cueClefTransposition|cueClefTranspositionFormatter|cueClefTranspositionStyle|currentBarNumber|dalSegnoTextFormatter|decrescendoSpanner|decrescendoText|defaultStrings|doubleRepeatBarType|doubleRepeatSegnoBarType|doubleSlurs|drumPitchTable|drumStyleTable|endAtSkip|endRepeatBarType|endRepeatSegnoBarType|explicitClefVisibility|explicitCueClefVisibility|explicitKeySignatureVisibility|extendersOverRests|extraNatural|figuredBassAlterationDirection|figuredBassCenterContinuations|figuredBassFormatter|figuredBassLargeNumberAlignment|figuredBassPlusDirection|figuredBassPlusStrokedAlist|finalFineTextVisibility|fineBarType|fineSegnoBarType|fineStartRepeatSegnoBarType|fineText|fingeringOrientations|firstClef|followVoice|fontSize|forbidBreak|forbidBreakBetweenBarLines|forceClef|fretLabels|glissandoMap|gridInterval|handleNegativeFrets|harmonicAccidentals|harmonicDots|highStringOne|ignoreBarChecks|ignoreBarNumberChecks|ignoreFiguredBassRest|ignoreMelismata|implicitBassFigures|includeGraceNotes|initialTimeSignatureVisibility|instrumentCueName|instrumentEqualizer|instrumentName|instrumentTransposition|internalBarNumber|keepAliveInterfaces|keyAlterationOrder|keyAlterations|lyricMelismaAlignment|lyricRepeatCountFormatter|magnifyStaffValue|majorSevenSymbol|maximumFretStretch|measureBarType|measureLength|measurePosition|measureStartNow|melismaBusyProperties|metronomeMarkFormatter|middleCClefPosition|middleCCuePosition|middleCOffset|middleCPosition|midiBalance|midiChannelMapping|midiChorusLevel|midiExpression|midiInstrument|midiMaximumVolume|midiMergeUnisons|midiMinimumVolume|midiPanPosition|midiReverbLevel|minimumFret|minimumPageTurnLength|minimumRepeatLengthForPageTurn|minorChordModifier|noChordSymbol|noteNameFunction|noteNameSeparator|noteToFretFunction|nullAccidentals|ottavaStartNow|ottavation|ottavationMarkups|output|partCombineForced|partCombineTextsOnNote|pedalSostenutoStrings|pedalSostenutoStyle|pedalSustainStrings|pedalSustainStyle|pedalUnaCordaStrings|pedalUnaCordaStyle|predefinedDiagramTable|printAccidentalNames|printKeyCancellation|printNotesLanguage|printOctaveNames|printPartCombineTexts|proportionalNotationDuration|rehearsalMark|rehearsalMarkFormatter|repeatCommands|repeatCountVisibility|restCompletionBusy|restNumberThreshold|restrainOpenStrings|searchForVoice|sectionBarType|segnoBarType|segnoMarkFormatter|segnoStyle|shapeNoteStyles|shortInstrumentName|shortVocalName|skipBars|skipTypesetting|slashChordSeparator|soloIIText|soloText|squashedPosition|staffLineLayoutFunction|stanza|startAtNoteColumn|startAtSkip|startRepeatBarType|startRepeatSegnoBarType|stemLeftBeamCount|stemRightBeamCount|strictBeatBeaming|stringNumberOrientations|stringOneTopmost|stringTunings|strokeFingerOrientations|subdivideBeams|suggestAccidentals|supportNonIntegerFret|suspendMelodyDecisions|suspendRestMerging|systemStartDelimiter|systemStartDelimiterHierarchy|tabStaffLineLayoutFunction|tablatureFormat|tempoHideNote|tempoWholesPerMinute|tieWaitForNote|timeSignatureFraction|timeSignatureSettings|timing|tonic|topLevelAlignment|tupletFullLength|tupletFullLengthNote|tupletSpannerDuration|underlyingRepeatBarType|useBassFigureExtenders|vocalName|voltaSpannerDuration|whichBar)\\b'

class ly.lex.lilypond.DecimalValue(string, pos)

   Bases: "Value"

   end

   pos

   rx = '-?\\d+(\\.\\d+)?'

class ly.lex.lilypond.Delimiter(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.Direction(string, pos)

   Bases: "Token"

   end

   pos

   rx = '[-_^]'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Dot(string, pos)

   Bases: "Duration"

   end

   pos

   rx = '\\.'

class ly.lex.lilypond.DotChord(string, pos)

   Bases: "ChordItem"

   end

   pos

   rx = '\\.'

class ly.lex.lilypond.DotPath(string, pos)

   Bases: "Delimiter"

   A dot in dotted path notation.

   end

   pos

   rx = '\\.'

class ly.lex.lilypond.DrumChordEnd(string, pos)

   Bases: "ChordEnd"

   end

   pos

class ly.lex.lilypond.DrumChordStart(string, pos)

   Bases: "ChordStart"

   end

   pos

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.DrumMode(string, pos)

   Bases: "InputMode"

   end

   pos

   rx = '\\\\(drums|drummode)(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.DrumNote(string, pos)

   Bases: "MusicItem"

   end

   pos

   rx = '[a-z]+(?![A-Za-z])'

class ly.lex.lilypond.Duration(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.Dynamic(string, pos)

   Bases: "Token"

   end

   pos

   rx = '\\\\[<!>]|\\\\(f{1,5}|p{1,5}|mf|mp|fp|spp?|sff?|sfz|rfz|n|cresc|decresc|dim|cr|decr)(?![A-Za-z])'

class ly.lex.lilypond.EqualSign(string, pos)

   Bases: "Token"

   end

   pos

   rx = '='

class ly.lex.lilypond.Error(string, pos)

   Bases: "Error"

   end

   pos

class ly.lex.lilypond.ErrorInChord(string, pos)

   Bases: "Error"

   end

   pos

   rx = '[-_^][_.>|!+^-]|<<|>>|\\\\[\\\\\\]\\[\\(\\)()]|(\\\\(maxima|longa|breve)(?![_-]?[^\\W\\d])|(1|2|4|8|16|32|64|128|256|512|1024|2048)(?!\\d))|\\*[\\t ]*\\d+(/\\d+)?'

class ly.lex.lilypond.ExpectBook(argcount=None)

   Bases: "ExpectOpenBracket"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)', re.MULTILINE)

   replace

      alias of "ParseBook"

class ly.lex.lilypond.ExpectBookPart(argcount=None)

   Bases: "ExpectOpenBracket"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)', re.MULTILINE)

   replace

      alias of "ParseBookPart"

class ly.lex.lilypond.ExpectChordMode(argcount=None)

   Bases: "ExpectMusicList"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)|(?P<g_4><<)|(?P<g_5>\\\\(simultaneous|sequential)(?![_-]?[^\\W\\d]))', re.MULTILINE)

   replace

      alias of "ParseChordMode"

class ly.lex.lilypond.ExpectContext(argcount=None)

   Bases: "ExpectOpenBracket"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)', re.MULTILINE)

   replace

      alias of "ParseContext"

class ly.lex.lilypond.ExpectDrumMode(argcount=None)

   Bases: "ExpectMusicList"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)|(?P<g_4><<)|(?P<g_5>\\\\(simultaneous|sequential)(?![_-]?[^\\W\\d]))', re.MULTILINE)

   replace

      alias of "ParseDrumMode"

class ly.lex.lilypond.ExpectFigureMode(argcount=None)

   Bases: "ExpectMusicList"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)|(?P<g_4><<)|(?P<g_5>\\\\(simultaneous|sequential)(?![_-]?[^\\W\\d]))', re.MULTILINE)

   replace

      alias of "ParseFigureMode"

class ly.lex.lilypond.ExpectGrobProperty(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.GrobProperty'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b([a-z]+|[XY])(-([a-z]+|[XY]))*(?![\\w]))', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ExpectHeader(argcount=None)

   Bases: "ExpectOpenBracket"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)', re.MULTILINE)

   replace

      alias of "ParseHeader"

class ly.lex.lilypond.ExpectLayout(argcount=None)

   Bases: "ExpectOpenBracket"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)', re.MULTILINE)

   replace

      alias of "ParseLayout"

class ly.lex.lilypond.ExpectLyricMode(argcount=None)

   Bases: "ExpectMusicList"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.OpenBracket'>, <class 'ly.lex.lilypond.OpenSimultaneous'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.Name'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)|(?P<g_4><<)|(?P<g_5>[#$](?![{}]))|(?P<g_6>")|(?P<g_7>(?<![^\\W\\d])[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\W\\d]))|(?P<g_8>\\\\(simultaneous|sequ, re.MULTILINE)

   replace

      alias of "ParseLyricMode"

class ly.lex.lilypond.ExpectMidi(argcount=None)

   Bases: "ExpectOpenBracket"

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)', re.MULTILINE)

   replace

      alias of "ParseMidi"

class ly.lex.lilypond.ExpectMusicList(argcount=None)

   Bases: "FallthroughParser", "ParseLilyPond"

   Waits for an OpenBracket or << and then replaces the parser with
   the class set in the replace attribute.

   Subclass this to set the destination for the OpenBracket.

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.OpenBracket'>, <class 'ly.lex.lilypond.OpenSimultaneous'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)|(?P<g_4><<)|(?P<g_5>\\\\(simultaneous|sequential)(?![_-]?[^\\W\\d]))', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ExpectNoteMode(argcount=None)

   Bases: "ExpectMusicList"

   replace

      alias of "ParseNoteMode"

class ly.lex.lilypond.ExpectOpenBracket(argcount=None)

   Bases: "FallthroughParser", "ParseLilyPond"

   Waits for an OpenBracket and then replaces the parser with the
   class set in the replace attribute.

   Subclass this to set the destination for the OpenBracket.

   default

      alias of "Error"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.OpenBracket'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\{)', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ExpectPaper(argcount=None)

   Bases: "ExpectOpenBracket"

   replace

      alias of "ParsePaper"

class ly.lex.lilypond.ExpectScore(argcount=None)

   Bases: "ExpectOpenBracket"

   replace

      alias of "ParseScore"

class ly.lex.lilypond.ExpectTranslatorId(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.EqualSign'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>=)', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ExpectWith(argcount=None)

   Bases: "ExpectOpenBracket"

   replace

      alias of "ParseWith"

class ly.lex.lilypond.Figure(string, pos)

   Bases: "Token"

   Base class for Figure items.

   end

   pos

class ly.lex.lilypond.FigureAccidental(string, pos)

   Bases: "Figure"

   A figure accidental.

   end

   pos

   rx = '[-+!]+'

class ly.lex.lilypond.FigureBracket(string, pos)

   Bases: "Figure"

   end

   pos

   rx = '[][]'

class ly.lex.lilypond.FigureEnd(string, pos)

   Bases: "Figure", "Leaver"

   end

   pos

   rx = '>'

class ly.lex.lilypond.FigureMode(string, pos)

   Bases: "InputMode"

   end

   pos

   rx = '\\\\(figures|figuremode)(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.FigureModifier(string, pos)

   Bases: "Figure"

   A figure modifier.

   end

   pos

   rx = '\\\\[\\\\!+]|/'

class ly.lex.lilypond.FigureStart(string, pos)

   Bases: "Figure"

   end

   pos

   rx = '<'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.FigureStep(string, pos)

   Bases: "Figure"

   A step figure number or the underscore.

   end

   pos

   rx = '_|\\d+'

class ly.lex.lilypond.Fingering(string, pos)

   Bases: "Articulation", "Leaver"

   end

   pos

   rx = '\\d+'

class ly.lex.lilypond.Fraction(string, pos)

   Bases: "Value"

   end

   pos

   rx = '\\d+/\\d+'

class ly.lex.lilypond.GrobName(string, pos)

   Bases: "Token"

   end

   pos

   rx = '\\b(Accidental|AccidentalCautionary|AccidentalPlacement|AccidentalSuggestion|Ambitus|AmbitusAccidental|AmbitusLine|AmbitusNoteHead|Arpeggio|BalloonText|BarLine|BarNumber|BassFigure|BassFigureAlignment|BassFigureAlignmentPositioning|BassFigureBracket|BassFigureContinuation|BassFigureLine|Beam|BendAfter|BendSpanner|BreakAlignGroup|BreakAlignment|BreathingSign|CaesuraScript|CenteredBarNumber|CenteredBarNumberLineSpanner|ChordName|ChordSquare|Clef|ClefModifier|ClusterSpanner|ClusterSpannerBeacon|CodaMark|CombineTextScript|ControlPoint|ControlPolygon|CueClef|CueEndClef|Custos|Divisio|DotColumn|Dots|DoublePercentRepeat|DoublePercentRepeatCounter|DoubleRepeatSlash|DurationLine|DynamicLineSpanner|DynamicText|DynamicTextSpanner|Episema|FingerGlideSpanner|Fingering|FingeringColumn|Flag|Footnote|FretBoard|Glissando|GraceSpacing|GridChordName|GridLine|GridPoint|Hairpin|HorizontalBracket|HorizontalBracketText|InstrumentName|InstrumentSwitch|JumpScript|KeyCancellation|KeySignature|KievanLigature|LaissezVibrerTie|LaissezVibrerTieColumn|LedgerLineSpanner|LeftEdge|LigatureBracket|LyricExtender|LyricHyphen|LyricRepeatCount|LyricSpace|LyricText|MeasureCounter|MeasureGrouping|MeasureSpanner|MelodyItem|MensuralLigature|MetronomeMark|MultiMeasureRest|MultiMeasureRestNumber|MultiMeasureRestScript|MultiMeasureRestText|NonMusicalPaperColumn|NoteCollision|NoteColumn|NoteHead|NoteName|NoteSpacing|OttavaBracket|PaperColumn|Parentheses|PercentRepeat|PercentRepeatCounter|PhrasingSlur|PianoPedalBracket|RehearsalMark|RepeatSlash|RepeatTie|RepeatTieColumn|Rest|RestCollision|Script|ScriptColumn|ScriptRow|SectionLabel|SegnoMark|SignumRepetitionis|Slur|SostenutoPedal|SostenutoPedalLineSpanner|SpacingSpanner|SpanBar|SpanBarStub|StaffEllipsis|StaffGrouper|StaffHighlight|StaffSpacing|StaffSymbol|StanzaNumber|Stem|StemStub|StemTremolo|StringNumber|StrokeFinger|SustainPedal|SustainPedalLineSpanner|System|SystemStartBar|SystemStartBrace|SystemStartBracket|SystemStartSquare|TabNoteHead|TextMark|TextScript|TextSpanner|Tie|TieColumn|TimeSignature|TrillPitchAccidental|TrillPitchGroup|TrillPitchHead|TrillPitchParentheses|TrillSpanner|TupletBracket|TupletNumber|UnaCordaPedal|UnaCordaPedalLineSpanner|VaticanaLigature|VerticalAlignment|VerticalAxisGroup|VoiceFollower|VoltaBracket|VoltaBracketSpanner|VowelTransition)\\b'

class ly.lex.lilypond.GrobProperty(string, pos)

   Bases: "Variable"

   end

   pos

   rx = '\\b([a-z]+|[XY])(-([a-z]+|[XY]))*(?![\\w])'

class ly.lex.lilypond.Header(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\header(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.HeaderVariable(string, pos)

   Bases: "Variable"

   A variable inside Header. Always follow this one by UserVariable.

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.lilypond.Hide(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\hide(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Identifier(string, pos)

   Bases: "Token"

   A variable name, like "some-variable".

   end

   pos

   rx = '(?<![^\\W\\d])[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.IdentifierRef(string, pos)

   Bases: "Token"

   A reference to an identifier, e.g. "\some-variable".

   end

   pos

   rx = '\\\\[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.InputMode(string, pos)

   Bases: "Command"

   end

   pos

class ly.lex.lilypond.IntegerValue(string, pos)

   Bases: "DecimalValue"

   end

   pos

   rx = '\\d+'

class ly.lex.lilypond.KeySignatureMode(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\(aeolian|dorian|ionian|locrian|lydian|major|minor|mixolydian|phrygian)(?![A-Za-z])'

class ly.lex.lilypond.Keyword(string, pos)

   Bases: "Item", "IdentifierRef"

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.lilypond.Layout(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\layout(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.LayoutContext(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\context(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.LayoutVariable(string, pos)

   Bases: "Variable"

   A variable inside Header. Always follow this one by UserVariable.

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.lilypond.Length(string, pos)

   Bases: "Duration"

   end

   pos

   rx = '(\\\\(maxima|longa|breve)(?![_-]?[^\\W\\d])|(1|2|4|8|16|32|64|128|256|512|1024|2048)(?!\\d))'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Ligature(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.LigatureEnd(string, pos)

   Bases: "Ligature", "MatchEnd"

   end

   matchname = 'ligature'

   pos

   rx = '\\\\\\]'

class ly.lex.lilypond.LigatureStart(string, pos)

   Bases: "Ligature", "MatchStart"

   end

   matchname = 'ligature'

   pos

   rx = '\\\\\\['

class ly.lex.lilypond.LineComment(string, pos)

   Bases: "Comment", "LineComment"

   end

   pos

   rx = '%.*$'

class ly.lex.lilypond.Lyric(string, pos)

   Bases: "Item"

   Base class for Lyric items.

   end

   pos

class ly.lex.lilypond.LyricExtender(string, pos)

   Bases: "Lyric"

   end

   pos

   rx = '__(?=($|[\\s\\\\]))'

class ly.lex.lilypond.LyricHyphen(string, pos)

   Bases: "Lyric"

   end

   pos

   rx = '--(?=($|[\\s\\\\]))'

class ly.lex.lilypond.LyricMode(string, pos)

   Bases: "InputMode"

   end

   pos

   rx = '\\\\(lyricmode|((old)?add)?lyrics|lyricsto)(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.LyricSkip(string, pos)

   Bases: "Lyric"

   end

   pos

   rx = '_(?=($|[\\s\\\\]))'

class ly.lex.lilypond.LyricText(string, pos)

   Bases: "Lyric"

   end

   pos

   rx = '[^\\\\\\s\\d\\"]+'

class ly.lex.lilypond.Markup(string, pos)

   Bases: "Item"

   Base class for all markup commands.

   end

   pos

class ly.lex.lilypond.MarkupCommand(string, pos)

   Bases: "Markup", "IdentifierRef"

   A markup command.

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.MarkupLines(string, pos)

   Bases: "Markup"

   end

   pos

   rx = '\\\\markuplines(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.MarkupList(string, pos)

   Bases: "Markup"

   end

   pos

   rx = '\\\\markuplist(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.MarkupScore(string, pos)

   Bases: "Markup"

   end

   pos

   rx = '\\\\score(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.MarkupStart(string, pos)

   Bases: "Markup", "Command"

   end

   pos

   rx = '\\\\markup(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.MarkupUserCommand(string, pos)

   Bases: "Markup", "IdentifierRef"

   A user-defined markup (i.e. not in the words markupcommands list).

   end

   pos

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.MarkupWord(string, pos)

   Bases: "Item"

   end

   pos

   rx = '[^{}"\\\\\\s#%]+'

class ly.lex.lilypond.Midi(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\midi(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.MusicItem(string, pos)

   Bases: "Token"

   A note, rest, spacer, "\skip" or "q".

   end

   pos

class ly.lex.lilypond.Name(string, pos)

   Bases: "UserVariable"

   A variable name without prefix.

   end

   pos

class ly.lex.lilypond.New(string, pos)

   Bases: "Translator"

   end

   pos

   rx = '\\\\new(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.Note(string, pos)

   Bases: "MusicItem"

   end

   pos

   rx = '[a-x]+(?![A-Za-z])'

class ly.lex.lilypond.NoteMode(string, pos)

   Bases: "InputMode"

   end

   pos

   rx = '\\\\(notes|notemode)(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Octave(string, pos)

   Bases: "Token"

   end

   pos

   rx = ",+|'+"

class ly.lex.lilypond.OctaveCheck(string, pos)

   Bases: "Token"

   end

   pos

   rx = "=(,+|'+)?"

class ly.lex.lilypond.Omit(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\omit(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.OpenBracket(string, pos)

   Bases: "Delimiter", "MatchStart", "Indent"

   An open bracket, does not enter different parser, subclass or
   reimplement Parser.update_state().

   end

   matchname = 'bracket'

   pos

   rx = '\\{'

class ly.lex.lilypond.OpenBracketMarkup(string, pos)

   Bases: "OpenBracket"

   end

   pos

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.OpenSimultaneous(string, pos)

   Bases: "Delimiter", "MatchStart", "Indent"

   An open double French quote, does not enter different parser,
   subclass or reimplement Parser.update_state().

   end

   matchname = 'simultaneous'

   pos

   rx = '<<'

class ly.lex.lilypond.Override(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\override(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Paper(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\paper(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.PaperVariable(string, pos)

   Bases: "Variable"

   A variable inside Paper. Always follow this one by UserVariable.

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.lilypond.ParseAccidentalStyle(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.AccidentalStyleSpecifier'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTran, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseAlterBroken(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.GrobProperty'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b([a-z]+|[XY])(-([a-z]+|[XY]))*(?![\\w]))', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseBlockComment(argcount=None)

   Bases: "Parser"

   default

      alias of "BlockComment"

   items = (<class 'ly.lex.lilypond.BlockCommentEnd'>,)

   pattern = re.compile('(?P<g_0>%})', re.MULTILINE)

class ly.lex.lilypond.ParseBook(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\book {", leaving at "}"

   items = (<class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.BookPart'>, <class 'ly.lex.lilypond.Score'>, <class 'ly.lex.lilypond.Paper'>, <class 'ly.lex.lilypond.Header'>, <class 'ly.lex.lilypond.Layout'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\markuplines(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\markuplist(?![_-]?[^\\W\\d]))|(?P<g_4>\\\\bookpart(?![_-]?[^\\W\\d]))|(?P<g_5>\\\\score(?![_-, re.MULTILINE)

class ly.lex.lilypond.ParseBookPart(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\bookpart {", leaving at "}"

   items = (<class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.Score'>, <class 'ly.lex.lilypond.Paper'>, <class 'ly.lex.lilypond.Header'>, <class 'ly.lex.lilypond.Layout'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\markuplines(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\markuplist(?![_-]?[^\\W\\d]))|(?P<g_4>\\\\score(?![_-]?[^\\W\\d]))|(?P<g_5>\\\\paper(?![_-]?[, re.MULTILINE)

class ly.lex.lilypond.ParseChord(argcount=None)

   Bases: "ParseMusic"

   LilyPond inside chords "< >"

   items = (<class 'ly.lex.lilypond.ErrorInChord'>, <class 'ly.lex.lilypond.ChordEnd'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.Note'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.Octave'>, <class 'ly.lex.lilypond.OctaveCheck'>, <class 'ly.lex.lilypond.AccidentalCautionary'>, <class 'ly.lex.lilypond.AccidentalReminder'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.VoiceSeparator'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SequentialEnd'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.SimultaneousEnd'>, <class 'ly.lex.lilypond.ChordStart'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.SlurStart'>, <class 'ly.lex.lilypond.SlurEnd'>, <class 'ly.lex.lilypond.PhrasingSlurStart'>, <class 'ly.lex.lilypond.PhrasingSlurEnd'>, <class 'ly.lex.lilypond.Tie'>, <class 'ly.lex.lilypond.BeamStart'>, <class 'ly.lex.lilypond.BeamEnd'>, <class 'ly.lex.lilypond.LigatureStart'>, <class 'ly.lex.lilypond.LigatureEnd'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>[-_^][_.>|!+^-]|<<|>>|\\\\[\\\\\\]\\[\\(\\)()]|(\\\\(maxima|longa|breve)(?![_-]?[^\\W\\d])|(1|2|4|8|16|32|64|128|256|512|1024|2048)(?!\\d))|\\*[\\t ]*\\d+(/\\d+)?)|(?P<g_1>>)|(?P<g_2>\\s+)|(?, re.MULTILINE)

class ly.lex.lilypond.ParseChordItems(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex.lilypond.ChordSeparator'>, <class 'ly.lex.lilypond.ChordModifier'>, <class 'ly.lex.lilypond.ChordStepNumber'>, <class 'ly.lex.lilypond.DotChord'>, <class 'ly.lex.lilypond.Note'>)

   pattern = re.compile('(?P<g_0>:|\\^|/\\+?)|(?P<g_1>((?<![a-z])|^)(aug|dim|sus|min|maj|m)(?![a-z]))|(?P<g_2>\\d+[-+]?)|(?P<g_3>\\.)|(?P<g_4>[a-x]+(?![A-Za-z]))', re.MULTILINE)

class ly.lex.lilypond.ParseChordMode(argcount=None)

   Bases: "ParseInputMode", "ParseMusic"

   Parser for "\chords" and "\chordmode".

   items = (<class 'ly.lex.lilypond.OpenBracket'>, <class 'ly.lex.lilypond.OpenSimultaneous'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.Note'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.Octave'>, <class 'ly.lex.lilypond.OctaveCheck'>, <class 'ly.lex.lilypond.AccidentalCautionary'>, <class 'ly.lex.lilypond.AccidentalReminder'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.VoiceSeparator'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SequentialEnd'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.SimultaneousEnd'>, <class 'ly.lex.lilypond.ChordStart'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.SlurStart'>, <class 'ly.lex.lilypond.SlurEnd'>, <class 'ly.lex.lilypond.PhrasingSlurStart'>, <class 'ly.lex.lilypond.PhrasingSlurEnd'>, <class 'ly.lex.lilypond.Tie'>, <class 'ly.lex.lilypond.BeamStart'>, <class 'ly.lex.lilypond.BeamEnd'>, <class 'ly.lex.lilypond.LigatureStart'>, <class 'ly.lex.lilypond.LigatureEnd'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.ChordSeparator'>)

   pattern = re.compile('(?P<g_0>\\{)|(?P<g_1><<)|(?P<g_2>\\s+)|(?P<g_3>%{)|(?P<g_4>%.*$)|(?P<g_5>[#$](?![{}]))|(?P<g_6>")|(?P<g_7>\\\\[<!>]|\\\\(f{1,5}|p{1,5}|mf|mp|fp|spp?|sff?|sfz|rfz|n|cresc|decresc|dim|cr|decr)(?![A-Za-, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseClef(argcount=None)

   Bases: "FallthroughParser"

   argcount = 1

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.ClefSpecifier'>, <class 'ly.lex.lilypond.StringQuotedStart'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(alto|altovarC|baritone|baritonevarC|baritonevarF|bass|blackmensural-c1|blackmensural-c2|blackmensural-c3|blackmensural-c4|blackmensural-c5|C|F|fren, re.MULTILINE)

class ly.lex.lilypond.ParseContext(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after ("\layout {") "\context {", leaving at
   "}"

   items = (<class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.BackSlashedContextName'>, <class 'ly.lex.lilypond.ContextProperty'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>\\\\(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTranscriptionLyrics|GregorianT, re.MULTILINE)

class ly.lex.lilypond.ParseDecimalValue(argcount=None)

   Bases: "FallthroughParser"

   Parses a decimal value without a # before it (if present).

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.DecimalValue'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\d+/\\d+)|(?P<g_4>-?\\d+(\\.\\d+)?)', re.MULTILINE)

class ly.lex.lilypond.ParseDrumChord(argcount=None)

   Bases: "ParseMusic"

   LilyPond inside chords in drummode "< >"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.ErrorInChord'>, <class 'ly.lex.lilypond.DrumChordEnd'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.DrumNote'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.VoiceSeparator'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SequentialEnd'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.SimultaneousEnd'>, <class 'ly.lex.lilypond.ChordStart'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.SlurStart'>, <class 'ly.lex.lilypond.SlurEnd'>, <class 'ly.lex.lilypond.PhrasingSlurStart'>, <class 'ly.lex.lilypond.PhrasingSlurEnd'>, <class 'ly.lex.lilypond.Tie'>, <class 'ly.lex.lilypond.BeamStart'>, <class 'ly.lex.lilypond.BeamEnd'>, <class 'ly.lex.lilypond.LigatureStart'>, <class 'ly.lex.lilypond.LigatureEnd'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>[-_^][_.>|!+^-]|<<|>>|\\\\[\\\\\\]\\[\\(\\)()]|(\\\\(maxima|longa|breve)(?![_-]?[^\\W\\d])|(1|2|4|8|16|32|64|128|256|5, re.MULTILINE)

class ly.lex.lilypond.ParseDrumMode(argcount=None)

   Bases: "ParseInputMode", "ParseMusic"

   Parser for "\drums" and "\drummode".

   items = (<class 'ly.lex.lilypond.OpenBracket'>, <class 'ly.lex.lilypond.OpenSimultaneous'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.DrumNote'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.VoiceSeparator'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SequentialEnd'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.SimultaneousEnd'>, <class 'ly.lex.lilypond.DrumChordStart'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.SlurStart'>, <class 'ly.lex.lilypond.SlurEnd'>, <class 'ly.lex.lilypond.PhrasingSlurStart'>, <class 'ly.lex.lilypond.PhrasingSlurEnd'>, <class 'ly.lex.lilypond.Tie'>, <class 'ly.lex.lilypond.BeamStart'>, <class 'ly.lex.lilypond.BeamEnd'>, <class 'ly.lex.lilypond.LigatureStart'>, <class 'ly.lex.lilypond.LigatureEnd'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\{)|(?P<g_1><<)|(?P<g_2>\\s+)|(?P<g_3>%{)|(?P<g_4>%.*$)|(?P<g_5>[#$](?![{}]))|(?P<g_6>")|(?P<g_7>\\\\[<!>]|\\\\(f{1,5}|p{1,5}|mf|mp|fp|spp?|sff?|sfz|rfz|n|cresc|decresc|dim|cr|decr)(?![A-Za-, re.MULTILINE)

class ly.lex.lilypond.ParseDuration(argcount=None)

   Bases: "FallthroughParser"

   fallthrough(state)

      Called when no match is returned by parse().

      This implementation leaves the current parser and returns None
      (causing the State to continue parsing).

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.Dot'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\.)', re.MULTILINE)

class ly.lex.lilypond.ParseDurationScaling(argcount=None)

   Bases: "ParseDuration"

   fallthrough(state)

      Called when no match is returned by parse().

      This implementation leaves the current parser and returns None
      (causing the State to continue parsing).

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.Scaling'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\*[\\t ]*\\d+(/\\d+)?)', re.MULTILINE)

class ly.lex.lilypond.ParseFigure(argcount=None)

   Bases: "Parser"

   Parse inside "< >" in figure mode.

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.FigureEnd'>, <class 'ly.lex.lilypond.FigureBracket'>, <class 'ly.lex.lilypond.FigureStep'>, <class 'ly.lex.lilypond.FigureAccidental'>, <class 'ly.lex.lilypond.FigureModifier'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>>)|(?P<g_6>[][])|(?P<g_7>_|\\d+)|(?P<g_8>[-+!]+)|(?P<g_9>\\\\[\\\\!+]|/)|(?P<g_10>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_, re.MULTILINE)

class ly.lex.lilypond.ParseFigureMode(argcount=None)

   Bases: "ParseInputMode", "ParseMusic"

   Parser for "\figures" and "\figuremode".

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.CloseSimultaneous'>, <class 'ly.lex.lilypond.OpenBracket'>, <class 'ly.lex.lilypond.OpenSimultaneous'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.FigureStart'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>\\})|(?P<g_6>>>)|(?P<g_7>\\{)|(?P<g_8><<)|(?P<g_9>\\|)|(?P<g_10><)|(?P<g_11>\\\\skip(?![_-]?[^\\W\\d]))|(?P<g_12>s(?![, re.MULTILINE)

class ly.lex.lilypond.ParseGlobal(argcount=None)

   Bases: "ParseLilyPond"

   Parses LilyPond from the toplevel of a file.

   items = (<class 'ly.lex.lilypond.Book'>, <class 'ly.lex.lilypond.BookPart'>, <class 'ly.lex.lilypond.Score'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.Paper'>, <class 'ly.lex.lilypond.Header'>, <class 'ly.lex.lilypond.Layout'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.Name'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.DecimalValue'>)

   pattern = re.compile('(?P<g_0>\\\\book(?![_-]?[^\\W\\d]))|(?P<g_1>\\\\bookpart(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\score(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_4>\\\\markuplines(?![_-]?[^\\W\\d]))|(?P<g, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseGlobalAssignment(argcount=None)

   Bases: "FallthroughParser", "ParseLilyPond"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.Note'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.DecimalValue'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.Dynamic'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\\\skip(?![_-]?[^\\W\\d]))|(?P<g_4>s(?![A-Za-z]))|(?P<g_5>q(?![A-Za-z]))|(?P<g_6>[Rr](?![A-Za-z]))|(?P<g_7>[a-x]+(?![A-Za-z]))|(?P<g_8>(\\\\(maxima|lo, re.MULTILINE)

class ly.lex.lilypond.ParseGrobPropertyPath(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.DotPath'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\.)', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseHeader(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\header {", leaving at "}"

   items = (<class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.HeaderVariable'>, <class 'ly.lex.lilypond.UserVariable'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\markuplines(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\markuplist(?![_-]?[^\\W\\d]))|(?P<g_4>(?<![^\\W\\d])[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\, re.MULTILINE)

class ly.lex.lilypond.ParseHideOmit(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.GrobName'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTran, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseInputMode(argcount=None)

   Bases: "ParseLilyPond"

   Base class for parser for mode-changing music commands.

   classmethod update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseLayout(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\layout {", leaving at "}"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.LayoutContext'>, <class 'ly.lex.lilypond.LayoutVariable'>, <class 'ly.lex.lilypond.UserVariable'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.DecimalValue'>, <class 'ly.lex.lilypond.Unit'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>\\})|(?P<g_6>\\\\context(?![_-]?[^\\W\\d]))|(?P<g_7>(?<![^\\W\\d])[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\W\\d]))|(?P, re.MULTILINE)

class ly.lex.lilypond.ParseLilyPond(argcount=None)

   Bases: "Parser"

   mode = 'lilypond'

class ly.lex.lilypond.ParseLyricMode(argcount=None)

   Bases: "ParseInputMode"

   Parser for "\lyrics", "\lyricmode", "\addlyrics", etc.

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.CloseSimultaneous'>, <class 'ly.lex.lilypond.OpenBracket'>, <class 'ly.lex.lilypond.OpenSimultaneous'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.LyricHyphen'>, <class 'ly.lex.lilypond.LyricExtender'>, <class 'ly.lex.lilypond.LyricSkip'>, <class 'ly.lex.lilypond.LyricText'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>\\})|(?P<g_6>>>)|(?P<g_7>\\{)|(?P<g_8><<)|(?P<g_9>\\|)|(?P<g_10>--(?=($|[\\s\\\\])))|(?P<g_11>__(?=($|[\\s\\\\])))|(?P, re.MULTILINE)

class ly.lex.lilypond.ParseMarkup(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex.lilypond.MarkupScore'>, <class 'ly.lex.lilypond.MarkupCommand'>, <class 'ly.lex.lilypond.MarkupUserCommand'>, <class 'ly.lex.lilypond.OpenBracketMarkup'>, <class 'ly.lex.lilypond.CloseBracketMarkup'>, <class 'ly.lex.lilypond.MarkupWord'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>)

   pattern = re.compile('(?P<g_0>\\\\score(?![_-]?[^\\W\\d]))|(?P<g_1>\\\\[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\W\\d]))|(?P<g_2>\\{)|(?P<g_3>\\})|(?P<g_4>[^{}"\\\\\\s#%]+)|(?P<g_5>\\s+)|(?P<g_6>%{)|(?P<g_7>%.*$)|(?P<g_8>[, re.MULTILINE)

class ly.lex.lilypond.ParseMidi(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\midi {", leaving at "}"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.LayoutContext'>, <class 'ly.lex.lilypond.LayoutVariable'>, <class 'ly.lex.lilypond.UserVariable'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.DecimalValue'>, <class 'ly.lex.lilypond.Unit'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>\\})|(?P<g_6>\\\\context(?![_-]?[^\\W\\d]))|(?P<g_7>(?<![^\\W\\d])[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\W\\d]))|(?P, re.MULTILINE)

class ly.lex.lilypond.ParseMusic(argcount=None)

   Bases: "ParseLilyPond"

   Parses LilyPond music expressions.

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.Note'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.Octave'>, <class 'ly.lex.lilypond.OctaveCheck'>, <class 'ly.lex.lilypond.AccidentalCautionary'>, <class 'ly.lex.lilypond.AccidentalReminder'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.VoiceSeparator'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SequentialEnd'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.SimultaneousEnd'>, <class 'ly.lex.lilypond.ChordStart'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.SlurStart'>, <class 'ly.lex.lilypond.SlurEnd'>, <class 'ly.lex.lilypond.PhrasingSlurStart'>, <class 'ly.lex.lilypond.PhrasingSlurEnd'>, <class 'ly.lex.lilypond.Tie'>, <class 'ly.lex.lilypond.BeamStart'>, <class 'ly.lex.lilypond.BeamEnd'>, <class 'ly.lex.lilypond.LigatureStart'>, <class 'ly.lex.lilypond.LigatureEnd'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.TremoloColon'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>\\\\[<!>]|\\\\(f{1,5}|p{1,5}|mf|mp|fp|spp?|sff?|sfz|rfz|n|cresc|decresc|dim|cr|decr)(?![A-Za-z]))|(?P<g_6>\\\\skip(?![, re.MULTILINE)

class ly.lex.lilypond.ParseNoteMode(argcount=None)

   Bases: "ParseMusic"

   Parser for "\notes" and "\notemode". Same as Music itself.

class ly.lex.lilypond.ParseOverride(argcount=None)

   Bases: "ParseLilyPond"

   argcount = 0

   items = (<class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.GrobProperty'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>)

   pattern = re.compile('(?P<g_0>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTranscriptionLyrics|GregorianTranscriptionSt, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParsePaper(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\paper {", leaving at "}"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.PaperVariable'>, <class 'ly.lex.lilypond.UserVariable'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.DecimalValue'>, <class 'ly.lex.lilypond.Unit'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[#$](?![{}]))|(?P<g_4>")|(?P<g_5>\\})|(?P<g_6>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_7>\\\\markuplines(?![_-]?[^\\W\\d]))|(?P<g_8>\\\\markuplist(?![_-]?[^, re.MULTILINE)

class ly.lex.lilypond.ParsePitchCommand(argcount=None)

   Bases: "FallthroughParser"

   argcount = 1

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.Note'>, <class 'ly.lex.lilypond.Octave'>)

   pattern = re.compile("(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[a-x]+(?![A-Za-z]))|(?P<g_4>,+|'+)", re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseRepeat(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.RepeatSpecifier'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.RepeatCount'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(percent|segno|tremolo|unfold|volta)(?![A-Za-z]))|(?P<g_4>")|(?P<g_5>\\d+)', re.MULTILINE)

class ly.lex.lilypond.ParseRevert(argcount=None)

   Bases: "FallthroughParser"

   parse the arguments of "\revert"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.GrobProperty'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTran, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseScore(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\score {", leaving at "}"

   items = (<class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.Header'>, <class 'ly.lex.lilypond.Layout'>, <class 'ly.lex.lilypond.Midi'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>\\\\header(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\layout(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\midi(?![_-]?[^\\W\\d]))|(?P<g_4>\\\\with(?![_-]?[^\\W\\d]))|(?P<g_5>\\s+)|(?P<g_6>%{)|(?P<g_7>%.*$, re.MULTILINE)

class ly.lex.lilypond.ParseScriptAbbreviationOrFingering(argcount=None)

   Bases: "FallthroughParser"

   argcount = 1

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.ScriptAbbreviation'>, <class 'ly.lex.lilypond.Fingering'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>[+|!>._^-])|(?P<g_4>\\d+)', re.MULTILINE)

class ly.lex.lilypond.ParseSet(argcount=None)

   Bases: "ParseLilyPond"

   argcount = 0

   items = (<class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.ContextProperty'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.Name'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>)

   pattern = re.compile('(?P<g_0>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTranscriptionLyrics|GregorianTranscriptionSt, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseString(argcount=None)

   Bases: "Parser"

   default

      alias of "String"

   items = (<class 'ly.lex.lilypond.StringQuotedEnd'>, <class 'ly.lex.lilypond.StringQuoteEscape'>)

   pattern = re.compile('(?P<g_0>")|(?P<g_1>\\\\[\\\\"])', re.MULTILINE)

class ly.lex.lilypond.ParseTempo(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.EqualSign'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_4>")|(?P<g_5>[#$](?![{}]))|(?P<g_6>(\\\\(maxima|longa|breve)(?![_-]?[^\\W\\d])|(1|2|4|8|16|32|64|128|256|512|1024|2, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseTempoAfterEqualSign(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.TempoSeparator'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\d+)|(?P<g_4>[-~](?=\\s*\\d))', re.MULTILINE)

class ly.lex.lilypond.ParseTranslator(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.Name'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTran, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseTranslatorId(argcount=None)

   Bases: "FallthroughParser"

   argcount = 1

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.Name'>, <class 'ly.lex.lilypond.StringQuotedStart'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>(?<![^\\W\\d])[^\\W\\d_]+([_-][^\\W\\d_]+)*(?![_-]?[^\\W\\d]))|(?P<g_4>")', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseTremolo(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex.lilypond.TremoloDuration'>,)

   pattern = re.compile('(?P<g_0>\\b(8|16|32|64|128|256|512|1024|2048)(?!\\d))', re.MULTILINE)

class ly.lex.lilypond.ParseTweak(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.GrobProperty'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(Accidental|AccidentalCautionary|AccidentalPlacement|AccidentalSuggestion|Ambitus|AmbitusAccidental|AmbitusLine|AmbitusNoteHead|Arpeggio|BalloonText, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseTweakGrobProperty(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.DecimalValue'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\.)|(?P<g_4>-?\\d+(\\.\\d+)?)', re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseUnset(argcount=None)

   Bases: "FallthroughParser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.ContextProperty'>, <class 'ly.lex.lilypond.Name'>)

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>%{)|(?P<g_2>%.*$)|(?P<g_3>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTran, re.MULTILINE)

   update_state(state, token)

      Called by the default implementation of Token.update_state().

      Does nothing by default.

class ly.lex.lilypond.ParseWith(argcount=None)

   Bases: "ParseLilyPond"

   Parses the expression after "\with {", leaving at "}"

   items = (<class 'ly.lex.lilypond.CloseBracket'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.ContextProperty'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>\\b(ChoirStaff|ChordGrid|ChordGridScore|ChordNames|CueVoice|Devnull|DrumStaff|DrumVoice|Dynamics|FiguredBass|FretBoards|Global|GrandStaff|GregorianTranscriptionLyrics|GregorianTr, re.MULTILINE)

class ly.lex.lilypond.Partial(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\partial(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.PhrasingSlurEnd(string, pos)

   Bases: "SlurEnd"

   end

   matchname = 'phrasingslur'

   pos

   rx = '\\\\\\)'

class ly.lex.lilypond.PhrasingSlurStart(string, pos)

   Bases: "SlurStart"

   end

   matchname = 'phrasingslur'

   pos

   rx = '\\\\\\('

class ly.lex.lilypond.PipeSymbol(string, pos)

   Bases: "Delimiter"

   end

   pos

   rx = '\\|'

class ly.lex.lilypond.PitchCommand(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\(relative|transpose|transposition|key|octaveCheck)(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Q(string, pos)

   Bases: "MusicItem"

   end

   pos

   rx = 'q(?![A-Za-z])'

class ly.lex.lilypond.Repeat(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\repeat(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.RepeatCount(string, pos)

   Bases: "IntegerValue", "Leaver"

   end

   pos

class ly.lex.lilypond.RepeatSpecifier(string, pos)

   Bases: "Specifier"

   end

   pos

   rx = '\\b(percent|segno|tremolo|unfold|volta)(?![A-Za-z])'

class ly.lex.lilypond.Rest(string, pos)

   Bases: "MusicItem"

   end

   pos

   rx = '[Rr](?![A-Za-z])'

class ly.lex.lilypond.Revert(string, pos)

   Bases: "Override"

   end

   pos

   rx = '\\\\revert(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Scaling(string, pos)

   Bases: "Duration"

   end

   pos

   rx = '\\*[\\t ]*\\d+(/\\d+)?'

class ly.lex.lilypond.SchemeStart(string, pos)

   Bases: "Item"

   end

   pos

   rx = '[#$](?![{}])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Score(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\score(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.ScriptAbbreviation(string, pos)

   Bases: "Articulation", "Leaver"

   end

   pos

   rx = '[+|!>._^-]'

class ly.lex.lilypond.SequentialEnd(string, pos)

   Bases: "CloseBracket"

   end

   pos

class ly.lex.lilypond.SequentialStart(string, pos)

   Bases: "OpenBracket"

   end

   pos

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Set(string, pos)

   Bases: "Override"

   end

   pos

   rx = '\\\\set(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.SimultaneousEnd(string, pos)

   Bases: "CloseSimultaneous"

   end

   pos

class ly.lex.lilypond.SimultaneousOrSequentialCommand(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\(simultaneous|sequential)(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.SimultaneousStart(string, pos)

   Bases: "OpenSimultaneous"

   end

   pos

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Skip(string, pos)

   Bases: "MusicItem"

   end

   pos

   rx = '\\\\skip(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.Slur(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.SlurEnd(string, pos)

   Bases: "Slur", "MatchEnd"

   end

   matchname = 'slur'

   pos

   rx = '\\)'

class ly.lex.lilypond.SlurStart(string, pos)

   Bases: "Slur", "MatchStart"

   end

   matchname = 'slur'

   pos

   rx = '\\('

class ly.lex.lilypond.Spacer(string, pos)

   Bases: "MusicItem"

   end

   pos

   rx = 's(?![A-Za-z])'

class ly.lex.lilypond.Specifier(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.String(string, pos)

   Bases: "String"

   end

   pos

class ly.lex.lilypond.StringNumber(string, pos)

   Bases: "Articulation"

   end

   pos

   rx = '\\\\\\d+'

class ly.lex.lilypond.StringQuoteEscape(string, pos)

   Bases: "Character"

   end

   pos

   rx = '\\\\[\\\\"]'

class ly.lex.lilypond.StringQuotedEnd(string, pos)

   Bases: "String", "StringEnd"

   end

   pos

   rx = '"'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.StringQuotedStart(string, pos)

   Bases: "String", "StringStart"

   end

   pos

   rx = '"'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Tempo(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\tempo(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.TempoSeparator(string, pos)

   Bases: "Delimiter"

   end

   pos

   rx = '[-~](?=\\s*\\d)'

class ly.lex.lilypond.Tie(string, pos)

   Bases: "Slur"

   end

   pos

   rx = '~'

class ly.lex.lilypond.Translator(string, pos)

   Bases: "Command"

   end

   pos

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Tremolo(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.lilypond.TremoloColon(string, pos)

   Bases: "Tremolo"

   end

   pos

   rx = ':'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.TremoloDuration(string, pos)

   Bases: "Tremolo", "Leaver"

   end

   pos

   rx = '\\b(8|16|32|64|128|256|512|1024|2048)(?!\\d)'

class ly.lex.lilypond.Tweak(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\tweak(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.Unit(string, pos)

   Bases: "Command"

   end

   pos

   rx = '\\\\(mm|cm|in|pt|bp)(?![_-]?[^\\W\\d])'

class ly.lex.lilypond.Unset(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\unset(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.lilypond.UserCommand(string, pos)

   Bases: "IdentifierRef"

   end

   pos

class ly.lex.lilypond.UserVariable(string, pos)

   Bases: "Identifier"

   end

   pos

class ly.lex.lilypond.Value(string, pos)

   Bases: "Item", "Numeric"

   end

   pos

class ly.lex.lilypond.Variable(string, pos)

   Bases: "Identifier"

   end

   pos

class ly.lex.lilypond.VoiceSeparator(string, pos)

   Bases: "Delimiter"

   end

   pos

   rx = '\\\\\\\\'

class ly.lex.lilypond.With(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '\\\\with(?![_-]?[^\\W\\d])'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.


ly.lex.scheme module
====================

Parses and tokenizes Scheme input.

class ly.lex.scheme.BlockComment(string, pos)

   Bases: "Comment", "BlockComment"

   end

   pos

class ly.lex.scheme.BlockCommentEnd(string, pos)

   Bases: "Comment", "BlockCommentEnd", "Leaver"

   end

   pos

   rx = '!#'

class ly.lex.scheme.BlockCommentStart(string, pos)

   Bases: "Comment", "BlockCommentStart"

   end

   pos

   rx = '#!'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.scheme.Bool(string, pos)

   Bases: "Scheme", "Item"

   end

   pos

   rx = '#[tf]\\b'

class ly.lex.scheme.Char(string, pos)

   Bases: "Scheme", "Item"

   end

   pos

   rx = '#\\\\([a-z]+|.)'

class ly.lex.scheme.CloseParen(string, pos)

   Bases: "Scheme", "MatchEnd", "Dedent"

   end

   matchname = 'schemeparen'

   pos

   rx = '\\)'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.scheme.Comment(string, pos)

   Bases: "Comment"

   end

   pos

class ly.lex.scheme.Constant(string, pos)

   Bases: "Word"

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.scheme.Dot(string, pos)

   Bases: "Scheme"

   end

   pos

   rx = '\\.(?!\\S)'

class ly.lex.scheme.Float(string, pos)

   Bases: "Number"

   end

   pos

   rx = '-?((\\d+(\\.\\d*)|\\.\\d+)(E\\d+)?)(?=$|[)\\s])'

class ly.lex.scheme.Fraction(string, pos)

   Bases: "Number"

   end

   pos

   rx = '-?\\d+/\\d+(?=$|[)\\s])'

class ly.lex.scheme.Function(string, pos)

   Bases: "Word"

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.scheme.Keyword(string, pos)

   Bases: "Word"

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.scheme.LilyPond(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.scheme.LilyPondEnd(string, pos)

   Bases: "LilyPond", "Leaver", "MatchEnd", "Dedent"

   end

   matchname = 'schemelily'

   pos

   rx = '#}'

class ly.lex.scheme.LilyPondStart(string, pos)

   Bases: "LilyPond", "MatchStart", "Indent"

   end

   matchname = 'schemelily'

   pos

   rx = '#{'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.scheme.LineComment(string, pos)

   Bases: "Comment", "LineComment"

   end

   pos

   rx = ';.*$'

class ly.lex.scheme.Number(string, pos)

   Bases: "Item", "Numeric"

   end

   pos

   rx = '(-?\\d+|#(b[0-1]+|o[0-7]+|x[0-9a-fA-F]+)|[-+]inf.0|[-+]?nan.0)(?=$|[)\\s])'

class ly.lex.scheme.OpenParen(string, pos)

   Bases: "Scheme", "MatchStart", "Indent"

   end

   matchname = 'schemeparen'

   pos

   rx = '\\('

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.scheme.ParseBlockComment(argcount=None)

   Bases: "Parser"

   default

      alias of "BlockComment"

   items = (<class 'ly.lex.scheme.BlockCommentEnd'>,)

   pattern = re.compile('(?P<g_0>!#)', re.MULTILINE)

class ly.lex.scheme.ParseLilyPond(argcount=None)

   Bases: "ParseMusic"

   items = (<class 'ly.lex.scheme.LilyPondEnd'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.Dynamic'>, <class 'ly.lex.lilypond.Skip'>, <class 'ly.lex.lilypond.Spacer'>, <class 'ly.lex.lilypond.Q'>, <class 'ly.lex.lilypond.Rest'>, <class 'ly.lex.lilypond.Note'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.Length'>, <class 'ly.lex.lilypond.Octave'>, <class 'ly.lex.lilypond.OctaveCheck'>, <class 'ly.lex.lilypond.AccidentalCautionary'>, <class 'ly.lex.lilypond.AccidentalReminder'>, <class 'ly.lex.lilypond.PipeSymbol'>, <class 'ly.lex.lilypond.VoiceSeparator'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SequentialEnd'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.SimultaneousEnd'>, <class 'ly.lex.lilypond.ChordStart'>, <class 'ly.lex.lilypond.ContextName'>, <class 'ly.lex.lilypond.GrobName'>, <class 'ly.lex.lilypond.SlurStart'>, <class 'ly.lex.lilypond.SlurEnd'>, <class 'ly.lex.lilypond.PhrasingSlurStart'>, <class 'ly.lex.lilypond.PhrasingSlurEnd'>, <class 'ly.lex.lilypond.Tie'>, <class 'ly.lex.lilypond.BeamStart'>, <class 'ly.lex.lilypond.BeamEnd'>, <class 'ly.lex.lilypond.LigatureStart'>, <class 'ly.lex.lilypond.LigatureEnd'>, <class 'ly.lex.lilypond.Direction'>, <class 'ly.lex.lilypond.StringNumber'>, <class 'ly.lex.lilypond.IntegerValue'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.TremoloColon'>)

   pattern = re.compile('(?P<g_0>#})|(?P<g_1>\\s+)|(?P<g_2>%{)|(?P<g_3>%.*$)|(?P<g_4>[#$](?![{}]))|(?P<g_5>")|(?P<g_6>\\\\[<!>]|\\\\(f{1,5}|p{1,5}|mf|mp|fp|spp?|sff?|sfz|rfz|n|cresc|decresc|dim|cr|decr)(?![A-Za-z]))|(?P<g_7>, re.MULTILINE)

class ly.lex.scheme.ParseScheme(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex._token.Space'>, <class 'ly.lex.scheme.OpenParen'>, <class 'ly.lex.scheme.CloseParen'>, <class 'ly.lex.scheme.LineComment'>, <class 'ly.lex.scheme.BlockCommentStart'>, <class 'ly.lex.scheme.LilyPondStart'>, <class 'ly.lex.scheme.VectorStart'>, <class 'ly.lex.scheme.Dot'>, <class 'ly.lex.scheme.Bool'>, <class 'ly.lex.scheme.Char'>, <class 'ly.lex.scheme.Quote'>, <class 'ly.lex.scheme.Fraction'>, <class 'ly.lex.scheme.Float'>, <class 'ly.lex.scheme.Number'>, <class 'ly.lex.scheme.Constant'>, <class 'ly.lex.scheme.Keyword'>, <class 'ly.lex.scheme.Function'>, <class 'ly.lex.scheme.Variable'>, <class 'ly.lex.scheme.Word'>, <class 'ly.lex.scheme.StringQuotedStart'>)

   mode = 'scheme'

   pattern = re.compile('(?P<g_0>\\s+)|(?P<g_1>\\()|(?P<g_2>\\))|(?P<g_3>;.*$)|(?P<g_4>#!)|(?P<g_5>#{)|(?P<g_6>#\\()|(?P<g_7>\\.(?!\\S))|(?P<g_8>#[tf]\\b)|(?P<g_9>#\\\\([a-z]+|.))|(?P<g_10>[\'`,])|(?P<g_11>-?\\d+/\\d+(?=$|[), re.MULTILINE)

class ly.lex.scheme.ParseString(argcount=None)

   Bases: "Parser"

   default

      alias of "String"

   items = (<class 'ly.lex.scheme.StringQuotedEnd'>, <class 'ly.lex.scheme.StringQuoteEscape'>)

   pattern = re.compile('(?P<g_0>")|(?P<g_1>\\\\[\\\\"])', re.MULTILINE)

class ly.lex.scheme.Quote(string, pos)

   Bases: "Scheme"

   end

   pos

   rx = "['`,]"

class ly.lex.scheme.Scheme(string, pos)

   Bases: "Token"

   Baseclass for Scheme tokens.

   end

   pos

class ly.lex.scheme.String(string, pos)

   Bases: "String"

   end

   pos

class ly.lex.scheme.StringQuoteEscape(string, pos)

   Bases: "Character"

   end

   pos

   rx = '\\\\[\\\\"]'

class ly.lex.scheme.StringQuotedEnd(string, pos)

   Bases: "String", "StringEnd"

   end

   pos

   rx = '"'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.scheme.StringQuotedStart(string, pos)

   Bases: "String", "StringStart"

   end

   pos

   rx = '"'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.scheme.Variable(string, pos)

   Bases: "Word"

   end

   pos

   classmethod test_match(match)

      Should return True if the match should indeed instantiate this
      class.

      This class method is only called if multiple Token classes in
      the Parser's items list have the same rx attribute. This method
      is then called for every matching Token subclass until one
      returns True. That token is then instantiated. (The method is
      not called for the last class in the list that have the same rx
      attribute, and also not if there is only one class with that rx
      attribute.)

      The default implementation always returns True.

class ly.lex.scheme.VectorStart(string, pos)

   Bases: "OpenParen"

   end

   pos

   rx = '#\\('

class ly.lex.scheme.Word(string, pos)

   Bases: "Scheme", "Item"

   end

   pos

   rx = '[^()"{}\\s]+'


ly.lex.texinfo module
=====================

Parses and tokenizes Texinfo input, recognizing LilyPond in Texinfo.

class ly.lex.texinfo.Accent(string, pos)

   Bases: "EscapeChar"

   end

   pos

   rx = '@[\'"\',=^`~](\\{[a-zA-Z]\\}|[a-zA-Z]\\b)'

class ly.lex.texinfo.Attribute(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.texinfo.Block(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.texinfo.BlockCommentEnd(string, pos)

   Bases: "Comment", "Leaver", "BlockCommentEnd"

   end

   pos

   rx = '@end\\s+ignore\\b'

class ly.lex.texinfo.BlockCommentStart(string, pos)

   Bases: "Comment", "BlockCommentStart"

   end

   pos

   rx = '@ignore\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.BlockEnd(string, pos)

   Bases: "Block", "Leaver"

   end

   pos

   rx = '\\}'

class ly.lex.texinfo.BlockStart(string, pos)

   Bases: "Block"

   end

   pos

   rx = '@[a-zA-Z]+\\{'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.Comment(string, pos)

   Bases: "Comment"

   end

   pos

class ly.lex.texinfo.EscapeChar(string, pos)

   Bases: "Character"

   end

   pos

   rx = '@[@{}]'

class ly.lex.texinfo.Keyword(string, pos)

   Bases: "Token"

   end

   pos

   rx = '@[a-zA-Z]+'

class ly.lex.texinfo.LilyPondAttrEnd(string, pos)

   Bases: "Attribute", "Leaver"

   end

   pos

   rx = '\\]'

class ly.lex.texinfo.LilyPondAttrStart(string, pos)

   Bases: "Attribute"

   end

   pos

   rx = '\\['

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.LilyPondBlockEnd(string, pos)

   Bases: "Block", "Leaver"

   end

   pos

   rx = '\\}'

class ly.lex.texinfo.LilyPondBlockStart(string, pos)

   Bases: "Block"

   end

   pos

   rx = '@lilypond(?=(\\[[a-zA-Z,=0-9\\\\\\s]+\\])?\\{)'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.LilyPondBlockStartBrace(string, pos)

   Bases: "Block"

   end

   pos

   rx = '\\{'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.LilyPondEnvEnd(string, pos)

   Bases: "Keyword", "Leaver"

   end

   pos

   rx = '@end\\s+lilypond\\b'

class ly.lex.texinfo.LilyPondEnvStart(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '@lilypond\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.LilyPondFileStart(string, pos)

   Bases: "Block"

   end

   pos

   rx = '@lilypondfile\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.LilyPondFileStartBrace(string, pos)

   Bases: "Block"

   end

   pos

   rx = '\\{'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.

class ly.lex.texinfo.LineComment(string, pos)

   Bases: "Comment", "LineComment"

   end

   pos

   rx = '@c\\b.*$'

class ly.lex.texinfo.ParseBlock(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex.texinfo.BlockEnd'>, <class 'ly.lex.texinfo.Accent'>, <class 'ly.lex.texinfo.EscapeChar'>, <class 'ly.lex.texinfo.BlockStart'>, <class 'ly.lex.texinfo.Keyword'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>@[\'"\',=^`~](\\{[a-zA-Z]\\}|[a-zA-Z]\\b))|(?P<g_2>@[@{}])|(?P<g_3>@[a-zA-Z]+\\{)|(?P<g_4>@[a-zA-Z]+)', re.MULTILINE)

class ly.lex.texinfo.ParseComment(argcount=None)

   Bases: "Parser"

   default

      alias of "Comment"

   items = (<class 'ly.lex.texinfo.BlockCommentEnd'>,)

   pattern = re.compile('(?P<g_0>@end\\s+ignore\\b)', re.MULTILINE)

class ly.lex.texinfo.ParseLilyPondAttr(argcount=None)

   Bases: "Parser"

   default

      alias of "Attribute"

   items = (<class 'ly.lex.texinfo.LilyPondAttrEnd'>,)

   pattern = re.compile('(?P<g_0>\\])', re.MULTILINE)

class ly.lex.texinfo.ParseLilyPondBlock(argcount=None)

   Bases: "ParseGlobal"

   items = (<class 'ly.lex.texinfo.LilyPondBlockEnd'>, <class 'ly.lex.lilypond.Book'>, <class 'ly.lex.lilypond.BookPart'>, <class 'ly.lex.lilypond.Score'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.Paper'>, <class 'ly.lex.lilypond.Header'>, <class 'ly.lex.lilypond.Layout'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.Name'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.DecimalValue'>)

   pattern = re.compile('(?P<g_0>\\})|(?P<g_1>\\\\book(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\bookpart(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\score(?![_-]?[^\\W\\d]))|(?P<g_4>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_5>\\\\markuplines(?![_-]?[^\\, re.MULTILINE)

class ly.lex.texinfo.ParseLilyPondBlockAttr(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex.texinfo.LilyPondAttrStart'>, <class 'ly.lex.texinfo.LilyPondBlockStartBrace'>)

   pattern = re.compile('(?P<g_0>\\[)|(?P<g_1>\\{)', re.MULTILINE)

class ly.lex.texinfo.ParseLilyPondEnv(argcount=None)

   Bases: "ParseGlobal"

   items = (<class 'ly.lex.texinfo.LilyPondEnvEnd'>, <class 'ly.lex.lilypond.Book'>, <class 'ly.lex.lilypond.BookPart'>, <class 'ly.lex.lilypond.Score'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.Paper'>, <class 'ly.lex.lilypond.Header'>, <class 'ly.lex.lilypond.Layout'>, <class 'ly.lex._token.Space'>, <class 'ly.lex.lilypond.BlockCommentStart'>, <class 'ly.lex.lilypond.LineComment'>, <class 'ly.lex.lilypond.SchemeStart'>, <class 'ly.lex.lilypond.StringQuotedStart'>, <class 'ly.lex.lilypond.SequentialStart'>, <class 'ly.lex.lilypond.SimultaneousStart'>, <class 'ly.lex.lilypond.Repeat'>, <class 'ly.lex.lilypond.PitchCommand'>, <class 'ly.lex.lilypond.Override'>, <class 'ly.lex.lilypond.Revert'>, <class 'ly.lex.lilypond.Set'>, <class 'ly.lex.lilypond.Unset'>, <class 'ly.lex.lilypond.Hide'>, <class 'ly.lex.lilypond.Omit'>, <class 'ly.lex.lilypond.Tweak'>, <class 'ly.lex.lilypond.New'>, <class 'ly.lex.lilypond.Context'>, <class 'ly.lex.lilypond.Change'>, <class 'ly.lex.lilypond.With'>, <class 'ly.lex.lilypond.Clef'>, <class 'ly.lex.lilypond.Tempo'>, <class 'ly.lex.lilypond.Partial'>, <class 'ly.lex.lilypond.KeySignatureMode'>, <class 'ly.lex.lilypond.AccidentalStyle'>, <class 'ly.lex.lilypond.AlterBroken'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.ChordMode'>, <class 'ly.lex.lilypond.DrumMode'>, <class 'ly.lex.lilypond.FigureMode'>, <class 'ly.lex.lilypond.LyricMode'>, <class 'ly.lex.lilypond.NoteMode'>, <class 'ly.lex.lilypond.MarkupStart'>, <class 'ly.lex.lilypond.MarkupLines'>, <class 'ly.lex.lilypond.MarkupList'>, <class 'ly.lex.lilypond.ArticulationCommand'>, <class 'ly.lex.lilypond.Keyword'>, <class 'ly.lex.lilypond.Command'>, <class 'ly.lex.lilypond.SimultaneousOrSequentialCommand'>, <class 'ly.lex.lilypond.UserCommand'>, <class 'ly.lex.lilypond.Name'>, <class 'ly.lex.lilypond.DotPath'>, <class 'ly.lex.lilypond.EqualSign'>, <class 'ly.lex.lilypond.Fraction'>, <class 'ly.lex.lilypond.DecimalValue'>)

   pattern = re.compile('(?P<g_0>@end\\s+lilypond\\b)|(?P<g_1>\\\\book(?![_-]?[^\\W\\d]))|(?P<g_2>\\\\bookpart(?![_-]?[^\\W\\d]))|(?P<g_3>\\\\score(?![_-]?[^\\W\\d]))|(?P<g_4>\\\\markup(?![_-]?[^\\W\\d]))|(?P<g_5>\\\\markupl, re.MULTILINE)

class ly.lex.texinfo.ParseLilyPondEnvAttr(argcount=None)

   Bases: "FallthroughParser"

   fallthrough(state)

      Called when no match is returned by parse().

      This implementation leaves the current parser and returns None
      (causing the State to continue parsing).

   items = (<class 'ly.lex.texinfo.LilyPondAttrStart'>,)

   pattern = re.compile('(?P<g_0>\\[)', re.MULTILINE)

class ly.lex.texinfo.ParseLilyPondFile(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex.texinfo.LilyPondAttrStart'>, <class 'ly.lex.texinfo.LilyPondFileStartBrace'>)

   pattern = re.compile('(?P<g_0>\\[)|(?P<g_1>\\{)', re.MULTILINE)

class ly.lex.texinfo.ParseTexinfo(argcount=None)

   Bases: "Parser"

   items = (<class 'ly.lex.texinfo.LineComment'>, <class 'ly.lex.texinfo.BlockCommentStart'>, <class 'ly.lex.texinfo.Accent'>, <class 'ly.lex.texinfo.EscapeChar'>, <class 'ly.lex.texinfo.LilyPondBlockStart'>, <class 'ly.lex.texinfo.LilyPondEnvStart'>, <class 'ly.lex.texinfo.LilyPondFileStart'>, <class 'ly.lex.texinfo.BlockStart'>, <class 'ly.lex.texinfo.VerbatimStart'>, <class 'ly.lex.texinfo.Keyword'>)

   mode = 'texinfo'

   pattern = re.compile('(?P<g_0>@c\\b.*$)|(?P<g_1>@ignore\\b)|(?P<g_2>@[\'"\',=^`~](\\{[a-zA-Z]\\}|[a-zA-Z]\\b))|(?P<g_3>@[@{}])|(?P<g_4>@lilypond(?=(\\[[a-zA-Z,=0-9\\\\\\s]+\\])?\\{))|(?P<g_5>@lilypond\\b)|(?P<g_6>@lilypon, re.MULTILINE)

class ly.lex.texinfo.ParseVerbatim(argcount=None)

   Bases: "Parser"

   default

      alias of "Verbatim"

   items = (<class 'ly.lex.texinfo.VerbatimEnd'>,)

   pattern = re.compile('(?P<g_0>@end\\s+verbatim\\b)', re.MULTILINE)

class ly.lex.texinfo.Verbatim(string, pos)

   Bases: "Token"

   end

   pos

class ly.lex.texinfo.VerbatimEnd(string, pos)

   Bases: "Keyword", "Leaver"

   end

   pos

   rx = '@end\\s+verbatim\\b'

class ly.lex.texinfo.VerbatimStart(string, pos)

   Bases: "Keyword"

   end

   pos

   rx = '@verbatim\\b'

   update_state(state)

      Lets the token update the state, e.g. enter a different parser.

      This method is called by the State upon instantiation of the
      tokens.

      Don't use it later on to have a State follow already
      instantiated Tokens because the FallthroughParser type can also
      change the state without generating a Token. Use State.follow()
      to have a State follow instantiated Tokens.

      The default implementation lets the Parser decide on state
      change.
