This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-02-27
Channels
- # announcements (8)
- # architecture (3)
- # aws (18)
- # beginners (96)
- # bristol-clojurians (3)
- # calva (15)
- # cider (7)
- # clj-kondo (8)
- # clojure (135)
- # clojure-denmark (1)
- # clojure-dev (14)
- # clojure-europe (37)
- # clojure-italy (9)
- # clojure-nl (14)
- # clojure-sanfrancisco (1)
- # clojure-spec (1)
- # clojure-uk (54)
- # clojurescript (27)
- # core-async (243)
- # cursive (28)
- # data-science (6)
- # datomic (33)
- # fulcro (25)
- # graalvm (24)
- # hoplon (2)
- # instaparse (12)
- # jackdaw (1)
- # java (21)
- # juxt (12)
- # meander (10)
- # nyc (4)
- # off-topic (6)
- # om (3)
- # pathom (17)
- # perun (1)
- # re-frame (29)
- # reitit (4)
- # rum (3)
- # shadow-cljs (119)
- # spacemacs (31)
- # xtdb (14)
@mmeix it looks to me at first glance that you could make some rules span = <span> val </span> paragraph = <p> val </p> val = paragraph* | span* | val [editS: added stars to p and span in val]
the last rule allows recursion, which can infinitely nest spans or p's
notice how i defined the rigid components of the grammar on the right-hand side, with my variable, and how i use variable names only on the left-hand side.
i had to make sure it works before setting you out
notice how there can be multiple valid parses with the recursion now.
you'll probably need to be creative with the output to get rid of tags you don't need 😃 i forget exactly how we would delete unnecessary strings in the grammar itself, there's a way with rules i think, it might just be mathematical though lol