Jira Parsec parser
Modulejira-wiki-markup-1.5.1Haskell2010
Text.Jira.Parser.Core
Core components of the Jira wiki markup parser.
Synopsis
- type JiraParser
- data ParserState
- value defaultState
- value parseJira
- value withStateFlag
- value updateLastStrPos
- value updateLastSpcPos
- value notAfterString
- value afterString
- value afterSpace
- value endOfPara
- value notFollowedBy'
- value many1Till
- value blankline
- value skipSpaces
- value blockNames
- value parameters
- Packagejira-wiki-markup-1.5.1
- Exports17
- LanguageHaskell2010
- LicenceMIT
- SourceCore.hs
Jira parser and state
Parser 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
Updates 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
Succeeds 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