Columbia COMS W4115 - PCGSL - Playing Card Game Simulation Language (83 pages)
Previewing pages 1, 2, 3, 4, 5, 6, 38, 39, 40, 41, 42, 78, 79, 80, 81, 82, 83 of 83 page document View the full content.PCGSL - Playing Card Game Simulation Language
Previewing pages 1, 2, 3, 4, 5, 6, 38, 39, 40, 41, 42, 78, 79, 80, 81, 82, 83 of actual document.
View the full content.View Full Document
PCGSL - Playing Card Game Simulation Language
0
0
138 views
- Pages:
- 83
- School:
- Columbia University
- Course:
- Coms W4115 - Programming Languages and Translators
Programming Languages and Translators Documents
-
6 pages
-
Haskell Computer Algebra System
35 pages
-
27 pages
-
71 pages
-
13 pages
-
6 pages
-
CRAWL Language Reference Manual
9 pages
-
MatrEL - Matrix Entertainment Language
27 pages
-
154 pages
-
51 pages
-
3 pages
-
SOIL Simple Object Interaction Language
4 pages
-
41 pages
-
ScriptEdit Language Reference Manual
89 pages
-
15 pages
-
Project Proposal - Advanced Arithmetic Language
2 pages
-
R – A Scripting language for a call routing engine
83 pages
-
62 pages
-
A programming language for 2D games
11 pages
-
FAST VECTOR PROCESSING LANGUAGE
10 pages
-
7 pages
-
4 pages
-
bridge - A programming language for novice users to easily generate HTML forms
8 pages
-
Scirch Circuit Simulation Language
12 pages
-
9 pages
-
Event Driven State Language (EDSL)
18 pages
-
13 pages
-
Glimmer - An Image Manipulation Language
74 pages
-
JAWS Language Reference Manual
13 pages
-
L-System Fractal Generator: Language Reference Manual
15 pages
-
14 pages
-
Fantasy Football Stat Tracker Compiler
9 pages
-
Types and Static Semantic Analysis
54 pages
-
110 pages
-
CLAW Columbia Language for Altering Waveforms
155 pages
-
Haskell Computer Algebra System
53 pages
-
ISICL Intuitive Strategic Intelligence Control Language
11 pages
-
163 pages
-
Uniform General Algorithmic (UNIGA)
11 pages
-
m - A language for music generation
8 pages
-
4 pages
-
5 pages
-
Firewall Integrity Review Exploit Description Report Language
6 pages
-
TMIL Text ManIpulation Language
10 pages
-
13 pages
-
ScriptEdit Language Reference Manual
13 pages
-
36 pages
-
59 pages
-
5 pages
-
20 pages
-
27 pages
-
3 pages
-
6 pages
-
16 pages
-
58 pages
-
Google Earth Script Language Language Reference Manual
9 pages
-
7 pages
-
Simulated Human Interaction Language
3 pages
-
LAME - Linear Algebra Made Easy
82 pages
-
3 pages
-
31 pages
-
21 pages
-
4 pages
-
A Graphics Object Manipulation Language
129 pages
-
32 pages
-
IpsoFracto - Fractal Generation Language
84 pages
-
Functional Programming and the Lambda Calculus
26 pages
-
BioSyn - A High Level Language For Molecular Synthesis
6 pages
-
14 pages
-
115 pages
-
INC - Integrated Network Control
5 pages
-
35 pages
-
ANIMO Character Animation Language
283 pages
-
9 pages
-
Developer tools - past, present, and future
46 pages
-
118 pages
-
WCL - Website Creation Language
114 pages
-
60 pages
-
G! A programming language for 2D games Language Proposal
7 pages
-
114 pages
-
SAL - A Service Level Agreement Language
24 pages
-
m - A language for music generation
20 pages
-
MCSL - Monte Carlo Simulation Language
23 pages
-
16 pages
-
4 pages
-
238 pages
-
43 pages
-
40 pages
-
9 pages
-
Physicalc - A Language for (simple) Scientific Computation
5 pages
-
19 pages
-
Syntax for International Monetary, Property and Liquidity Exchange
16 pages
-
BGGL (Board Game Generator Language)
124 pages
-
3 pages
-
WebAppQA A Language for Testing Web Applications
6 pages
-
Spaniel – Span-based Information Extraction Language
4 pages
-
Programming Languages and Translators
5 pages
-
6 pages
-
Arithmetic Calculation Language
42 pages
-
Wizard of HOuse Management (WHOM)
5 pages
-
7 pages
-
Types and Static Semantic Analysis
47 pages
-
BATS - A Geometric Figure Drawing Language
6 pages
-
ASTs, Objective CAML, and Ocamlyacc
16 pages
-
4 pages
-
6 pages
-
16 pages
-
MATLIP: MATLAB-Like Language for Image Processing
32 pages
-
14 pages
-
4 pages
-
25 pages
-
3 pages
-
35 pages
-
Yet Another Image-processing Language
10 pages
-
16 pages
-
39 pages
-
Types and Static Semantic Analysis
6 pages
-
TMIL - Text Manipulation Imaging Language
3 pages
-
Learning Language Reference Manual
13 pages
-
35 pages
-
31 pages
-
31 pages
-
10 pages
-
Portfolio Simulation Language Language Reference Manual
9 pages
-
5 pages
-
46 pages
-
Intro Programming Languages and Translators
45 pages
-
EHDL Easy Hardware Description Language
7 pages
-
Signal Analysis and Music Processing Language Proposal
3 pages
-
DEVice Interface Language (DEVIL)
11 pages
-
6 pages
-
TMIL Text Manipulation Imaging Language
166 pages
-
TMSL (TURING MACHINE SIMULATION LANGUAGE)
39 pages
-
CHAD Language Reference Manual
8 pages
-
6 pages
-
31 pages
-
EHDL Easy Hardware Description Language
10 pages
-
4 pages
-
Dynamo - Language Reference Manual
5 pages
-
27 pages
-
4 pages
-
Petros - A Multi-purpose Text File Manipulation Language
12 pages
-
82 pages
-
TabPro - A Table Generation language
65 pages
-
7 pages
-
5 pages
-
44 pages
-
A Macromedia Flash Specification Coding Language
42 pages
-
The BATS Language Reference Manual
17 pages
-
Language Proposal for Atomic Sound Manipulation Language
5 pages
-
7 pages
-
EcoSL - Economical Spreadsheet Language
14 pages
-
SASSi A Language For Statistics
184 pages
-
26 pages
-
SIMPLEX SYNTAX FOR INTERNATIONAL MONETARY, PROPERTY, AND LIQUIDITY EXCHANGE
7 pages
-
MIRAGE A Graphical Sketching Language
16 pages
-
11 pages
-
69 pages
-
80 pages
-
MARS Language Reference Manual
17 pages
-
4 pages
-
98 pages
-
GRIMM - the choose your own story language
129 pages
-
83 pages
-
34 pages
-
7 pages
-
Stella - An Environment for Experimental Machine Learning
8 pages
-
115 pages
-
4 pages
-
116 pages
-
Equity Portfolio Statistical Analysis Language
11 pages
-
Mirage A Graphical Sketching Language
83 pages
-
Random Data Generator Language
51 pages
-
Generating Code and Running Programs
50 pages
-
PLT Final Report Analog Additive Synthesis Language
219 pages
-
SFPL Simple Floor Plan Language
5 pages
-
LCSL Logic Circuit Simulation Language
129 pages
-
12 pages
-
Easy Hardware Description Language
8 pages
-
51 pages
-
35 pages
-
177 pages
-
6 pages
-
71 pages
-
169 pages
-
Generating Code and Running Programs
49 pages
-
Travel Assist Scripting Language
4 pages
-
Turn based simulation language TBSL
5 pages
-
4 pages
-
3 pages
-
Generating Code and Running Programs
49 pages
-
35 pages
-
10 pages
-
Arithmetic Calculation Language
3 pages
-
Minimalistic Basic Compiler (MBC)
22 pages
-
108 pages
-
Programming Languages and Translators
5 pages
-
209 pages
-
4 pages
-
Final Report Polynomial Manipulation Language
104 pages
-
22 pages
-
TASL - TRAVEL ASSIST SCRIPTING LANGUAGE
10 pages
-
Traders Joe Language Reference Manual
15 pages
-
36 pages
-
155 pages
-
20 pages
-
35 pages
-
16 pages
-
39 pages
-
DiGr - Directed Graph Processing Language
14 pages
-
133 pages
-
Table Generation Language TabPro
15 pages
-
Logic Programming - The Prolog Language
30 pages
-
12 pages
-
17 pages
-
R – A Scripting language for a call routing engine
3 pages
Sign up for free to view:
- This document and 3 million+ documents and flashcards
- High quality study guides, lecture notes, practice exams
- Course Packets handpicked by editors offering a comprehensive review of your courses
- Better Grades Guaranteed
PCGSL Playing Card Game Simulation Language Enrique Henestroza eh2348 columbia edu Yuriy Kagan yk2159 columbia edu Andrew Shu ans2120 columbia edu Peter Tsonev pvt2101 columbia edu COMS W4115 Programming Languages and Translators December 19 2008 Contents 1 Introduction 1 1 Simple 3 3 2 Language Tutorial 4 3 Language Manual 3 1 Lexical Conventions 3 1 1 Comments 3 1 2 Identifiers 3 1 3 Keywords 3 1 4 Constants 3 1 5 Operators 3 1 6 Meaning of Identifiers 3 1 7 Scope Namespace and Storage Duration 3 2 Declarations 3 2 1 Variables 3 2 2 Functions 3 2 3 Special Blocks 3 3 Expressions and Operators 3 3 1 Precedence and Association Rules in PCGSL 3 3 2 Expressions 3 3 3 Function Calls 3 3 4 Assignment 3 4 Statements 3 4 1 Expression Statements 1 5 5 5 5 6 6 6 6 7 8 8 9 9 9 9 11 11 11 12 12 3 4 2 3 4 3 3 4 4 Selection Statements Iteration Statements Jump Statements 4 Project Plan 4 1 Planning Specification 4 2 Development Testing 4 3 Programming Style Guide 4 4 Project timeline 4 5 Roles and Responsibilities 4 6 Software Development Environment 4 7 Project Log 5 Architectural Design 12 12 13 14 14 15 15 17 17 18 18 19 2 Chapter 1 Introduction The Playing Card Game Simulation Language PCGSL is designed to be a simple programming language for programming card games Our language allows a programmer to work within a standard set of conventions and procedures for playing card games without having to write a large amount of code as one would have to in a general purpose language This allows the programmer to focus on creating randomized simulations of popular games or hands as well as quick mock ups of new games based around standard 52 card decks 1 1 Simple PCGSL is simple to learn Using well known C style imperative syntax conventions our language 3 Chapter 2 Language Tutorial 4 Chapter 3 Language Manual 3 1 Lexical Conventions This section covers the lexical conventions including comments and tokens A token is a series of contiguous characters that the compiler treats as a unit Blanks tabs newlines and comments are collectively known as white space White space is ignored except as it serves to separate tokens Some white space is required to separate otherwise adjacent identifiers keywords and constants If the input stream has been parsed into tokens up to a given character the next token is taken to include the longest string of characters that could possibly constitute a token 3 1 1 Comments The characters introduce a comment a newline terminates a comment The characters do not indicate a comment when occurring within a string literal Comments do not nest Once the introducing a comment are seen all other characters are ignored until the ending newline is encountered 3 1 2 Identifiers An identifier is a sequence of letters digits and underscores The first character cannot be a digit Uppercase and lowercase letters are distinct Identifier length is unlimited 5 3 1 3 Keywords The identifiers listed below are reserved for use as keywords and cannot be used for any other purpose Among these are a group of reserved identifiers corresponds to card names for a standard 52 card deck break Play CardEntities return else Start false true Globals while If WinCondition Include var null H2 H3 H4 H5 H6 H7 H8 H9 H10 HJ HQ HK HA D2 D3 D4 D5 D6 D7 D8 D9 D10 DJ DQ DK DA C2 C3 C4 C5 C6 C7 C8 C9 C10 CJ CQ CK CA S2 S3 S4 S5 S6 S7 S8 S9 S10 SJ SQ SK SA 3 1 4 Constants The two types of constants are integer and character string Integer Constants An integer constant consists of a sequence of one or more digits and is always considered decimal String Constants A string constant is a sequence of characters surrounded by double quotation marks such as Hello World We consider characters to be ASCII printable characters 3 1 5 Operators An operator specifies an operation to be performed The operators are shown below 3 1 6 Meaning of Identifiers Identifiers are disambiguated by their type scope and namespace No identifier will have linkage and storage duration will be determined by the scope e g identifiers within the 6 same scope will have the same storage duration Type Our language has four fundamental object types int string boolean and Card In addition there are two derived types list and CardEntity There is no notion of a floating point number since it is not really needed in card games There is also no need for a char type since it can be simulated by a string consisting of a single ASCII symbol int the int type can represent an arbitrary integer since it will be mapped to the OCaml integer internally bool the bool type represents a boolean either of the value true or false It is mapped to OCaml boolean internally string the string type will be able to hold arbitrary strings since it will also be mapped to OCaml strings internally Card the Card type is a basic type that represents one of the 52 cards in a standard playing card deck list the list type is a derived type since it is a collection of fundamental objects They have an attribute called length that stores the length of the list CardEntity The CardEntity type represents a certain participant in the card game who can be active e g a player or passive e g a deck or a flop Each CardEntity has a list of Card objects that belongs to it and special operators for transferring Card objects among CardEntity objects 3 1 7 Scope Namespace and Storage Duration Unlike C identifiers PCGSL identifiers have no linkage e g the scopes are disjoint Scope The scope specifies the region where certain identifiers are visible PCGSL employs static scope There are two kinds of scope and they do not intersect 7 Global scope variables defined within the Globals block have global scope Global variables cannot be defined in functions or any other block Global variables are accessed via the symbol Therefore there are no intersections with the local scope Function Block scope variables declared within a function or block will be visible within that function or block Nested functions or blocks are disallowed in the language Namespace Functions and blocks share a namespace Variables have their own namespace as do CardEntities None of these three namespaces overlap Storage Duration Local variables have automatic storage duration Their lifetime expires after the function in which they are defined returns Global variables have static storage duration and live from their declaration to the end of program execution 3 2 Declarations A declaration specifies the interpretation given to a set of
View Full Document