Jira Parsec parser
Modulejira-wiki-markup-1.5.1Haskell2010
Text.Jira.Parser.Core
Core components of the Jira wiki markup parser.
- 2 types
- 15 values
- Packagejira-wiki-markup-1.5.1
- Exports17
- LanguageHaskell2010
- LicenceMIT
- SourceCore.hs
Jira parser and state
5 declarationsParser state used to keep track of various parameteres.
Constructors
ParserStatestateInLink :: Boolwhether the parser is within a link
stateInList :: Boolwhether the parser is within a list
stateInMarkup :: Boolwhether the parser is within markup
stateInTable :: Boolwhether the parser is within a table
stateLastSpcPos :: Maybe SourcePosmost recent space char position
stateLastStrPos :: Maybe SourcePosposition at which the last string ended
Default parser state (i.e., start state)
Parses a string with the given Jira parser.
Set a flag in the parser to True before running a parser, then
set the flag's value to False.
String position tracking
5 declarationsUpdates the state, marking the current input position as the end of a string.
Updates the state, marking the current input position as the end of a string.
Returns true when the current parser position is either at the beginning of the document or if the preceding characters did not belong to a string.
Returns True iff the character before the current parser
position was a space.
Parsing helpers
7 declarationsSucceeds if the parser is looking at the end of a paragraph.
Variant of parsec's notFollowedBy function which properly fails even if
the given parser does not consume any input (like eof does).
Like manyTill, but reads at least one item.
Parses an empty line, i.e., a line with no chars or whitespace only.
Skip zero or more space chars.
Parses a set of panel parameters