TD-LTE: Exciting Alternative, Global Momentum*

TD-LTE: Exciting Alternative, Global Momentum*

English
282 Pages
Read
Download
Downloading requires you to have access to the YouScribe library
Learn all about the services we offer

Description

  • fiche de synthèse - matière potentielle : spectrum
WHITE PAPER TD-LTE Exciting Alternative, Global Momentum
  • illustration of the dwpts structure
  • data transmission
  • td- lte
  • downlink
  • tdd
  • lte
  • spectrum
  • fdd
  • transmission
  • cell

Subjects

Informations

Published by
Reads 15
Language English
Report a problem

Programming Utilities Guide
2550 Garcia Avenue
Mountain View, CA 94043
U.S.A.
A Sun Microsystems, Inc. BusinessÓ
1994 Sun Microsystems, Inc.
2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A.
All rights reserved. This product and related documentation are protected by copyright and distributed under licenses
restricting its use, copying, distribution, and decompilation. No part of this product or related documentation may be
reproduced in any form by any means without prior written authorization of Sun and its licensors, if any.
®Portions of this product may be derived from the UNIX and Berkeley 4.3 BSD systems, licensed from UNIX System
Laboratories, Inc., a wholly owned subsidiary of Novell, Inc., and the University of California, respectively. Third-party font
software in this product is protected by copyright and licensed from Sun’s font suppliers.
RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the United States Government is subject to the restrictions
set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19.
The product described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications.
TRADEMARKS
Sun, the Sun logo, Sun Microsystems, Sun Microsystems Computer Corporation, SunSoft, the SunSoft logo, Solaris, SunOS,
OpenWindows, DeskSet, ONC, ONC+, and NFS are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S.
and certain other countries. UNIX is a registered trademark of Novell, Inc., in the United States and other countries; X/Open
Company, Ltd., is the exclusive licensor of such trademark. USL is a trademark of Novell, Inc. UnixWare is a trademark of
Novell, Inc. OPEN LOOK is a trademark of Novell, Inc. PostScript and Display PostScript are trademarks of Adobe Systems,
Inc. All other product names mentioned herein are the trademarks of their respective owners.
All SPARC trademarks, including the SCD Compliant Logo, are trademarks or registered trademarks of SPARC International,
Inc. SPARCstation, SPARCserver, SPARCengine, SPARCstorage, SPARCware, SPARCcenter, SPARCclassic, SPARCcluster,
SPARCdesign, SPARC811, SPARCprinter, UltraSPARC, microSPARC, SPARCworks, and SPARCompiler are licensed
exclusively to Sun Microsystems, Inc. Products bearing SPARC trademarks are based upon an architecture developed by Sun
Microsystems, Inc.
®The OPEN LOOK and Sun™ Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees.
Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user
interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface,
which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license
agreements.
X Window System is a product of the Massachusetts Institute of Technology.
THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE
PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW
EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN
THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.
Please
RecycleContents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
1. lex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Generating a Lexical Analyzer Program. . . . . . . . . . . . . . . . . . . 2
Writing lex Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The Fundamentals of lex Rules . . . . . . . . . . . . . . . . . . . . . . . 4
Advancedlex Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
C++ Mangled Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Using lex and yacc Together 23
Automaton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Summary of Source Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2. yacc — A Compiler Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Basic Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Actions 37
iiiLexical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Parser Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Ambiguity and Conflicts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Error Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
The yacc Environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Hints for Preparing Specifications . . . . . . . . . . . . . . . . . . . . . . . . 64
Input Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Left Recursion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
C++ Mangled Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Lexical Tie-Ins 66
Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Advanced Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Simulating error and accept in Actions. . . . . . . . . . . . . . . . . 67
Accessing Values in Enclosing Rules. . . . . . . . . . . . . . . . . . . 68
Support for Arbitrary Value Types . . . . . . . . . . . . . . . . . . . . 69
yacc Input Syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
An Advanced Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
3. make Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Dependency Checking: make vs. Shell Scripts . . . . . . . . . 94
Writing a Simple Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
iv Programming Utilities Guide—August 1994Basic Use of Implicit Rules . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Processing Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Null Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
Special Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Unknown Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Duplicate Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Reserved make Words. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Running Commands Silently . . . . . . . . . . . . . . . . . . . . . . . . 105
Automatic Retrieval of SCCS Files . . . . . . . . . . . . . . . . . . . . 106
Passing Parameters: Simple make Macros . . . . . . . . . . . . . 107
.KEEP_STATE and Command Dependency Checking . . . 109ATE and Hidden Dependencies . . . . . . . . . . . . 110
Displaying Information About a make Run 112
Using make to Compile Programs. . . . . . . . . . . . . . . . . . . . . . . . 114
A Simple Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Using Predefined Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Using Implicit Rules to Simplify a Makefile: Suffix Rules . 117
When to Use Explicit Target Entries vs. Implicit Rules . . . 118
Implicit Rules and Dynamic Macros . . . . . . . . . . . . . . . . . . . 119
Adding Suffix Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Pattern-Matching Rules:An Alternative to Suffix Rules . . 124
Building Object Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Libraries, Members, and Symbols . . . . . . . . . . . . . . . . . . . . . 131
Library Members and Dependency Checking . . . . . . . . . . . 132
Contents vUsing make to Maintain Libraries and Programs . . . . . . . . . . . 133
More about Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Linking with System-Supplied Libraries . . . . . . . . . . . . . . . 136
Compiling Programs for Debugging and Profiling . . . . . . . 137
Compiling Debugging and Profiling Variants . . . . . . . . . . 139
Maintaining Separate Program and Library Variants . . . . . 140
Maintaining a Directory of Header Files . . . . . . . . . . . . . . . 145
Compiling and Linking with Your Own Libraries . . . . . . . 145
Nested make Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Passing Parameters to Nested make Commands . . . . . . . . 149
Compiling Other Source Files . . . . . . . . . . . . . . . . . . . . . . . . 151
Maintaining Shell Scripts with make and SCCS . . . . . . . . . 154
Running Tests with make . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Maintaining Software Projects . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Organizing a Project for Ease of Maintenance . . . . . . . . . . . 158
Building the Entire Project . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
How to Maintain Directory Hierarchies with the Recursive
Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Recursive Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
How to Maintain a Large Library as a Hierarchy of
Subsidiaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Reporting Hidden Dependencies to make . . . . . . . . . . . . . . 167
make Enhancements Summary . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Default Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
The State File .make.state . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
vi Programming Utilities Guide—August 1994Hidden-Dependency Checking . . . . . . . . . . . . . . . . . . . . . . . 168
Command-Dependency Checking. . . . . . . . . . . . . . . . . . . . . 168
Automatic Retrieval of SCCS Files . . . . . . . . . . . . . . . . . . . . 168
Pattern-Matching Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Pattern-Replacement Macro References . . . . . . . . . . . . . . . . 169
New Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Support for C++ and Modula-2 . . . . . . . . . . . . . . . . . . . . . . . 171
Naming Scheme for Predefined Macros . . . . . . . . . . . . . . . . 172
New Special-Purpose Targets . . . . . . . . . . . . . . . . . . . . . . . . 172
New Implicit lint Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Macro Processing Changes . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Improved ar Library Support . . . . . . . . . . . . . . . . . . . . . . . . 175
Target Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Incompatibilities with Previous Versions . . . . . . . . . . . . . . . . . 175
New Meaning for -d Option. . . . . . . . . . . . . . . . . . . . . . . . . . 175
Dynamic Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Tilde Rules Not Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Target Names Beginning with ./ are Treated as
Local filenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
4. SCCS Source Code Control System . . . . . . . . . . . . . . . . . . . . 179
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
The sccs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
The sccs create Command . . . . . . . . . . . . . . . . . . . . . . . . . 180
Basic sccs Subcommands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Contents viiDeltas and Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
sccs Subcommands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Checking Files In and Out . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Incorporating Version-Dependent Information by Using
ID Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Making Inquiries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
Deleting the Committed Changes . . . . . . . . . . . . . . . . . . . . . 192
Version Control for Binary Files. . . . . . . . . . . . . . . . . . . . . . . . . . 195
Maintaining Source Directories . . . . . . . . . . . . . . . . . . . . . . . . . 196
Branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
Using Branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Administering SCCS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Interpreting Error Messages: sccs help . . . . . . . . . . . . . . 203
Altering History File Defaults: sccs admin . . . . . . . . . . . . 203
Validating the History File . . . . . . . . . . . . . . . . . . . . . . . . . 204
Restoring the History File . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Reference Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
5. m4 Macro Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
m4 Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Defining Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Quoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Arithmetic Built-Ins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
viii Programming Utilities Guide—August 1994File Inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Diversions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Conditional Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
String Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Summary of Built-In m4 Macros . . . . . . . . . . . . . . . . . . . . . . 225
A. A System V make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Basic Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Description Files and Substitutions. . . . . . . . . . . . . . . . . . . . . . . 233
Comments 233
Continuation Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Macro Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
General Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Dependency Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Executable Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Extensions of $*, $@, and $<. . . . . . . . . . . . . . . . . . . . . . . . . . 236
Output Translations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Recursive Makefiles 237
Suffixes and Transformation Rules . . . . . . . . . . . . . . . . . . . . 237
Implicit Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Archive Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Source Code Control System (SCCS) Filenames . . . . . . . . . 243
Contents ixThe Null Suffix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Included Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
SCCS Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
Dynamic-Dependency Parameters . . . . . . . . . . . . . . . . . . . . 245
Command Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
The make Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Suggestions and Warnings 249
Internal Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Special Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
x Programming Utilities Guide—August 1994