Abstract
DataScript is a language to describe and manipulate binary data formats as types. DataScript consists of two components: a constraint-based specification language that uses DataScript types to describe the physical layout of data and a language binding that provides a simple programming interface to script binary data. A DataScript compiler generates Java libraries that are linked with DataScript scripts.
DataScript specifications can be used to describe formats in a programmatic way, eliminating the vagaries and ambiguities often associated with prosaic format descriptions. The libraries generated by the DataScript compiler free the programmer from the tedious task of coding input and output routines. More importantly, they assure correctness and safety by validating both the input read and the output generated. We show examples that demonstrate that DataScript is simple, yet powerful enough to describe many commonly used formats. Similar to how scripting languages such as Perl allow the manipulation of text files, the libraries generated by the DataScript compiler can be used to quickly write scripts that safely manipulate binary files.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Gamma, E., Helm, R., Johnson, R., AND Vlissides, J.Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Publishing Company, 1995.
IEEE Standards Board. IEEE Std 802.11-1997, 1997.
Iyengar, S.Java Metadata Interface (JMI Specification), Nov. 2001. Version 1.0 Update Public Review Draft Specification.
Lindholm, T., and Yellin, F.The Java Virtual Machine Specification. The Java Series. Addison-Wesley, Jan. 1997.
Lyon, B. Sun remote procedure call specification. Tech. rep., Sun Microsystems, 1984.
Mccann, P. J., AND Chandra, S. Packet Types: abstract specification of network protocol messages. In Proceedings of the SIGCOMM’ 00 Conf. (Stockholm, Sweden, Aug. 2000).
Object Management Group. The Common Object Request Broker: Architecture and Specification, June 1999. Revision 2.3. OMG Document formal/98-12-01. Part of the CORBA 2.3 specification.
Object Management Group. Meta Object Facility (MOF) Specification, Mar. 2000. Revision 1.3 OMG Document 00-04-03.
Tools Interface Standards (TIS) Committee. ELF: Executable and Linkable Format: Portable Formats Specification, Version 1.2, May 1995.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Back, G. (2002). DataScript- A Specification and Scripting Language for Binary Data. In: Batory, D., Consel, C., Taha, W. (eds) Generative Programming and Component Engineering. GPCE 2002. Lecture Notes in Computer Science, vol 2487. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45821-2_4
Download citation
DOI: https://doi.org/10.1007/3-540-45821-2_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-44284-4
Online ISBN: 978-3-540-45821-0
eBook Packages: Springer Book Archive