Skip to content

Commit

Permalink
blockContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Nov 25, 2024
1 parent af6734f commit 2615771
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 157 deletions.
27 changes: 21 additions & 6 deletions bluebell/akn.peg
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ grammar akn

nested_block_element <- indent content:block_element+ dedent <NestedBlockElement>

block_elements <- block_list / bullet_list / generic_block / table / longtitle / footnote / block_quote / p / line
block_elements <- block_list / bullet_list / table / longtitle / footnote / block_quote / blocks / p / line

# ------------------------------------------------------------------------------
# Speech blocks for debates
Expand All @@ -277,11 +277,6 @@ grammar akn
# Actual block elements
# ------------------------------------------------------------------------------

generic_block <- 'BLOCK' attrs:block_attrs? eol
indent
content:block_element+
dedent <GenericBlock>

longtitle <- 'LONGTITLE' body:(space content:inline+)? eol <Longtitle>

subheading <- 'SUBHEADING' body:(space content:inline+)? eol <Subheading>
Expand All @@ -297,6 +292,26 @@ grammar akn
# could start a line.
line <- !dedent content:inline+ eol <Line>

# ------------------------------------------------------------------------------
# Block container, which can contain other blocks
#
# Note: the intro and wrapUp contain blocks, which actually means they're not necessary because the blockContainer
# can contain any block. So we just don't use them.
#
# BLOCKS
# intro
#
# ITEMS
# ITEM 1
#
# wrapUp

# block container element, for grouping blocks
blocks <- 'BLOCKS' attrs:block_attrs? eol
indent
content:block_element+
dedent <BlockContainer>


# ------------------------------------------------------------------------------
# Block lists
Expand Down
Loading

0 comments on commit 2615771

Please sign in to comment.