Skip to content

refactor(ChartFormat): use Antlr as parser backend#90

Open
freeze-dolphin wants to merge 25 commits intoArcthesia:trunkfrom
freeze-dolphin:antlr
Open

refactor(ChartFormat): use Antlr as parser backend#90
freeze-dolphin wants to merge 25 commits intoArcthesia:trunkfrom
freeze-dolphin:antlr

Conversation

@freeze-dolphin
Copy link
Copy Markdown
Contributor

@freeze-dolphin freeze-dolphin commented Mar 7, 2026

by utilizing antlr, we can achieve for example:

  • add a dictionary after the arc() body like:

    image
  • timing groups can be read regardless of the indention of sub-events:

    image
  • other cool things...

    Because the chart is firstly parsed into an AST, you can easily extend the functionality of the format by processing the syntax tree (without directly manipulate the text things)


Todo

  • support editing new fields added by this PR
  • fix that the error reporter deviates line numbers
  • Arcaea aff format compatibility
  • designant impl in Gameplay
  • refactor ChartReader and IChartWriter impls

Implemented

  • import chart files with other format in Compose

    2026-03-07.19-19-23.mp4
  • designant: allow custom trace color, without breaking project trace color settings

    image

    the chart format belike:

    arc(78000,82800,0.50,0.50,s,0.00,0.00,0,none,true)[arctap(78000)]< tracecolor: #F02961 >;
    
  • arcresolution: add a standalone resolution param for arc

    arc(..., true)< resolution: 2.00 >;
    
    // it can also coexists with tracecolor
    arc(..., true)[arctap(1)]<tracecolor:#012456,resolution:2.5>;
    

@freeze-dolphin freeze-dolphin marked this pull request as draft March 7, 2026 11:22
@freeze-dolphin freeze-dolphin changed the title ChartFormat: refactor ChartFormat module, and use Antlr as parser backend refactor(ChartFormat): use Antlr as parser backend Mar 18, 2026
@freeze-dolphin freeze-dolphin marked this pull request as ready for review April 7, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant