I would put the Inform code after a __DATA__ statement and then read the Inform code
Brilliant! Why didn't I think of that?
into a hash-structure (or more likely a hash of hashes of
Yes, it will need to be a nested structure. Something like
$datum{$objectname}{$propertyname}=$propertyvalue; $datum{$objectname}{$attributename}=(($attr)?1:0);
As an added bonus, this way of doing it will allow me to give the Inform objects hardware short names, declare their parents, and so on. Simply wonderful.
The only downside is, this prevents me from putting a bunch of Perl code at the end as I was doing, but I can live with that restriction.
sub H{$_=shift;while($_){$c=0;while(s/^2//){$c++;}s/^4//;$ v.=(' ','|','_',"\n",'\\','/')[$c]}$v}sub A{$_=shift;while ($_){$d=hex chop;for(1..4){$pl.=($d%2)?4:2;$d>>=1}}$pl}$H= "16f6da116f6db14b4b0906c4f324";print H(A($H)) # -- jonadab
In reply to Re: Pointers on working with another language's syntax
by jonadab
in thread Pointers on working with another language's syntax
by jonadab
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |