yeap you use what makes your life easier ;) On Thu, Apr 2, 2015 at 12:49 PM, p...@highoctane.be <p...@highoctane.be> wrote:
> Sure works. > > Regex > > '((XXX Logical Channel) ([0-9])) on (((Upstream)|(Downstream)) ([0-9])) on > ((chassis) ([0-9])), ((slot) ([0-9])), ((mac) ([0-9]))' asRegex > > But in PP, things were more comple and there were a lot of them, so: > > line > ^ temperatureStatusDescrEntry token asParser > / temperatureStatusValueEntry token asParser > / temperatureThresholdEntry token asParser > / temperatureLastShutdownEntry token asParser > / temperatureStateEntry token asParser > and things like > > temperatureStatusDescrEntry ^ temperatureStatusDescrOidPrefix, oidIndex, > space, equals, space, stringType, space, displayStringValue. > > made my day much easier. > > Especially when I had all the tokens I needed: > > gauge32Type ^'Gauge32:' asParser flatten ==> [:str | #gauge32]. > > > Not sure it would have been as flexible with a SmaCC (I am not familiar > with SmaCC but used Lex/Yacc|Bison in another life). > > Phil >