Utility to format a Bison/Yacc grammar file nicely? [closed]
Asked Answered
S

2

6

Hello there: Do you folks know of any GNU/Linux utility to format a Bison grammar file, containing C code, nicely? I'm thinking of something along the lines of GNU Indent, but designed to beautify grammar files rather than C code.

Septuor answered 13/6, 2010 at 11:11 Comment(1)
I'll point you to a related question: https://mcmap.net/q/727810/-flex-bison-ide-closed/631423Ptolemaic
R
2

Well, there's also an answer about Indenting in VIM with all the files in Folder, so if vim does a good enough job for you, you could use that.

Rooster answered 4/4, 2011 at 8:15 Comment(0)
L
1

This is not a tool for indenting - but it will take your bison file and generate a nice railroad diagram for you - http://www.bottlecaps.de/rr/ui

example of it being used: http://bramp.github.io/js-sequence-diagrams/#syntax

Leery answered 18/9, 2015 at 23:22 Comment(1)
Actually a Bison grammar must be converted first. This can be accomplished by starting at bottlecaps.de/convertKennethkennett

© 2022 - 2024 — McMap. All rights reserved.