Re: Pygments YAML Lexer (from Spec Update)
Jeff Kowalczyk <jtk-/[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Resurrecting an old thread. Can we get a URL-reachable Reference.bnf or another plaintext representation of the spec productions put up and kept updated on yaml.org? There are enough developers adopting sphinx+pygments that someone is likely to find the YAML BNF useful enough to consume for a colorizing lexer. Cool move writing the yaml.org homepage in YAML. With a pygments YAML colorizer, it might look a bit prettier, too ;) Thanks, Jeff On Sat, 14 Apr 2007 22:21:43 -0700, Oren Ben-Kiki wrote: > This looks very interesting, and yes potentially it would be possible to > plug the productions into it. The main lack I see in the framework there is > that it doesn't support passing parameters to a 'state' or 'production', at > least not "out of the box". However there seems to be multiple ways this > could be added into the system, ranging from a global stack to using > closures. I haven't really coded in Python so I have no idea what would be > the best approach. It certainly should be doable... > > I have been caught up in a work project again, but hopefully next week I'll > be able to upload the existing (Haskell) code which you could use as an > inspiration. > > Have fun, > > Oren Ben-Kiki > > On 4/14/07, Jeff Kowalczyk <jtk-/[email protected]> wrote: >> >> Oren Ben-Kiki wrote: >> > (imminent) updated 1.1 YAML spec containing the updated productions. >> >> As the executable spec update gets finalized, would it be possible to emit >> productions in a form that would make a YAML lexer for Pygments easy, >> perhaps trivial to implement? >> >> http://pygments.org/docs/lexerdevelopment/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/