[aprssig] APRS device identifiers (tocalls) in YAML, XML and JSON

Lynn W. Deffenbaugh (Mr) ldeffenb at homeside.to
Thu Oct 24 09:12:17 EDT 2013


It is trivial (in my mind) to programmatically generate a regular 
expression given the *, ?, and n's provided in the proposed to-call 
list.  Maintaining two separate fields is error prone, especially when 
they are expressing a single thing.  And for mere mortal consumption 
(yes, people DO look up ToCalls by hand) and ease of human understanding 
and maintenance, I'd propose keeping the single declaration and let 
programmers massage it as necessary.

IMHO, *?n is easier to parse for the purposes of constructing a regular 
expression than trying to convert whatever expression dialect is 
published to whatever expression dialect is required by any given 
information consumer.  Personally I'm most recently using lua 
(http://www.lua.org/pil/20.1.html) which has it's own pattern 
specification which I wouldn't dream of forcing on other software 
authors (see below).

But I can certainly programmatically convert APWM?? to ^APWM(%w%w)$ for 
my internal use.

Lynn (D) - KJ4ERJ - Author of APRSISCE for Windows Mobile and Win32

PS.  Here's the match characters for lua (along with ^ and $ for 
anchors) in case anyone is interested:

|.| 	all characters
|%a| 	letters
|%c| 	control characters
|%d| 	digits
|%l| 	lower case letters
|%p| 	punctuation characters
|%s| 	space characters
|%u| 	upper case letters
|%w| 	alphanumeric characters
|%x| 	hexadecimal digits
|%z| 	the character with representation 0




On 10/24/2013 5:28 AM, Georg Lukas wrote:
> * Heikki Hannikainen <hessu at hes.iki.fi> [2013-10-24 08:43]:
>> I would prefer taking a regexp library (pcre) and just throw the
>> tocall spec found in the database file at it, instead of writing my
>> own converters, since writing custom converters takes time and effort
>> and may introduce bugs. String matching is sooooo a solved problem
>> already. :)
> +1 on that. I would really like to have an easy way (regular
> expressions) to a) determine the client info block and b) extract the
> version number.
>
> My proposal would be to leave the tocall as-is, and add another
> (slightly redundant) "regex" field that allows to match for the tocall
> and to extract the version number, e.g. "^APWM(\d\d)$" (I hope I did not
> botch the syntax now, but the point is just to make the intent clear).
>
> Does YAML require any type of escaping for such strings?
>
> 73 de Georg DO1GL
>
>
> _______________________________________________
> aprssig mailing list
> aprssig at tapr.org
> http://www.tapr.org/mailman/listinfo/aprssig

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/aprssig_lists.tapr.org/attachments/20131024/8c3e734c/attachment.html>


More information about the aprssig mailing list