...gema as a set of Lua functions it has been tested with Lua 5.0.2. Refer to the detailed documentation to build gel togheter with gema, . 1.1 Status GeL is not as mature as gema or Lua, please report any bugs you may find using SourceForge bug tracking subsystem (you don't need to log in as a SourceForge user) or sending an e-mail to Remo Dentato. 1.2 Licence GeL is released under the same licence of Gema. No specific reference needs to be made to GeL as long as the due reference to Gema and Lua have been made. 2. Usage prev top next 2.1 Gema like Gel may be used exactly as if it was gema, any valid gema script should work when executed by gel: gel [gemaopts] [-f rules.gema] [-l script.lua] [infile [outfile]] . The only differences are: The @lua{} function is available to execute lua scripts in actions Text enclosed between "![" and "!]" is considered lua code and is immediately executed Rules specfied with '-f' are loaded, the lua script specified with '-l' is executed (possibily defining lua function to be used in some gema action) and the infile is translated to the outfile applying the rules defined in the default domain. All the gema options are recognized. 2.2 Lua like Gel may be used as a Lua (non interactive) interpreter: gel [gemaopts] [-f rules.gema] -lua script.lua [args] Rules specfied with '-f' are loaded then the control is passed to the lua script...
Words: 1294 - Pages: 6
...variations place the test at the start of the loop, while others have the test at the end of the loop. Pre – test loop - the condition gets evaluated at the beginning of the loop cycle. Therefore, the body of the loop will not get executed if the condition does not hold the very first time. Post – Test loop - the loop condition gets evaluated at the end of the loop cycle. Therefore, the body of the loop will get executed at least once, regardless of the condition. This is a major difference between a pretest loop and a posttest loop. You may choose a posttest loop if the problem description justifies the body of the loop be executed at least once. Repetition Sequence/ Set of statements - A repetition structure causes a statement or set of statements to execute repeatedly. Sequence – set of statements that execute in the order that they appear. Condition controlled loop - uses a true/false condition to control the number of times that it repeats. Sentinel value - must be unique enough that it will not be mistaken as a regular value in the list. It is a special value that marks the end of a list of values. Function header - specifies the...
Words: 1912 - Pages: 8
...certain input sequence (often a sequence of characters) should be mapped to a replacement output sequence (also often a sequence of characters) according to a defined procedure. The mappings process that instantiates (transforms) a macro use into a specific sequence is known as macro expansion. A facility for writing macros may be provided as part of a software application or as a part of a programming language. In the former case, macros are used to make tasks using the application less repetitive. In the latter case, they are a tool that allows a programmer to enable code reuse or even to design domain-specific languages. Macros are used to make a sequence of computing instructions available to the programmer as a single program statement, making the programming task less tedious and less error-prone. (Thus, they are called "macros" because a big block of code can be expanded from a small sequence of characters). Macros often allow positional or keyword parameters that dictate what the conditional assembler program generates and have been used to create entire programs or program suites according to such variables as operating system, platform or other factors. The term derives from "macro instruction", and such expansions were originally used in generating assembly language code. Keyboard and mouse macros Keyboard macros and mouse macros allow short sequences of keystrokes and mouse actions to be transformed into other, usually more time-consuming, sequences of keystrokes...
Words: 1595 - Pages: 7
... 8. A component that collects data from people or other devices and sends it to the computer is called an input device. 9. A video display is a(n)output device. 10. A byte is enough memory to store a letter of the alphabet or a small number. 11. A byte is made up of eight bits. 12. In a binary numbering system, all numeric values are written as sequences of 0s and 1s. 13. A bit that is turned off represents the following value: 0 14. A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is ASCII. 15. An extensive encoding scheme that can represent the characters of many of the languages in the world is Unicode. 16. Negative numbers are encoded using the two’s complement technique. 17. Real numbers are encoded using the floating-point technique. 18. The tiny dots of color that digital images are composed of are called pixels. 19. If you were to look at a machine language program, you would see a stream of binary numbers. 20. In the decode part of the fetch-decode-execute cycle, the CPU determines...
Words: 727 - Pages: 3
... larger programs and programs with multiple source files. • Empower you with Makefiles. • Implement a party favor. Recommended Reading. • Section 17 of http://www.howstuffworks.com/c.htm. • Chapters 20 and 23 of Absolute Beginner’s Guide to C. • Chapters 13, 15, and 18 of Programming in C. 0 < 12 This is CS50. Harvard College Fall 2010 Academic Honesty. All work that you do toward...
Words: 4248 - Pages: 17
...OS's (give example: Microsoft, Linux, Mac, etc.) Know what interpreter does for you Know difference between a Logic & Syntax error Know Fortran is first High level programming language Know Assembly Language Know how CPU works(Fetch,Decode,Execute) Which is faster, Interpreter or compiler Pg.18 Machine Language (1001001) Know about unicode Know difference between logic and syntax......again lol Program development cycles Pg.30 Difference between psuedocode and flowchart Same as 13 Repetition and sequence of structure Know all of the processing symbols for flowchart Mathematical operators Pg.46 Order of precedence Know data types Pg.56 What is constant variable (named constant) Know benefits of using modules know pseudocode in sequence same as 23 know about return point (memory address location) what flowchart symbol is the module call (rectangle with 2 lines?) difference between flowchart and hierarchy chart Pg.83 parameter difference know passing argument by value and by reference Pg.97 know difference between global & Local variable same as 28 difference between control and sequence of structure what is sequence structure diamond shape is a symbol of what (condition) relational operator what is ! = ( different symbols ) what is the oval sign in a flow chart? Appendix B is the answer Pg.570 symbols on pg.570 what is the variable...
Words: 259 - Pages: 2
...Dan Sandin/Wanda Rockwell Sherill Redd, Aptara®, Inc. Aptara®, Inc. Edwards Brothers LeHigh-Phoenix Color/Hagerstown Credits and acknowledgments borrowed from other sources and reproduced, with permission, appear on the Credits page in the endmatter of this textbook. Copyright © 2012, 2009 Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Manufactured in the United States of America. This publication is protected by Copyright, and permission should be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. To obtain permission(s) to use material from this work, please submit a written request to Pearson Education, Inc., Permissions...
Words: 76897 - Pages: 308
...the program is working with, in __________. main memory This is a volatile type of memory that is used only for temporary storage while a program is running. RAM A type of memory that can hold data for long periods of time, even when there is no power to the computer, is called __________. secondary storage A component that collects data from people or other devices and sends it to the computer is called __________. an input device A video display is a(n) __________ device. output device A __________ is enough memory to store a letter of the alphabet or a small number. byte A byte is made up of eight __________. bits In the __________ numbering system, all numeric values are written as sequences of 0s and 1s. binary A bit that is turned off represents the following value: __________. 0 A set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters is __________. ASCII An extensive encoding scheme that can represent characters for many languages in the world is __________. unicode Negative numbers are encoded using the __________ technique. two's compliment Real numbers are encoded using the __________ technique. floating point The tiny dots of color that digital images are composed of are called __________. pixels If you were to look at a machine language program, you would see __________. a...
Words: 713 - Pages: 3
...data Functions Program Flow (Branching) Input from the user Iteration (Looping) 2 What is Python Python is both an interpreted, general purpose, open source, cross-platform, high level programming language. Python uses an interpreter. This is a software program that convert Python code to machine language. It is easy to jump in and experiment with Python in an interactive fashion. Compiling and interpreting Many languages require you to compile (translate) your program into a form that the machine understands. compile source code Hello.java execute byte code Hello.class output Python is instead directly interpreted into machine instructions. interpret source code Hello.py output 4 Programming basics code or source code: instructions in a program. The sequence of syntax: The set of legal structures and commands that can be used in a particular programming language. output: The messages printed to the user by a program. console: The text box onto which output is printed. 5 The Basic Pattern Most of our programs will use the basic pattern of: Get some user input Perform some algorithm on the input Provide results as output Identifiers in Python Identifiers are names of various program elements in the code that uniquely identify the elements. They are the names of things like variables or functions to...
Words: 3768 - Pages: 16
... Institute of Technology Nirma University 13BEC176@nirmauni.ac.in ABSTACT:- In memory management unit we have limited memory so we used virtual memory. Mapping is between pages and frames. Mapping is done by MMU. Processor after dividing the program into pages generates virtual address. Through this mapping we received virtual address of page and by mapping generates the physical address of the frame so we can read the program and execute it.so large program can be executed in small memory. Keywords: MMU;...
Words: 815 - Pages: 4
...computers hardware manage all of the devices connected to the computer, allows data to be saved to and retrieved from storage device, and allows other programs to run on the computer. Utility programs: performs a specialized task that enhances the computer’s operation or safeguard data. Examples are virus scanners, file compression programs, and data backup programs. Software Development tools: the programs that programmers use to create, modify, and tests software. Assemblers, compilers, and interpreters are examples. Interpreter is a program that both translates and executes the instructions in a high-level language program. The statements that a programmer writes in a high-level language are called source code or code. Syntax error is a mistake such as a misspelled key word, a missing punctuation character, or the incorrect use of an operator. NOTE: programs that are compiled generally execute faster than programs that are interpreted because a compiled program is already translated entirely to machine language when it is executed. A program that is interpreted must be translated at the time it is executed. Compiler is a program that translate high-level language program into a separate machine language program. Words that make up a high-level programming language are known as key word or reserved words. Operator performs various operation on data. Syntax is a set of rules that must be strictly followed when writing a program. Statements is the individual...
Words: 1662 - Pages: 7
...9 9 Chapter9 Answers to Evennumbered Exercises 9 1. 2. What are two ways you can execute a shell script when you do not have execute access permission to the file containing the script? Can you execute a shell script if you do not have read access permission? You can give the name of the file containing the script as an argument to the shell (for example, sh scriptfile, where scriptfile is the name of the file containing the script). Under bash you can give the following command: $ . scriptfile Because the shell must read the commands from the file containing a shell script before it can execute the commands, you must have read permission for the file in order to execute the shell script. 3. 4. Assume that you have made the following assignment: $ person=jenny Give the output of each of the following commands: a. echo $person jenny b. echo '$person' $person c. echo "$person" jenny 5. 1 2 Chapter 9 6. Assume that the /home/jenny/grants/biblios and /home/jenny/biblios directories exist. For both (a) and (b), give Jenny’s working directory after she executes the sequence of commands given. Explain. a. $ pwd /home/jenny/grants $ CDPATH=$(pwd) $ cd $ cd biblios After executing the preceding commands, Jenny’s working directory is /home/jenny/grants/biblios. When CDPATH is set, cd searches only the directories specified by CDPATH; cd does not search the working directory unless the working directory is specified in CDPATH (by using a period). b. $ pwd /home/jenny/grants $...
Words: 737 - Pages: 3
... If I ask a man to bring 6-bags of wheat, each weighing 100 kg, he may take 6-times to perform this task in going and bringing it. A stronger man might perform the same task in 3times only. Thus, it depends on the strength of the man to finish the job quickly or slowly. Here, we can assume both weaker and strong men as machine. The weaker man has taken 6-machine cycle (6-times going and coming with one bag each time) to execute the job where as the stronger man has taken only 3-machine cycle for the same job. Similarly, a machine may execute one instruction in as many as 3-machine cycles while the other machine can take only one machine cycle to execute the same instruction. Thus, the machine that has taken only one machine cycle is efficient than the one taking 3-machine cycle. Each machine cycle is composed of many clock cycle. Since, the data and instructions, both are stored in the memory, the µP performs fetch operation to read the instruction or data and then execute the instruction. The µP in doing so may take several cycles to perform fetch and execute operation. The 3-status signals : IO / M , S1, and S0 are generated at the beginning of each machine cycle. The unique combination of these 3-status signals identify read or write operation and remain valid for the duration of the cycle. Table-5.1(a) shows details of the unique combination of these status signals to identify different machine cycles. Thus, time taken by any...
Words: 3904 - Pages: 16
...Definition of virus "Computer viruses" is the term that defines the class of programs which illegally explore resources of systems. It is an executable code able to reproduce itself. Viruses are an area of pure programming, and, unlike other computer programs, carry intellectual functions on protection from being found and destroyed. They have to fight for survival in complex conditions of conflicting computer systems. Computer viruses have pervaded popular culture at least as successfully as they have the world's computer population. Computer viruses replicate by attaching themselves to a host a program or computer and co-opting the host's resources to make copies of themselves. Symptoms can range from unpleasant to fatal. Computer viruses spread from program to program and computer to computer. There are other computer pathogens, such as the "worms" that occasionally afflict networks, and the "Trojan horses" that put a friendly face on malicious programs, but viruses are the most common computer ill by far. Types of viruses. There are different types of viruses, and they have already been separated into classes and categories. For instance: dangerous, harmless, and very dangerous. No destruction means a harmless one, tricks with system halts means a dangerous one, and finally with a devastating destruction means a very dangerous virus. But viruses are famous not only for their destructive actions, but also for their special effects, which are almost impossible to classify...
Words: 1595 - Pages: 7
...the memory of the computer. Memory contains: (a) instructions, (b) data. Conceptually, programs and data seem very different. In fact the first computers, distinguished between them and stored them in different places. Another point of view: Treat programs as data. Intro to CS: stored program concept 2 Inside hardware The two hardware parts, that are ‘inside’ the computer: Processor or CPU (Central Processing Unit) Main memory (RAM: Random Access Memory) (Remember: the other part is input/ouput devices) Intro to CS: stored program concept 3 Components of CPU/memory arithmetic and logic unit (ALU): circuitry for arithmetic and logic operations (here the ‘real’ work is done) control unit (CU): responsible for running programs (here the ‘book-keeping’ job is done) • Fetch next instruction • Decode instruction • Execute instruction (activate relevant circuitry in ALU) registers (in ALU and CU): hold data for use by arithmetic and logical operations bus: wires connecting CPU and main memory Intro to CS: stored program concept 4 Review question What is the difference between a computer and a calculator? Intro to CS: stored program concept 5 Review question What is the difference between a computer and a calculator? Answer: The computer is programmable, and this is achieved through the control unit. The control unit is responsible for running programs from memory. Intro to CS: stored program concept 6 Machine language Most programmmers write their programs in a high-level...
Words: 694 - Pages: 3