From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Thu, 20 Aug 2009 17:26:41 -0400 To: 9fans@9fans.net In-Reply-To: <3aaafc130908201414j7556ea81nfafbb54985f02ca1@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Recursive structural expressions? Topicbox-Message-UUID: 4f8006b0-ead5-11e9-9d60-3106f5b1d025 > No, I know you can apply them `recursively', I mean something more > like an expression in a CFG or yacc. > > > > > can you outline somehow what you're thinking of? > > Basically, if you could take a bracketed expression in sam and then > name it, and then call it recursively. > > All the problems with CFGs (shift/reduce problems, ambiguities, etc) > would possibly apply. could you give an example in your proposed language? i don't see how greedy regular expressions wouldn't kill you. example. let's say you have a SRE that breaks text into lines, you couldn't apply that recursively. in fact i think you'd have the same problem with any SRE, since they are greedy and can't count. maybe i'm just confused because 'x' goes from a blob of text to a stream of tokens. where as grammars go from a stream of tokens to productions. maybe you mean to replace the traditional tokenizer with named SREs? - erik