]> git.mdlowis.com Git - archive/dlang.git/commitdiff
Added LyX Language Specification document
authorMike D. Lowis <mike@mdlowis.com>
Wed, 25 Apr 2012 20:57:36 +0000 (16:57 -0400)
committerMike D. Lowis <mike@mdlowis.com>
Wed, 25 Apr 2012 20:57:36 +0000 (16:57 -0400)
.gitignore
docs/language_spec/language.lyx [new file with mode: 0644]

index eb7914179d800f6e7c4ff1856def97da0c252eb9..95a9afb046a6a65dd4b2be0696caaf2b01ee1a0d 100644 (file)
@@ -6,3 +6,4 @@ project.vim
 *.exe
 *.a
 *.lib
+*~
diff --git a/docs/language_spec/language.lyx b/docs/language_spec/language.lyx
new file mode 100644 (file)
index 0000000..0e68d46
--- /dev/null
@@ -0,0 +1,287 @@
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass article
+\use_default_options true
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\use_esint 1
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 1
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Title
+DLang Language Specification
+\end_layout
+
+\begin_layout Author
+Michael D.
+ Lowis
+\end_layout
+
+\begin_layout Date
+04/25/12
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Overview
+\end_layout
+
+\begin_layout Standard
+This report describes a programming language called DLang.
+ DLang is a functional programming language which borrows and builds on
+ concepts from the Scheme/Lisp family of programming languages.
+ The language aims to provide the necessary tools for creating powerful
+ domain specific languages.
+ To this end, the core syntax of DLang aims to be as minimal as possible
+ while providing the most powerful syntactic extension capabilites.
+ Despite the powerful syntactic features, performance is also a major requiremen
+t for DLang.
+ DLang aims to have execution speeds as close to C as possible.
+\end_layout
+
+\begin_layout Section
+Datatypes
+\end_layout
+
+\begin_layout Subsection
+Basic Types
+\end_layout
+
+\begin_layout Subsubsection
+Numbers
+\end_layout
+
+\begin_layout Subsubsection
+Characters
+\end_layout
+
+\begin_layout Subsubsection
+Symbols
+\end_layout
+
+\begin_layout Subsubsection
+Boolean Values
+\end_layout
+
+\begin_layout Subsection
+Collections
+\end_layout
+
+\begin_layout Subsubsection
+Lists
+\end_layout
+
+\begin_layout Subsubsection
+Vectors
+\end_layout
+
+\begin_layout Subsubsection
+Maps
+\end_layout
+
+\begin_layout Subsubsection
+Strings
+\end_layout
+
+\begin_layout Subsection
+Blocks
+\end_layout
+
+\begin_layout Standard
+Blocks in dlang represent functions or units of execution.
+ They consist of a group of expressions that may be executed together.
+ Blocks may be passed arguments, assigned to variables, and passed to, or
+ returned from other blocks.
+\end_layout
+
+\begin_layout Subsubsection
+Definition and Usage
+\end_layout
+
+\begin_layout Standard
+Block definitions consist of an opening curly brace, an optional argument
+ list, a sequence of expressions, and a closing curly brace.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Box Frameless
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+use_makebox 0
+width "100col%"
+special "none"
+height "1in"
+height_special "totalheight"
+status open
+
+\begin_layout Plain Layout
+\begin_inset listings
+lstparams "basicstyle={\small},numbers=left"
+inline false
+status open
+
+\begin_layout Plain Layout
+
+# A Block that does nothing
+\end_layout
+
+\begin_layout Plain Layout
+
+{}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+# A Block that represents an add function
+\end_layout
+
+\begin_layout Plain Layout
+
+{|a,b| a + b}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+# Assigning a block to a variable
+\end_layout
+
+\begin_layout Plain Layout
+
+add := {|a,b| a + b}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Lexical Scoping
+\end_layout
+
+\begin_layout Subsubsection
+Performance and Behavior
+\end_layout
+
+\begin_layout Subsection
+Ports
+\end_layout
+
+\begin_layout Section
+Operations and Operators
+\end_layout
+
+\begin_layout Section
+Modules
+\end_layout
+
+\begin_layout Section
+Syntactic Extension
+\end_layout
+
+\begin_layout Section
+Builtin Functions
+\end_layout
+
+\begin_layout Section
+Builtin Macros
+\end_layout
+
+\begin_layout Section
+Optimizations
+\end_layout
+
+\begin_layout Section
+Formal Syntax and Semantics
+\end_layout
+
+\end_body
+\end_document