diff --git a/.gitignore b/.gitignore
index b844b143..97ef7367 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
Gemfile.lock
+.bundle/
+vendor/
diff --git a/.travis.yml b/.travis.yml
index 7277f2f7..83880550 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,9 @@
-before_install: sudo apt-get install libicu-dev -y
+before_install:
+ - sudo apt-get install libicu-dev -y
+ - gem update --system 2.1.11
rvm:
- - 1.8.7
- - 1.9.2
- 1.9.3
- 2.0.0
- - ree
+ - 2.1.1
notifications:
disabled: true
diff --git a/Gemfile b/Gemfile
index 3df9dcfc..851fabc2 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,2 @@
source 'https://rubygems.org'
gemspec
-
-if RUBY_VERSION < "1.9.3"
- # escape_utils 1.0.0 requires 1.9.3 and above
- gem "escape_utils", "0.3.2"
-end
diff --git a/LICENSE b/LICENSE
index d1d7570c..f09a7d0a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2013 GitHub, Inc.
+Copyright (c) 2011-2014 GitHub, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff --git a/README.md b/README.md
index 80ab56c0..660ac00c 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,17 @@
# Linguist
-We use this library at GitHub to detect blob languages, highlight code, ignore binary files, suppress generated files in diffs and generate language breakdown graphs.
+We use this library at GitHub to detect blob languages, highlight code, ignore binary files, suppress generated files in diffs, and generate language breakdown graphs.
## Features
### Language detection
-Linguist defines the list of all languages known to GitHub in a [yaml file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). In order for a file to be highlighted, a language and lexer must be defined there.
+Linguist defines a list of all languages known to GitHub in a [yaml file](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml). In order for a file to be highlighted, a language and a lexer must be defined there.
-Most languages are detected by their file extension. This is the fastest and most common situation.
-
-For disambiguating between files with common extensions, we use a [Bayesian classifier](https://github.com/github/linguist/blob/master/lib/linguist/classifier.rb). For an example, this helps us tell the difference between `.h` files which could be either C, C++, or Obj-C.
-
-In the actual GitHub app we deal with `Grit::Blob` objects. For testing, there is a simple `FileBlob` API.
+Most languages are detected by their file extension. For disambiguating between files with common extensions, we first apply some common-sense heuristics to pick out obvious languages. After that, we use a
+[statistical
+classifier](https://github.com/github/linguist/blob/master/lib/linguist/classifier.rb).
+This process can help us tell the difference between, for example, `.h` files which could be either C, C++, or Obj-C.
```ruby
@@ -27,12 +26,9 @@ See [lib/linguist/language.rb](https://github.com/github/linguist/blob/master/li
The actual syntax highlighting is handled by our Pygments wrapper, [pygments.rb](https://github.com/tmm1/pygments.rb). It also provides a [Lexer abstraction](https://github.com/tmm1/pygments.rb/blob/master/lib/pygments/lexer.rb) that determines which highlighter should be used on a file.
-We typically run on a pre-release version of Pygments, [pygments.rb](https://github.com/tmm1/pygments.rb), to get early access to new lexers. The [languages.yml](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) file is a dump of the lexers we have available on our server.
-
### Stats
-The Language Graph you see on every repository is built by aggregating the languages of each file in that repository.
-The top language in the graph determines the project's primary language. Collectively, these stats make up the [Top Languages](https://github.com/languages) page.
+The Language stats bar that you see on every repository is built by aggregating the languages of each file in that repository. The top language in the graph determines the project's primary language.
The repository stats API, accessed through `#languages`, can be used on a directory:
@@ -42,10 +38,27 @@ project.language.name #=> "Ruby"
project.languages #=> { "Ruby" => 0.98, "Shell" => 0.02 }
```
-These stats are also printed out by the `linguist` binary. Try running `linguist` on itself:
+These stats are also printed out by the `linguist` binary. You can use the
+`--breakdown` flag, and the binary will also output the breakdown of files by language.
- $ bundle exec linguist lib/
- 100% Ruby
+You can try running `linguist` on the `lib/` directory in this repository itself:
+
+ $ bundle exec linguist lib/ --breakdown
+
+ 100.00% Ruby
+
+ Ruby:
+ linguist/blob_helper.rb
+ linguist/classifier.rb
+ linguist/file_blob.rb
+ linguist/generated.rb
+ linguist/heuristics.rb
+ linguist/language.rb
+ linguist/md5.rb
+ linguist/repository.rb
+ linguist/samples.rb
+ linguist/tokenizer.rb
+ linguist.rb
#### Ignore vendored files
@@ -93,8 +106,50 @@ To update the `samples.json` after adding new files to [`samples/`](https://gith
bundle exec rake samples
+### A note on language extensions
+
+Linguist has a number of methods available to it for identifying the language of a particular file. The initial lookup is based upon the extension of the file, possible file extensions are defined in an array called `extensions`. Take a look at this example for example for `Perl`:
+
+```
+Perl:
+ type: programming
+ ace_mode: perl
+ color: "#0298c3"
+ extensions:
+ - .pl
+ - .PL
+ - .perl
+ - .ph
+ - .plx
+ - .pm
+ - .pod
+ - .psgi
+ interpreters:
+ - perl
+```
+Any of the extensions defined are valid but the first in this array should be the most popular.
+
### Testing
Sometimes getting the tests running can be too much work, especially if you don't have much Ruby experience. It's okay: be lazy and let our build bot [Travis](http://travis-ci.org/#!/github/linguist) run the tests for you. Just open a pull request and the bot will start cranking away.
Here's our current build status, which is hopefully green: [](http://travis-ci.org/github/linguist)
+
+### Releasing
+
+If you are the current maintainer of this gem:
+
+ 0. Create a branch for the release: `git checkout -b cut-release-vxx.xx.xx`
+ 0. Make sure your local dependencies are up to date: `bundle install`
+ 0. Ensure that samples are updated: `bundle exec rake samples`
+ 0. Ensure that tests are green: `bundle exec rake test`
+ 0. Bump gem version in `lib/linguist/version.rb`. For example, [like this](https://github.com/github/linguist/commit/8d2ea90a5ba3b2fe6e1508b7155aa4632eea2985).
+ 0. Make a PR to github/linguist. For example, [#1238](https://github.com/github/linguist/pull/1238).
+ 0. Build a local gem: `gem build github-linguist.gemspec`
+ 0. Testing:
+ 0. Bump the Gemfile and Gemfile.lock versions for an app which relies on this gem
+ 0. Install the new gem locally
+ 0. Test behavior locally, branch deploy, whatever needs to happen
+ 0. Merge github/linguist PR
+ 0. Tag and push: `git tag vx.xx.xx; git push --tags`
+ 0. Push to rubygems.org -- `gem push github-linguist-2.10.12.gem`
diff --git a/Rakefile b/Rakefile
index 0b3d16a4..e89e75a9 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,7 @@
+require 'json'
require 'rake/clean'
require 'rake/testtask'
require 'yaml'
-require 'json'
task :default => :test
diff --git a/bin/linguist b/bin/linguist
index c428fa67..2cfa8064 100755
--- a/bin/linguist
+++ b/bin/linguist
@@ -1,14 +1,22 @@
#!/usr/bin/env ruby
# linguist — detect language type for a file, or, given a directory, determine language breakdown
-#
-# usage: linguist ": 1,
+ "used": 1,
+ "it": 2,
+ "becomes": 1,
+ "be": 9,
+ "put": 1,
+ "tray": 2,
+ "for": 15,
+ "dirty": 2,
+ "forks.": 1,
+ "cleaner": 2,
+ "who": 1,
+ "cleans": 1,
+ "them": 2,
+ "back": 1,
+ "table.": 1,
+ "Channels": 1,
+ "Communication": 1,
+ "just": 1,
+ "shared": 1,
+ "queue": 1,
+ "fixed": 1,
+ "capacity.": 1,
+ "functions": 1,
+ "inserting": 1,
+ "element": 5,
+ "into": 3,
+ "taking": 1,
+ "given": 4,
+ " ": 1,
+ "To": 1,
+ "learn": 1,
+ "more": 4,
+ "about": 2,
+ "ASP.NET": 5,
+ "MVC": 4,
+ "visit": 2,
+ "": 5,
+ "href=": 5,
+ "title=": 2,
+ "http": 1,
+ "//asp.net/mvc": 1,
+ "": 5,
+ ".": 2,
+ "The": 1,
+ "page": 1,
+ "features": 3,
+ "": 1,
+ "videos": 1,
+ "tutorials": 1,
+ "and": 6,
+ "samples": 1,
+ "": 1,
+ "to": 4,
+ "help": 1,
+ "you": 4,
+ "get": 1,
+ "the": 5,
+ "most": 1,
+ "from": 1,
+ "MVC.": 1,
+ "If": 1,
+ "have": 1,
+ "any": 1,
+ "questions": 1,
+ "our": 1,
+ "forums": 1,
+ "": 1,
+ "Effective": 1,
+ "ATS": 2,
+ "Dining": 2,
+ "Philosophers": 2,
+ "
": 1,
+ "In": 2,
+ "this": 2,
+ "article": 2,
+ "present": 1,
+ "an": 6,
+ "implementation": 3,
+ "slight": 1,
+ "variant": 1,
+ "the": 30,
+ "famous": 1,
+ "problem": 1,
+ "by": 4,
+ "Dijkstra": 1,
+ "that": 8,
+ "makes": 1,
+ "simple": 1,
+ "but": 1,
+ "convincing": 1,
+ "use": 1,
+ "linear": 2,
+ "types.": 1,
+ "": 8,
+ "The": 8,
+ "Original": 2,
+ "Problem": 2,
+ "
": 8,
+ "There": 3,
+ "are": 7,
+ "five": 1,
+ "philosophers": 1,
+ "sitting": 1,
+ "around": 1,
+ "table": 3,
+ "there": 3,
+ "also": 3,
+ "forks": 7,
+ "placed": 1,
+ "on": 8,
+ "such": 1,
+ "each": 2,
+ "located": 2,
+ "between": 1,
+ "left": 3,
+ "hand": 6,
+ "philosopher": 5,
+ "right": 3,
+ "another": 1,
+ "philosopher.": 1,
+ "Each": 4,
+ "does": 1,
+ "following": 6,
+ "routine": 1,
+ "repeatedly": 1,
+ "thinking": 1,
+ "dining.": 1,
+ "order": 1,
+ "dine": 1,
+ "needs": 2,
+ "first": 2,
+ "acquire": 1,
+ "two": 3,
+ "one": 3,
+ "his": 4,
+ "side": 2,
+ "other": 2,
+ "side.": 2,
+ "After": 2,
+ "finishing": 1,
+ "dining": 1,
+ "puts": 2,
+ "acquired": 1,
+ "onto": 1,
+ "A": 6,
+ "Variant": 1,
+ "twist": 1,
+ "added": 1,
+ "original": 1,
+ "version": 1,
+ "": 7,
+ "class=": 6,
+ "#pats2xhtml_sats": 3,
+ "
": 7,
+ "If": 2,
+ "called": 2,
+ "full": 4,
+ "caller": 2,
+ "blocked": 3,
+ "until": 2,
+ "taken": 1,
+ "channel.": 2,
+ "empty": 1,
+ "inserted": 1,
+ "Channel": 2,
+ "Fork": 3,
+ "Forks": 1,
+ "resources": 1,
+ "type.": 1,
+ "initially": 1,
+ "stored": 2,
+ "which": 2,
+ "can": 4,
+ "obtained": 2,
+ "calling": 2,
+ "function": 3,
+ "defined": 1,
+ "natural": 1,
+ "numbers": 1,
+ "less": 1,
+ "than": 1,
+ "channels": 4,
+ "storing": 3,
+ "chosen": 3,
+ "capacity": 3,
+ "reason": 1,
+ "store": 1,
+ "most": 1,
+ "guarantee": 1,
+ "these": 1,
+ "never": 2,
+ "so": 2,
+ "attempt": 1,
+ "made": 1,
+ "send": 1,
+ "signals": 1,
+ "awake": 1,
+ "callers": 1,
+ "supposedly": 1,
+ "being": 2,
+ "due": 1,
+ "Tray": 1,
+ "instead": 1,
+ "become": 1,
+ "as": 4,
+ "only": 1,
+ "total": 1,
+ "Philosopher": 1,
+ "Loop": 2,
+ "implemented": 2,
+ "loop": 2,
+ "#pats2xhtml_dats": 3,
+ "It": 2,
+ "should": 3,
+ "straighforward": 2,
+ "follow": 2,
+ "Cleaner": 1,
+ "finds": 1,
+ "number": 2,
+ "uses": 1,
+ "locate": 1,
+ "fork.": 1,
+ "Its": 1,
+ "actual": 1,
+ "follows": 1,
+ "now": 1,
+ "Testing": 1,
+ "entire": 1,
+ "files": 1,
+ "DiningPhil2.sats": 1,
+ "DiningPhil2.dats": 1,
+ "DiningPhil2_fork.dats": 1,
+ "DiningPhil2_thread.dats": 1,
+ "Makefile": 1,
+ "available": 1,
+ "compiling": 1,
+ "source": 1,
+ "excutable": 1,
+ "testing.": 1,
+ "One": 1,
+ "able": 1,
+ "encounter": 1,
+ "after": 1,
+ "running": 1,
+ "simulation": 1,
+ "while.": 1,
+ "
": 1,
+ "size=": 1,
+ "This": 1,
+ "written": 1,
+ "href=": 1,
+ "Hongwei": 1,
+ "Xi": 1,
+ "": 1,
+ "@ViewBag.Title.": 1,
+ "
": 1,
+ "": 1,
+ "@ViewBag.Message": 1,
+ "
": 1,
+ "": 1,
+ "": 1,
+ "We": 1,
+ "suggest": 1,
+ "following": 1,
+ "
": 1,
+ "": 1,
+ "
": 1,
+ "using": 5,
+ "System": 1,
+ "System.Collections.Generic": 1,
+ "System.Linq": 1,
+ "System.Text": 1,
+ "System.Threading.Tasks": 1,
+ "namespace": 1,
+ "LittleSampleApp": 1,
+ "///": 4,
+ "": 3,
+ "Getting": 1,
+ "Started": 1,
+ "
": 3,
+ "gives": 2,
+ "a": 3,
+ "powerful": 1,
+ "patterns": 1,
+ "-": 3,
+ "based": 1,
+ "way": 1,
+ "build": 1,
+ "dynamic": 1,
+ "websites": 1,
+ "that": 5,
+ "enables": 1,
+ "clean": 1,
+ "separation": 1,
+ "of": 2,
+ "concerns": 1,
+ "full": 1,
+ "control": 1,
+ "over": 1,
+ "markup": 1,
+ "for": 4,
+ "enjoyable": 1,
+ "agile": 1,
+ "development.": 1,
+ "includes": 1,
+ "many": 1,
+ "enable": 1,
+ "fast": 1,
+ "TDD": 1,
+ "friendly": 1,
+ "development": 1,
+ "creating": 1,
+ "sophisticated": 1,
+ "applications": 1,
+ "use": 1,
+ "latest": 1,
+ "web": 2,
+ "standards.": 1,
+ "Learn": 3,
+ "
": 1, + "class=": 14, + "": 9, + "href=": 9, + "Skip": 1, + "to": 1, + "navigation.": 1, + "": 9, + "
": 1, + "%": 46, + "if": 5, + "cart.item_count": 7, + "": 1,
@@ -31612,6 +51979,131 @@
"reference.": 1,
"AUTHOR": 1
},
+ "Perl6": {
+ "token": 6,
+ "pod_formatting_code": 1,
+ "{": 29,
+ "": 1,
+ "<[A..Z]>": 1,
+ "*POD_IN_FORMATTINGCODE": 1,
+ "}": 27,
+ "": 1,
+ "[": 1,
+ "": 1,
+ "#": 13,
+ "N*": 1,
+ "role": 10,
+ "q": 5,
+ "stopper": 2,
+ "MAIN": 1,
+ "quote": 1,
+ ")": 19,
+ "backslash": 3,
+ "sym": 3,
+ "<\\\\>": 1,
+ "": 1,
+ "": 1,
+ "": 1,
+ "": 1,
+ ".": 1,
+ "method": 2,
+ "tweak_q": 1,
+ "(": 16,
+ "v": 2,
+ "self.panic": 2,
+ "tweak_qq": 1,
+ "qq": 5,
+ "does": 7,
+ "b1": 1,
+ "c1": 1,
+ "s1": 1,
+ "a1": 1,
+ "h1": 1,
+ "f1": 1,
+ "Too": 2,
+ "late": 2,
+ "for": 2,
+ "SHEBANG#!perl": 1,
+ "use": 1,
+ "v6": 1,
+ ";": 19,
+ "my": 10,
+ "string": 7,
+ "if": 1,
+ "eq": 1,
+ "say": 10,
+ "regex": 2,
+ "http": 1,
+ "-": 3,
+ "verb": 1,
+ "|": 9,
+ "multi": 2,
+ "line": 5,
+ "comment": 2,
+ "I": 1,
+ "there": 1,
+ "m": 2,
+ "even": 1,
+ "specialer": 1,
+ "nesting": 1,
+ "work": 1,
+ "<": 3,
+ "trying": 1,
+ "mixed": 1,
+ "delimiters": 1,
+ "": 1,
+ "arbitrary": 2,
+ "delimiter": 2,
+ "Hooray": 1,
+ "": 1,
+ "with": 9,
+ "whitespace": 1,
+ "<<": 1,
+ "more": 1,
+ "strings": 1,
+ "%": 1,
+ "hash": 1,
+ "Hash.new": 1,
+ "begin": 1,
+ "pod": 1,
+ "Here": 1,
+ "t": 2,
+ "highlighted": 1,
+ "table": 1,
+ "Of": 1,
+ "things": 1,
+ "A": 3,
+ "single": 3,
+ "declarator": 7,
+ "a": 8,
+ "keyword": 7,
+ "like": 7,
+ "Another": 2,
+ "block": 2,
+ "brace": 1,
+ "More": 2,
+ "blocks": 2,
+ "don": 2,
+ "x": 2,
+ "foo": 3,
+ "Rob": 1,
+ "food": 1,
+ "match": 1,
+ "sub": 1,
+ "something": 1,
+ "Str": 1,
+ "D": 1,
+ "value": 1,
+ "...": 1,
+ "s": 1,
+ "some": 2,
+ "stuff": 1,
+ "chars": 1,
+ "/": 1,
+ "": 1,
+ "": 1,
+ "roleq": 1
+ },
"PHP": {
"<": 11,
"php": 12,
@@ -32660,6 +53152,505 @@
"config": 3,
"application": 2
},
+ "Pike": {
+ "#pike": 2,
+ "__REAL_VERSION__": 2,
+ "constant": 13,
+ "Generic": 1,
+ "__builtin.GenericError": 1,
+ ";": 149,
+ "Index": 1,
+ "__builtin.IndexError": 1,
+ "BadArgument": 1,
+ "__builtin.BadArgumentError": 1,
+ "Math": 1,
+ "__builtin.MathError": 1,
+ "Resource": 1,
+ "__builtin.ResourceError": 1,
+ "Permission": 1,
+ "__builtin.PermissionError": 1,
+ "Decode": 1,
+ "__builtin.DecodeError": 1,
+ "Cpp": 1,
+ "__builtin.CppError": 1,
+ "Compilation": 1,
+ "__builtin.CompilationError": 1,
+ "MasterLoad": 1,
+ "__builtin.MasterLoadError": 1,
+ "ModuleLoad": 1,
+ "__builtin.ModuleLoadError": 1,
+ "//": 85,
+ "Returns": 2,
+ "an": 2,
+ "Error": 2,
+ "object": 5,
+ "for": 1,
+ "any": 1,
+ "argument": 2,
+ "it": 2,
+ "receives.": 1,
+ "If": 1,
+ "the": 4,
+ "already": 1,
+ "is": 2,
+ "or": 1,
+ "empty": 1,
+ "does": 1,
+ "nothing.": 1,
+ "mkerror": 1,
+ "(": 218,
+ "mixed": 8,
+ "error": 14,
+ ")": 218,
+ "{": 51,
+ "if": 35,
+ "UNDEFINED": 1,
+ "return": 41,
+ "objectp": 1,
+ "&&": 2,
+ "-": 50,
+ "is_generic_error": 1,
+ "arrayp": 2,
+ "Error.Generic": 3,
+ "@error": 1,
+ "stringp": 1,
+ "sprintf": 3,
+ "}": 51,
+ "A": 2,
+ "string": 20,
+ "wrapper": 1,
+ "that": 1,
+ "pretends": 1,
+ "to": 7,
+ "be": 3,
+ "a": 6,
+ "@": 36,
+ "[": 45,
+ "Stdio.File": 32,
+ "]": 45,
+ "in": 1,
+ "addition": 1,
+ "some": 1,
+ "features": 1,
+ "of": 3,
+ "Stdio.FILE": 4,
+ "object.": 2,
+ "This": 1,
+ "can": 2,
+ "used": 1,
+ "distinguish": 1,
+ "FakeFile": 3,
+ "from": 1,
+ "real": 1,
+ "is_fake_file": 1,
+ "protected": 12,
+ "data": 34,
+ "int": 31,
+ "ptr": 27,
+ "r": 10,
+ "w": 6,
+ "mtime": 4,
+ "function": 21,
+ "read_cb": 5,
+ "read_oob_cb": 5,
+ "write_cb": 5,
+ "write_oob_cb": 5,
+ "close_cb": 5,
+ "@seealso": 33,
+ "close": 2,
+ "void": 25,
+ "|": 14,
+ "direction": 5,
+ "lower_case": 2,
+ "||": 2,
+ "cr": 2,
+ "has_value": 4,
+ "cw": 2,
+ "@decl": 1,
+ "create": 3,
+ "type": 11,
+ "pointer": 1,
+ "_data": 3,
+ "_ptr": 2,
+ "time": 3,
+ "else": 5,
+ "make_type_str": 3,
+ "+": 19,
+ "dup": 2,
+ "this_program": 3,
+ "Always": 3,
+ "returns": 4,
+ "errno": 2,
+ "size": 3,
+ "and": 1,
+ "creation": 1,
+ "string.": 2,
+ "Stdio.Stat": 3,
+ "stat": 1,
+ "st": 6,
+ "sizeof": 21,
+ "ctime": 1,
+ "atime": 1,
+ "line_iterator": 2,
+ "String.SplitIterator": 3,
+ "trim": 2,
+ "id": 3,
+ "query_id": 2,
+ "set_id": 2,
+ "_id": 2,
+ "read_function": 2,
+ "nbytes": 2,
+ "lambda": 1,
+ "read": 3,
+ "peek": 2,
+ "float": 1,
+ "timeout": 1,
+ "query_address": 2,
+ "is_local": 1,
+ "len": 4,
+ "not_all": 1,
+ "<": 3,
+ "start": 1,
+ "zero_type": 1,
+ "start..ptr": 1,
+ "gets": 2,
+ "ret": 7,
+ "sscanf": 1,
+ "getchar": 2,
+ "c": 4,
+ "catch": 1,
+ "unread": 2,
+ "s": 5,
+ "..ptr": 2,
+ "ptr..": 1,
+ "seek": 2,
+ "pos": 8,
+ "mult": 2,
+ "add": 2,
+ "pos*mult": 1,
+ "strlen": 2,
+ "sync": 2,
+ "tell": 2,
+ "truncate": 2,
+ "length": 2,
+ "..length": 1,
+ "write": 2,
+ "array": 1,
+ "str": 12,
+ "...": 2,
+ "extra": 2,
+ "str*": 1,
+ "@extra": 1,
+ "..": 1,
+ "set_blocking": 3,
+ "set_blocking_keep_callbacks": 3,
+ "set_nonblocking": 1,
+ "rcb": 2,
+ "wcb": 2,
+ "ccb": 2,
+ "rocb": 2,
+ "wocb": 2,
+ "set_nonblocking_keep_callbacks": 1,
+ "set_close_callback": 2,
+ "cb": 10,
+ "set_read_callback": 2,
+ "set_read_oob_callback": 2,
+ "set_write_callback": 2,
+ "set_write_oob_callback": 2,
+ "query_close_callback": 2,
+ "query_read_callback": 2,
+ "query_read_oob_callback": 2,
+ "query_write_callback": 2,
+ "query_write_oob_callback": 2,
+ "_sprintf": 1,
+ "t": 2,
+ "casted": 1,
+ "cast": 1,
+ "switch": 1,
+ "case": 2,
+ "this": 5,
+ "Sizeof": 1,
+ "on": 1,
+ "its": 1,
+ "contents.": 1,
+ "_sizeof": 1,
+ "@ignore": 1,
+ "#define": 1,
+ "NOPE": 20,
+ "X": 2,
+ "args": 1,
+ "#X": 1,
+ "assign": 1,
+ "async_connect": 1,
+ "connect": 1,
+ "connect_unix": 1,
+ "open": 1,
+ "open_socket": 1,
+ "pipe": 1,
+ "tcgetattr": 1,
+ "tcsetattr": 1,
+ "dup2": 1,
+ "lock": 1,
+ "We": 4,
+ "could": 4,
+ "implement": 4,
+ "mode": 1,
+ "proxy": 1,
+ "query_fd": 1,
+ "read_oob": 1,
+ "set_close_on_exec": 1,
+ "set_keepalive": 1,
+ "trylock": 1,
+ "write_oob": 1,
+ "@endignore": 1
+ },
+ "Pod": {
+ "Id": 1,
+ "contents.pod": 1,
+ "v": 1,
+ "/05/04": 1,
+ "tower": 1,
+ "Exp": 1,
+ "begin": 3,
+ "html": 7,
+ "": 1,
+ "end": 4,
+ "head1": 2,
+ "Net": 12,
+ "Z3950": 12,
+ "AsyncZ": 16,
+ "head2": 3,
+ "Intro": 1,
+ "adds": 1,
+ "an": 3,
+ "additional": 1,
+ "layer": 1,
+ "of": 19,
+ "asynchronous": 4,
+ "support": 1,
+ "for": 11,
+ "the": 29,
+ "module": 6,
+ "through": 1,
+ "use": 1,
+ "multiple": 1,
+ "forked": 1,
+ "processes.": 1,
+ "I": 8,
+ "hope": 1,
+ "that": 9,
+ "users": 1,
+ "will": 1,
+ "also": 2,
+ "find": 1,
+ "it": 3,
+ "provides": 1,
+ "a": 8,
+ "convenient": 2,
+ "front": 1,
+ "to": 9,
+ "C": 13,
+ "": 1,
+ ".": 5,
+ "My": 1,
+ "initial": 1,
+ "idea": 1,
+ "was": 1,
+ "write": 1,
+ "something": 2,
+ "would": 1,
+ "provide": 1,
+ "means": 1,
+ "processing": 1,
+ "and": 14,
+ "formatting": 2,
+ "Z39.50": 1,
+ "records": 4,
+ "which": 3,
+ "did": 1,
+ "using": 1,
+ "": 2,
+ "synchronous": 1,
+ "code.": 1,
+ "But": 3,
+ "wanted": 1,
+ "could": 1,
+ "handle": 1,
+ "queries": 1,
+ "large": 1,
+ "numbers": 1,
+ "servers": 1,
+ "at": 1,
+ "one": 1,
+ "session.": 1,
+ "Working": 1,
+ "on": 1,
+ "this": 3,
+ "part": 3,
+ "my": 1,
+ "project": 1,
+ "found": 1,
+ "had": 1,
+ "trouble": 1,
+ "with": 6,
+ "features": 1,
+ "so": 1,
+ "ended": 1,
+ "up": 1,
+ "what": 1,
+ "have": 3,
+ "here.": 1,
+ "give": 2,
+ "more": 4,
+ "detailed": 4,
+ "account": 2,
+ "in": 9,
+ "": 4,
+ "href=": 5,
+ "": 1,
+ "DESCRIPTION": 1,
+ "": 1,
+ "": 5,
+ "section": 2,
+ "": 5,
+ "AsyncZ.html": 2,
+ "": 6,
+ "pod": 3,
+ "B": 1,
+ "": 1,
+ "": 1,
+ "cut": 3,
+ "Documentation": 1,
+ "over": 2,
+ "item": 10,
+ "AsyncZ.pod": 1,
+ "This": 4,
+ "is": 8,
+ "starting": 2,
+ "point": 2,
+ "gives": 2,
+ "overview": 2,
+ "describes": 2,
+ "basic": 4,
+ "mechanics": 2,
+ "its": 2,
+ "workings": 2,
+ "details": 5,
+ "particulars": 2,
+ "objects": 2,
+ "methods.": 2,
+ "see": 2,
+ "L": 1,
+ "\"Examples.pod>": 1,
+ "explanations": 2,
+ "sample": 2,
+ "scripts": 2,
+ "come": 2,
+ "": 2,
+ "distribution.": 2,
+ "Options.pod": 1,
+ "document": 2,
+ "various": 2,
+ "options": 2,
+ "can": 4,
+ "be": 2,
+ "set": 2,
+ "modify": 2,
+ "behavior": 2,
+ "Index": 1,
+ "Report.pod": 2,
+ "deals": 2,
+ "how": 4,
+ "are": 7,
+ "treated": 2,
+ "line": 4,
+ "by": 2,
+ "you": 4,
+ "affect": 2,
+ "apearance": 2,
+ "record": 2,
+ "s": 2,
+ "HOW": 2,
+ "TO.": 2,
+ "back": 2,
+ "": 1,
+ "- ": 3,
+ "
": 3,
+ "": 1,
+ "Examples": 1,
+ "Options.html": 1,
+ "Report.html": 2,
+ "": 1,
+ "
": 1,
+ "The": 6,
+ "Modules": 1,
+ "There": 2,
+ "modules": 5,
+ "than": 2,
+ "there": 2,
+ "documentation.": 2,
+ "reason": 2,
+ "only": 2,
+ "full": 2,
+ "complete": 2,
+ "access": 9,
+ "other": 2,
+ "either": 2,
+ "internal": 2,
+ "": 1,
+ "or": 4,
+ "accessed": 2,
+ "indirectly": 2,
+ "indirectly.": 2,
+ "head3": 1,
+ "Here": 1,
+ "main": 1,
+ "direct": 2,
+ "documented": 7,
+ "": 4,
+ "": 2,
+ "documentation": 4,
+ "ErrMsg": 1,
+ "User": 1,
+ "error": 1,
+ "message": 1,
+ "handling": 2,
+ "indirect": 2,
+ "Errors": 1,
+ "Error": 1,
+ "debugging": 1,
+ "limited": 2,
+ "Report": 1,
+ "Module": 1,
+ "reponsible": 1,
+ "fetching": 1,
+ "ZLoop": 1,
+ "Event": 1,
+ "loop": 1,
+ "child": 3,
+ "processes": 3,
+ "no": 2,
+ "not": 2,
+ "ZSend": 1,
+ "Connection": 1,
+ "Options": 2,
+ "_params": 1,
+ "INDEX": 1
+ },
"PogoScript": {
"httpism": 1,
"require": 3,
@@ -32742,6 +53733,60 @@
"href": 1,
"m.1": 1
},
+ "PostScript": {
+ "%": 23,
+ "PS": 1,
+ "-": 4,
+ "Adobe": 1,
+ "Creator": 1,
+ "Aaron": 1,
+ "Puchert": 1,
+ "Title": 1,
+ "The": 1,
+ "Sierpinski": 1,
+ "triangle": 1,
+ "Pages": 1,
+ "PageOrder": 1,
+ "Ascend": 1,
+ "BeginProlog": 1,
+ "/pageset": 1,
+ "{": 4,
+ "scale": 1,
+ "set": 1,
+ "cm": 1,
+ "translate": 1,
+ "setlinewidth": 1,
+ "}": 4,
+ "def": 2,
+ "/sierpinski": 1,
+ "dup": 4,
+ "gt": 1,
+ "[": 6,
+ "]": 6,
+ "concat": 5,
+ "sub": 3,
+ "sierpinski": 4,
+ "newpath": 1,
+ "moveto": 1,
+ "lineto": 2,
+ "closepath": 1,
+ "fill": 1,
+ "ifelse": 1,
+ "pop": 1,
+ "EndProlog": 1,
+ "BeginSetup": 1,
+ "<<": 1,
+ "/PageSize": 1,
+ "setpagedevice": 1,
+ "A4": 1,
+ "EndSetup": 1,
+ "Page": 1,
+ "Test": 1,
+ "pageset": 1,
+ "sqrt": 1,
+ "showpage": 1,
+ "EOF": 1
+ },
"PowerShell": {
"Write": 2,
"-": 2,
@@ -32775,332 +53820,356 @@
"TWO_PI": 1
},
"Prolog": {
- "action_module": 1,
- "(": 585,
- "calculator": 1,
- ")": 584,
- ".": 210,
- "%": 334,
- "[": 110,
- "-": 276,
- "d1": 1,
- "]": 109,
- "push": 20,
- "D": 37,
- "if": 2,
- "mode": 22,
- "init": 11,
- "<": 11,
- "deny": 10,
- "displayed": 17,
- "D1": 5,
- "affirm": 10,
- "cont": 3,
- "*D1": 2,
- "+": 32,
- "New": 2,
- "a": 31,
- "op": 28,
- "d": 27,
- "m": 16,
- "clear": 4,
- "nop": 6,
- "accumulator": 10,
- "A": 40,
- "O": 14,
- "memory": 5,
- "M": 14,
- "X": 62,
- "mem_rec": 2,
- "plus": 6,
- "eval": 7,
- "V": 16,
- ";": 9,
- "use": 3,
- "normal": 3,
- "arithmetic": 3,
- "i.e.": 3,
- "minus": 5,
- "lt": 1,
- "times": 4,
- "equal": 2,
- "mem_plus": 2,
- "v": 3,
- "where": 3,
- "V1": 2,
- "plus_minus": 1,
- "normalize": 2,
- "Wff": 3,
- "NormalClauses": 3,
- "conVert": 1,
- "S": 26,
- "cnF": 1,
- "T": 6,
- "flatten_and": 5,
- "U": 2,
- "make_clauses": 5,
- "make": 2,
- "sequence": 2,
- "out": 4,
- "of": 5,
- "conjunction": 1,
- "/": 2,
- "Y": 34,
- "F": 31,
- "B": 30,
- "sequence_append": 5,
- "disjunction": 1,
- "flatten_or": 6,
- "append": 2,
- "two": 1,
- "sequences": 1,
- "R": 32,
- "separate": 7,
- "into": 1,
- "positive": 1,
- "and": 3,
- "negative": 1,
- "literals": 1,
- "P": 37,
- "N": 20,
- "|": 36,
- "N1": 2,
- "P1": 2,
- "tautology": 4,
- "some_occurs": 3,
- "occurs": 4,
- "_": 21,
- "C": 21,
- "make_clause": 5,
- "false": 1,
- "make_sequence": 9,
- "H": 11,
- "write_list": 3,
- "write": 13,
- "nl": 8,
- "A*": 1,
- "Algorithm": 1,
- "Nodes": 1,
- "have": 2,
- "form": 2,
- "S#D#F#A": 1,
- "describes": 1,
- "the": 15,
- "state": 1,
- "or": 1,
- "configuration": 1,
- "is": 22,
- "depth": 1,
- "node": 2,
- "evaluation": 1,
- "function": 4,
- "value": 1,
- "ancestor": 1,
- "list": 1,
- "for": 1,
- "yfx": 1,
- "solve": 2,
- "State": 7,
- "Soln": 3,
- "f_function": 3,
- "search": 4,
- "State#0#F#": 1,
- "reverse": 2,
- "h_function": 2,
- "H.": 1,
- "State#_#_#Soln": 1,
- "goal": 2,
- "expand": 2,
- "Children": 2,
- "insert_all": 4,
- "Open": 7,
- "Open1": 2,
- "Open3": 2,
- "insert": 6,
- "Open2": 2,
- "repeat_node": 2,
- "cheaper": 2,
- "B1": 2,
- "P#_#_#_": 2,
- "_#_#F1#_": 1,
- "_#_#F2#_": 1,
- "F1": 1,
- "F2.": 1,
- "State#D#_#S": 1,
- "All_My_Children": 2,
- "bagof": 1,
- "Child#D1#F#": 1,
- "Move": 3,
- "move": 7,
- "Child": 2,
- "puzzle": 4,
- "solver": 1,
- "A/B/C/D/E/F/G/H/I": 3,
- "{": 3,
- "...": 3,
- "I": 5,
- "}": 3,
- "represents": 1,
- "empty": 2,
- "tile": 5,
- "/2/3/8/0/4/7/6/5": 1,
- "The": 1,
- "moves": 1,
- "left": 26,
- "A/0/C/D/E/F/H/I/J": 3,
- "/A/C/D/E/F/H/I/J": 1,
- "A/B/C/D/0/F/H/I/J": 4,
- "A/B/C/0/D/F/H/I/J": 1,
- "A/B/C/D/E/F/H/0/J": 3,
- "A/B/C/D/E/F/0/H/J": 1,
- "A/B/0/D/E/F/H/I/J": 2,
- "A/0/B/D/E/F/H/I/J": 1,
- "A/B/C/D/E/0/H/I/J": 3,
- "A/B/C/D/0/E/H/I/J": 1,
- "A/B/C/D/E/F/H/I/0": 2,
- "A/B/C/D/E/F/H/0/I": 1,
- "up": 17,
- "A/B/C/0/E/F/H/I/J": 3,
- "/B/C/A/E/F/H/I/J": 1,
- "A/0/C/D/B/F/H/I/J": 1,
- "A/B/0/D/E/C/H/I/J": 1,
- "A/B/C/D/E/F/0/I/J": 2,
- "A/B/C/0/E/F/D/I/J": 1,
- "A/B/C/D/0/F/H/E/J": 1,
- "A/B/C/D/E/0/H/I/F": 1,
- "right": 22,
- "A/C/0/D/E/F/H/I/J": 1,
- "A/B/C/D/F/0/H/I/J": 1,
- "A/B/C/D/E/F/H/J/0": 1,
- "/B/C/D/E/F/H/I/J": 2,
- "B/0/C/D/E/F/H/I/J": 1,
- "A/B/C/E/0/F/H/I/J": 1,
- "A/B/C/D/E/F/I/0/J": 1,
- "down": 15,
- "A/B/C/H/E/F/0/I/J": 1,
- "A/B/C/D/I/F/H/0/J": 1,
- "A/B/C/D/E/J/H/I/0": 1,
- "D/B/C/0/E/F/H/I/J": 1,
- "A/E/C/D/0/F/H/I/J": 1,
- "A/B/F/D/E/0/H/I/J": 1,
- "heuristic": 1,
- "Puzz": 3,
- "p_fcn": 2,
- "s_fcn": 2,
- "*S.": 1,
- "Manhattan": 1,
- "distance": 1,
- "Pa": 2,
- "b": 12,
- "Pb": 2,
- "c": 10,
- "Pc": 2,
- "Pd": 2,
- "e": 10,
- "E": 3,
- "Pe": 2,
- "f": 10,
- "Pf": 2,
- "g": 10,
- "G": 7,
- "Pg": 3,
- "h": 10,
- "Ph": 2,
- "i": 10,
- "Pi": 1,
- "Pi.": 1,
- "cycle": 1,
- "s_aux": 14,
- "S1": 2,
- "S2": 2,
- "S3": 2,
- "S4": 2,
- "S5": 2,
- "S6": 2,
- "S7": 2,
- "S8": 2,
- "S9": 1,
- "S9.": 1,
- "animation": 1,
- "using": 2,
- "VT100": 1,
- "character": 3,
- "graphics": 1,
- "animate": 2,
- "message.": 2,
- "initialize": 2,
- "cursor": 7,
- "get0": 2,
- "_X": 2,
- "play_back": 5,
- "dynamic": 1,
- "location/3.": 1,
- "A/B/C/D/E/F/H/I/J": 1,
- "cls": 2,
- "retractall": 1,
- "location": 32,
- "assert": 17,
- "J": 1,
- "draw_all.": 1,
- "draw_all": 1,
- "draw": 18,
- "call": 1,
- "Put": 1,
- "way": 1,
+ "-": 161,
+ "module": 3,
+ "(": 327,
+ "format_spec": 12,
+ "[": 87,
+ "format_error/2": 1,
+ "format_spec/2": 1,
+ "format_spec//1": 1,
+ "spec_arity/2": 1,
+ "spec_types/2": 1,
+ "]": 87,
+ ")": 326,
+ ".": 107,
+ "use_module": 8,
+ "library": 8,
+ "dcg/basics": 1,
+ "eos//0": 1,
+ "integer//1": 1,
+ "string_without//2": 1,
+ "error": 6,
+ "when": 3,
+ "when/2": 1,
+ "%": 71,
+ "mavis": 1,
+ "format_error": 8,
+ "+": 14,
+ "Goal": 29,
+ "Error": 25,
+ "string": 8,
+ "is": 12,
+ "nondet.": 1,
+ "format": 8,
+ "Format": 23,
+ "Args": 19,
+ "format_error_": 5,
+ "_": 30,
+ "debug": 4,
+ "Spec": 10,
+ "is_list": 1,
+ "spec_types": 8,
+ "Types": 16,
+ "types_error": 3,
+ "length": 4,
+ "TypesLen": 3,
+ "ArgsLen": 3,
+ "types_error_": 4,
+ "Arg": 6,
+ "|": 25,
+ "Type": 3,
+ "ground": 5,
+ "is_of_type": 2,
+ "message_to_string": 1,
+ "type_error": 1,
+ "_Location": 1,
+ "multifile": 2,
+ "check": 3,
+ "checker/2.": 2,
+ "dynamic": 2,
+ "checker": 3,
+ "format_fail/3.": 1,
+ "prolog_walk_code": 1,
+ "module_class": 1,
+ "user": 5,
+ "infer_meta_predicates": 1,
+ "false": 2,
+ "autoload": 1,
+ "format/": 1,
+ "{": 7,
+ "}": 7,
+ "are": 3,
+ "always": 1,
+ "loaded": 1,
+ "undefined": 1,
+ "ignore": 1,
+ "trace_reference": 1,
+ "on_trace": 1,
+ "check_format": 3,
+ "retract": 1,
+ "format_fail": 2,
+ "Location": 6,
+ "print_message": 1,
+ "warning": 1,
+ "fail.": 3,
+ "iterate": 1,
+ "all": 1,
+ "errors": 2,
+ "checker.": 1,
+ "succeed": 2,
+ "even": 1,
+ "if": 1,
+ "no": 1,
+ "found": 1,
+ "Module": 4,
+ "_Caller": 1,
+ "predicate_property": 1,
+ "imported_from": 1,
+ "Source": 2,
+ "memberchk": 2,
+ "system": 1,
+ "prolog_debug": 1,
+ "can_check": 2,
+ "assert": 2,
+ "to": 5,
+ "avoid": 1,
+ "printing": 1,
+ "goals": 1,
+ "once": 3,
+ "clause": 1,
+ "prolog": 2,
"message": 1,
- "nl.": 1,
- "put": 16,
- "ESC": 1,
- "screen": 1,
- "quickly": 1,
- "video": 1,
- "attributes": 1,
- "bold": 1,
- "blink": 1,
- "not": 1,
- "working": 1,
- "plain": 1,
- "reverse_video": 2,
- "Tile": 35,
- "objects": 1,
- "map": 2,
- "s": 1,
- "Each": 1,
- "should": 1,
- "be": 1,
- "drawn": 2,
- "at": 1,
- "which": 1,
- "asserted": 1,
- "retracted": 1,
- "by": 1,
- "character_map": 3,
- "spot": 1,
- "to": 1,
- "retract": 8,
- "X0": 10,
- "Y0": 10,
- "Xnew": 6,
- "Ynew": 6,
- "Obj": 26,
- "plain.": 1,
- "hide": 10,
- "hide_row": 4,
- "Y1": 8,
- "X1": 8,
- "draw_row": 4,
+ "message_location": 1,
+ "//": 1,
+ "eos.": 1,
+ "escape": 2,
+ "Numeric": 4,
+ "Modifier": 2,
+ "Action": 15,
+ "Rest": 12,
+ "numeric_argument": 5,
+ "modifier_argument": 3,
+ "action": 6,
+ "text": 4,
+ "String": 6,
+ ";": 12,
+ "Codes": 21,
+ "string_codes": 4,
+ "string_without": 1,
+ "list": 4,
+ "semidet.": 3,
+ "text_codes": 6,
+ "phrase": 3,
+ "spec_arity": 2,
+ "FormatSpec": 2,
+ "Arity": 3,
+ "positive_integer": 1,
+ "det.": 4,
+ "type": 2,
+ "Item": 2,
+ "Items": 2,
+ "item_types": 3,
+ "numeric_types": 5,
+ "action_types": 18,
+ "number": 3,
+ "character": 2,
+ "star": 2,
+ "nothing": 2,
+ "atom_codes": 4,
+ "Code": 2,
+ "Text": 1,
+ "codes": 5,
+ "Var": 5,
+ "var": 4,
+ "Atom": 3,
+ "atom": 6,
+ "N": 5,
+ "integer": 7,
+ "C": 5,
+ "colon": 1,
+ "no_colon": 1,
+ "is_action": 4,
+ "multi.": 1,
+ "a": 4,
+ "d": 3,
+ "e": 1,
+ "float": 3,
+ "f": 1,
+ "G": 2,
+ "I": 1,
+ "n": 1,
+ "p": 1,
+ "any": 3,
+ "r": 1,
+ "s": 2,
+ "t": 1,
+ "W": 1,
+ "func": 13,
+ "op": 2,
+ "xfy": 2,
+ "of": 8,
+ "/2": 3,
+ "list_util": 1,
+ "xfy_list/3": 1,
+ "function_expansion": 5,
+ "arithmetic": 2,
+ "wants_func": 4,
+ "prolog_load_context": 1,
+ "we": 1,
+ "don": 1,
+ "used": 1,
+ "at": 3,
+ "compile": 3,
+ "time": 3,
+ "for": 1,
+ "macro": 1,
+ "expansion.": 1,
+ "compile_function/4.": 1,
+ "compile_function": 8,
+ "Expr": 5,
+ "In": 15,
+ "Out": 16,
+ "evaluable/1": 1,
+ "throws": 1,
+ "exception": 1,
+ "with": 2,
+ "strings": 1,
+ "evaluable": 1,
+ "term_variables": 1,
+ "F": 26,
+ "function_composition_term": 2,
+ "Functor": 8,
+ "true": 5,
+ "..": 6,
+ "format_template": 7,
+ "has_type": 2,
+ "fail": 1,
+ "be": 4,
+ "explicit": 1,
+ "Dict": 3,
+ "is_dict": 1,
+ "get_dict": 1,
+ "Function": 5,
+ "Argument": 1,
+ "Apply": 1,
"an": 1,
- "Object": 1,
- "partition": 5,
- "Xs": 5,
- "Pivot": 4,
- "Smalls": 3,
- "Bigs": 3,
- "@": 1,
- "Rest": 4,
- "quicksort": 4,
- "Smaller": 2,
- "Bigger": 2,
+ "Argument.": 1,
+ "A": 1,
+ "predicate": 4,
+ "whose": 2,
+ "final": 1,
+ "argument": 2,
+ "generates": 1,
+ "output": 1,
+ "and": 2,
+ "penultimate": 1,
+ "accepts": 1,
+ "input.": 1,
+ "This": 1,
+ "realized": 1,
+ "by": 2,
+ "expanding": 1,
+ "function": 2,
+ "application": 2,
+ "chained": 1,
+ "calls": 1,
+ "time.": 1,
+ "itself": 1,
+ "can": 3,
+ "chained.": 2,
+ "Reversed": 2,
+ "reverse": 4,
+ "sort": 2,
+ "c": 2,
+ "b": 4,
+ "meta_predicate": 2,
+ "throw": 1,
+ "permission_error": 1,
+ "call": 4,
+ "context": 1,
+ "X": 10,
+ "Y": 7,
+ "defer": 1,
+ "until": 1,
+ "run": 1,
+ "P": 2,
+ "Creates": 1,
+ "new": 2,
+ "composing": 1,
+ "G.": 1,
+ "The": 1,
+ "functions": 2,
+ "composed": 1,
+ "create": 1,
+ "compiled": 1,
+ "which": 1,
+ "behaves": 1,
+ "like": 1,
+ "function.": 1,
+ "composition": 1,
+ "Composed": 1,
+ "also": 1,
+ "applied": 1,
+ "/2.": 1,
+ "fix": 1,
+ "syntax": 1,
+ "highlighting": 1,
+ "functions_to_compose": 2,
+ "Term": 10,
+ "Funcs": 7,
+ "functor": 1,
+ "Op": 3,
+ "xfy_list": 2,
+ "thread_state": 4,
+ "Goals": 2,
+ "Tmp": 3,
+ "instantiation_error": 1,
+ "append": 2,
+ "NewArgs": 2,
+ "variant_sha1": 1,
+ "Sha": 2,
+ "current_predicate": 1,
+ "Functor/2": 2,
+ "RevFuncs": 2,
+ "Threaded": 2,
+ "Body": 2,
+ "Head": 2,
+ "compile_predicates": 1,
+ "Output": 2,
+ "compound": 1,
+ "setof": 1,
+ "arg": 1,
+ "Name": 2,
+ "Args0": 2,
+ "nth1": 2,
+ "lib": 1,
+ "ic": 1,
+ "vabs": 2,
+ "Val": 8,
+ "AbsVal": 10,
+ "#": 9,
+ "labeling": 2,
+ "vabsIC": 1,
+ "or": 1,
+ "faitListe": 3,
+ "First": 2,
+ "Taille": 2,
+ "Min": 2,
+ "Max": 2,
+ "Min..Max": 1,
+ "Taille1": 2,
+ "suite": 3,
+ "Xi": 5,
+ "Xi1": 7,
+ "Xi2": 7,
+ "checkRelation": 3,
+ "VabsXi1": 2,
+ "Xi.": 1,
+ "checkPeriode": 3,
+ "ListVar": 2,
+ "Length": 2,
+ "<": 1,
+ "X1": 2,
+ "X2": 2,
+ "X3": 2,
+ "X4": 2,
+ "X5": 2,
+ "X6": 2,
+ "X7": 2,
+ "X8": 2,
+ "X9": 2,
+ "X10": 3,
"male": 3,
"john": 2,
"peter": 3,
@@ -33109,6 +54178,7 @@
"christie": 3,
"parents": 4,
"brother": 1,
+ "M": 2,
"turing": 1,
"Tape0": 2,
"Tape": 2,
@@ -33124,16 +54194,2103 @@
"symbol": 3,
"Sym": 6,
"RsRest": 2,
- "once": 1,
"rule": 1,
"Q1": 2,
"NewSym": 2,
- "Action": 2,
- "action": 4,
"Rs1": 2,
+ "left": 4,
"stay": 1,
+ "right": 1,
"L": 2
},
+ "Propeller Spin": {
+ "{": 26,
+ "*****************************************": 4,
+ "*": 143,
+ "x4": 4,
+ "Keypad": 1,
+ "Reader": 1,
+ "v1.0": 4,
+ "Author": 8,
+ "Beau": 2,
+ "Schwabe": 2,
+ "Copyright": 10,
+ "(": 356,
+ "c": 33,
+ ")": 356,
+ "Parallax": 10,
+ "See": 10,
+ "end": 12,
+ "of": 108,
+ "file": 9,
+ "for": 70,
+ "terms": 9,
+ "use.": 9,
+ "}": 26,
+ "Operation": 2,
+ "This": 3,
+ "object": 7,
+ "uses": 2,
+ "a": 72,
+ "capacitive": 1,
+ "PIN": 1,
+ "approach": 1,
+ "to": 191,
+ "reading": 1,
+ "the": 136,
+ "keypad.": 1,
+ "To": 3,
+ "do": 26,
+ "so": 11,
+ "ALL": 2,
+ "pins": 26,
+ "are": 18,
+ "made": 2,
+ "LOW": 2,
+ "and": 95,
+ "an": 12,
+ "OUTPUT": 2,
+ "I/O": 3,
+ "pins.": 1,
+ "Then": 1,
+ "set": 42,
+ "INPUT": 2,
+ "state.": 1,
+ "At": 1,
+ "this": 26,
+ "point": 21,
+ "only": 63,
+ "one": 4,
+ "pin": 18,
+ "is": 51,
+ "HIGH": 3,
+ "at": 26,
+ "time.": 2,
+ "If": 2,
+ "closed": 1,
+ "then": 5,
+ "will": 12,
+ "be": 46,
+ "read": 29,
+ "on": 12,
+ "input": 2,
+ "otherwise": 1,
+ "returned.": 1,
+ "The": 17,
+ "keypad": 4,
+ "decoding": 1,
+ "routine": 1,
+ "requires": 3,
+ "two": 6,
+ "subroutines": 1,
+ "returns": 6,
+ "entire": 1,
+ "matrix": 1,
+ "into": 19,
+ "single": 2,
+ "WORD": 1,
+ "variable": 1,
+ "indicating": 1,
+ "which": 16,
+ "buttons": 2,
+ "pressed.": 1,
+ "Multiple": 1,
+ "button": 2,
+ "presses": 1,
+ "allowed": 1,
+ "with": 8,
+ "understanding": 1,
+ "that": 10,
+ "BOX": 2,
+ "entries": 1,
+ "can": 4,
+ "confused.": 1,
+ "An": 1,
+ "example": 3,
+ "entry...": 1,
+ "or": 43,
+ "#": 97,
+ "etc.": 1,
+ "where": 2,
+ "any": 15,
+ "pressed": 3,
+ "evaluate": 1,
+ "non": 3,
+ "as": 8,
+ "being": 2,
+ "even": 1,
+ "when": 3,
+ "they": 2,
+ "not.": 1,
+ "There": 1,
+ "no": 7,
+ "danger": 1,
+ "physical": 1,
+ "electrical": 1,
+ "damage": 1,
+ "s": 16,
+ "just": 2,
+ "way": 1,
+ "sensing": 1,
+ "method": 2,
+ "happens": 1,
+ "work.": 1,
+ "Schematic": 1,
+ "No": 2,
+ "resistors": 4,
+ "capacitors.": 1,
+ "connections": 1,
+ "directly": 1,
+ "from": 21,
+ "Clear": 2,
+ "value": 51,
+ "ReadRow": 4,
+ "Shift": 3,
+ "left": 12,
+ "by": 17,
+ "preset": 1,
+ "P0": 2,
+ "P7": 2,
+ "LOWs": 1,
+ "dira": 3,
+ "[": 35,
+ "]": 34,
+ "make": 16,
+ "INPUTSs": 1,
+ "...": 5,
+ "now": 3,
+ "act": 1,
+ "like": 4,
+ "tiny": 1,
+ "capacitors": 1,
+ "outa": 2,
+ "n": 4,
+ "Pin": 1,
+ "OUTPUT...": 1,
+ "Make": 1,
+ ";": 2,
+ "charge": 10,
+ "+": 759,
+ "ina": 3,
+ "Pn": 1,
+ "remain": 1,
+ "discharged": 1,
+ "DAT": 7,
+ "TERMS": 9,
+ "OF": 49,
+ "USE": 19,
+ "MIT": 9,
+ "License": 9,
+ "Permission": 9,
+ "hereby": 9,
+ "granted": 9,
+ "free": 10,
+ "person": 9,
+ "obtaining": 9,
+ "copy": 21,
+ "software": 9,
+ "associated": 11,
+ "documentation": 9,
+ "files": 9,
+ "deal": 9,
+ "in": 53,
+ "Software": 28,
+ "without": 19,
+ "restriction": 9,
+ "including": 9,
+ "limitation": 9,
+ "rights": 9,
+ "use": 19,
+ "modify": 9,
+ "merge": 9,
+ "publish": 9,
+ "distribute": 9,
+ "sublicense": 9,
+ "and/or": 9,
+ "sell": 9,
+ "copies": 18,
+ "permit": 9,
+ "persons": 9,
+ "whom": 9,
+ "furnished": 9,
+ "subject": 9,
+ "following": 9,
+ "conditions": 9,
+ "above": 11,
+ "copyright": 9,
+ "notice": 18,
+ "permission": 9,
+ "shall": 9,
+ "included": 9,
+ "all": 14,
+ "substantial": 9,
+ "portions": 9,
+ "Software.": 9,
+ "THE": 59,
+ "SOFTWARE": 19,
+ "IS": 10,
+ "PROVIDED": 9,
+ "WITHOUT": 10,
+ "WARRANTY": 10,
+ "ANY": 20,
+ "KIND": 10,
+ "EXPRESS": 10,
+ "OR": 70,
+ "IMPLIED": 10,
+ "INCLUDING": 10,
+ "BUT": 10,
+ "NOT": 11,
+ "LIMITED": 10,
+ "TO": 10,
+ "WARRANTIES": 10,
+ "MERCHANTABILITY": 10,
+ "FITNESS": 10,
+ "FOR": 20,
+ "A": 21,
+ "PARTICULAR": 10,
+ "PURPOSE": 10,
+ "AND": 10,
+ "NONINFRINGEMENT.": 10,
+ "IN": 40,
+ "NO": 10,
+ "EVENT": 10,
+ "SHALL": 10,
+ "AUTHORS": 10,
+ "COPYRIGHT": 10,
+ "HOLDERS": 10,
+ "BE": 10,
+ "LIABLE": 10,
+ "CLAIM": 10,
+ "DAMAGES": 10,
+ "OTHER": 20,
+ "LIABILITY": 10,
+ "WHETHER": 10,
+ "AN": 10,
+ "ACTION": 10,
+ "CONTRACT": 10,
+ "TORT": 10,
+ "OTHERWISE": 10,
+ "ARISING": 10,
+ "FROM": 10,
+ "OUT": 10,
+ "CONNECTION": 10,
+ "WITH": 10,
+ "DEALINGS": 10,
+ "SOFTWARE.": 10,
+ "****************************************": 4,
+ "Debug_Lcd": 1,
+ "v1.2": 2,
+ "Authors": 1,
+ "Jon": 2,
+ "Williams": 2,
+ "Jeff": 2,
+ "Martin": 2,
+ "Inc.": 8,
+ "Debugging": 1,
+ "wrapper": 1,
+ "Serial_Lcd": 1,
+ "-": 486,
+ "March": 1,
+ "Updated": 4,
+ "conform": 1,
+ "Propeller": 3,
+ "initialization": 2,
+ "standards.": 1,
+ "v1.1": 8,
+ "April": 1,
+ "consistency.": 1,
+ "OBJ": 2,
+ "lcd": 2,
+ "number": 27,
+ "string": 8,
+ "conversion": 1,
+ "PUB": 63,
+ "init": 2,
+ "baud": 2,
+ "lines": 24,
+ "okay": 11,
+ "Initializes": 1,
+ "serial": 1,
+ "LCD": 4,
+ "true": 6,
+ "if": 53,
+ "parameters": 19,
+ "lcd.init": 1,
+ "finalize": 1,
+ "Finalizes": 1,
+ "frees": 6,
+ "floats": 1,
+ "lcd.finalize": 1,
+ "putc": 1,
+ "txbyte": 2,
+ "Send": 1,
+ "byte": 27,
+ "terminal": 4,
+ "lcd.putc": 1,
+ "str": 3,
+ "strAddr": 2,
+ "Print": 15,
+ "zero": 10,
+ "terminated": 4,
+ "lcd.str": 8,
+ "dec": 3,
+ "signed": 4,
+ "decimal": 5,
+ "num.dec": 1,
+ "decf": 1,
+ "width": 9,
+ "Prints": 2,
+ "space": 1,
+ "padded": 2,
+ "fixed": 1,
+ "field": 4,
+ "num.decf": 1,
+ "decx": 1,
+ "digits": 23,
+ "negative": 2,
+ "num.decx": 1,
+ "hex": 3,
+ "hexadecimal": 4,
+ "num.hex": 1,
+ "ihex": 1,
+ "indicated": 2,
+ "num.ihex": 1,
+ "bin": 3,
+ "binary": 4,
+ "num.bin": 1,
+ "ibin": 1,
+ "%": 162,
+ "num.ibin": 1,
+ "cls": 1,
+ "Clears": 2,
+ "moves": 1,
+ "cursor": 9,
+ "home": 4,
+ "position": 9,
+ "lcd.cls": 1,
+ "Moves": 2,
+ "lcd.home": 1,
+ "gotoxy": 1,
+ "col": 9,
+ "line": 33,
+ "col/line": 1,
+ "lcd.gotoxy": 1,
+ "clrln": 1,
+ "lcd.clrln": 1,
+ "type": 4,
+ "Selects": 1,
+ "off": 8,
+ "blink": 4,
+ "lcd.cursor": 1,
+ "display": 23,
+ "status": 15,
+ "Controls": 1,
+ "visibility": 1,
+ "false": 7,
+ "hide": 1,
+ "contents": 3,
+ "clearing": 1,
+ "lcd.displayOn": 1,
+ "else": 3,
+ "lcd.displayOff": 1,
+ "custom": 2,
+ "char": 2,
+ "chrDataAddr": 3,
+ "Installs": 1,
+ "character": 6,
+ "map": 1,
+ "address": 16,
+ "definition": 9,
+ "array": 1,
+ "lcd.custom": 1,
+ "backLight": 1,
+ "Enable": 1,
+ "disable": 7,
+ "backlight": 1,
+ "affects": 1,
+ "backlit": 1,
+ "models": 1,
+ "lcd.backLight": 1,
+ "***************************************": 12,
+ "Graphics": 3,
+ "Driver": 4,
+ "Chip": 7,
+ "Gracey": 7,
+ "Theory": 1,
+ "cog": 39,
+ "launched": 1,
+ "processes": 1,
+ "commands": 1,
+ "via": 5,
+ "routines.": 1,
+ "Points": 1,
+ "arcs": 1,
+ "sprites": 1,
+ "text": 9,
+ "polygons": 1,
+ "rasterized": 1,
+ "specified": 1,
+ "stretch": 1,
+ "memory": 2,
+ "serves": 1,
+ "generic": 1,
+ "bitmap": 15,
+ "buffer.": 1,
+ "displayed": 1,
+ "TV.SRC": 1,
+ "VGA.SRC": 1,
+ "driver.": 3,
+ "GRAPHICS_DEMO.SRC": 1,
+ "usage": 1,
+ "example.": 1,
+ "CON": 4,
+ "#1": 47,
+ "_setup": 1,
+ "_color": 2,
+ "_width": 2,
+ "_plot": 2,
+ "_line": 2,
+ "_arc": 2,
+ "_vec": 2,
+ "_vecarc": 2,
+ "_pix": 1,
+ "_pixarc": 1,
+ "_text": 2,
+ "_textarc": 1,
+ "_textmode": 2,
+ "_fill": 1,
+ "_loop": 5,
+ "VAR": 10,
+ "long": 122,
+ "command": 7,
+ "bitmap_base": 7,
+ "pixel": 40,
+ "data": 47,
+ "slices": 3,
+ "text_xs": 1,
+ "text_ys": 1,
+ "text_sp": 1,
+ "text_just": 1,
+ "font": 3,
+ "pointer": 14,
+ "same": 7,
+ "instances": 1,
+ "stop": 9,
+ "cognew": 4,
+ "@loop": 1,
+ "@command": 1,
+ "Stop": 6,
+ "graphics": 4,
+ "driver": 17,
+ "cogstop": 3,
+ "setup": 3,
+ "x_tiles": 9,
+ "y_tiles": 9,
+ "x_origin": 2,
+ "y_origin": 2,
+ "base_ptr": 3,
+ "|": 22,
+ "bases_ptr": 3,
+ "slices_ptr": 1,
+ "Set": 5,
+ "x": 112,
+ "tiles": 19,
+ "x16": 7,
+ "pixels": 14,
+ "each": 11,
+ "y": 80,
+ "relative": 2,
+ "center": 10,
+ "base": 6,
+ "setcommand": 13,
+ "write": 36,
+ "bases": 2,
+ "<<": 70,
+ "retain": 2,
+ "high": 7,
+ "level": 5,
+ "bitmap_longs": 1,
+ "clear": 5,
+ "dest_ptr": 2,
+ "Copy": 1,
+ "double": 2,
+ "buffered": 1,
+ "flicker": 5,
+ "destination": 1,
+ "color": 39,
+ "bit": 35,
+ "pattern": 2,
+ "code": 3,
+ "bits": 29,
+ "@colors": 2,
+ "&": 21,
+ "determine": 2,
+ "shape/width": 2,
+ "w": 8,
+ "F": 18,
+ "pixel_width": 1,
+ "pixel_passes": 2,
+ "@w": 1,
+ "update": 7,
+ "new": 6,
+ "repeat": 18,
+ "i": 24,
+ "p": 8,
+ "E": 7,
+ "r": 4,
+ "<": 14,
+ "colorwidth": 1,
+ "plot": 17,
+ "Plot": 3,
+ "@x": 6,
+ "Draw": 7,
+ "endpoint": 1,
+ "arc": 21,
+ "xr": 7,
+ "yr": 7,
+ "angle": 23,
+ "anglestep": 2,
+ "steps": 9,
+ "arcmode": 2,
+ "radii": 3,
+ "initial": 6,
+ "FFF": 3,
+ "..359.956": 3,
+ "step": 9,
+ "leaves": 1,
+ "between": 4,
+ "points": 2,
+ "vec": 1,
+ "vecscale": 5,
+ "vecangle": 5,
+ "vecdef_ptr": 5,
+ "vector": 12,
+ "sprite": 14,
+ "scale": 7,
+ "rotation": 3,
+ "Vector": 2,
+ "word": 212,
+ "length": 4,
+ "vecarc": 2,
+ "pix": 3,
+ "pixrot": 3,
+ "pixdef_ptr": 3,
+ "mirror": 1,
+ "Pixel": 1,
+ "justify": 4,
+ "draw": 5,
+ "textarc": 1,
+ "string_ptr": 6,
+ "justx": 2,
+ "justy": 3,
+ "it": 8,
+ "may": 6,
+ "necessary": 1,
+ "call": 44,
+ ".finish": 1,
+ "immediately": 1,
+ "afterwards": 1,
+ "prevent": 1,
+ "subsequent": 1,
+ "clobbering": 1,
+ "drawn": 1,
+ "@justx": 1,
+ "@x_scale": 1,
+ "get": 30,
+ "half": 2,
+ "min": 4,
+ "max": 6,
+ "pmin": 1,
+ "round/square": 1,
+ "corners": 1,
+ "y2": 7,
+ "x2": 6,
+ "fill": 3,
+ "pmax": 2,
+ "triangle": 3,
+ "sides": 1,
+ "polygon": 1,
+ "tri": 2,
+ "x3": 4,
+ "y3": 5,
+ "y4": 1,
+ "x1": 5,
+ "y1": 7,
+ "xy": 1,
+ "solid": 1,
+ "/": 27,
+ "finish": 2,
+ "Wait": 2,
+ "current": 3,
+ "insure": 2,
+ "safe": 1,
+ "manually": 1,
+ "manipulate": 1,
+ "while": 5,
+ "primitives": 1,
+ "xa0": 53,
+ "start": 16,
+ "ya1": 3,
+ "ya2": 1,
+ "ya3": 2,
+ "ya4": 40,
+ "ya5": 3,
+ "ya6": 21,
+ "ya7": 9,
+ "ya8": 19,
+ "ya9": 5,
+ "yaA": 18,
+ "yaB": 4,
+ "yaC": 12,
+ "yaD": 4,
+ "yaE": 1,
+ "yaF": 1,
+ "xb0": 19,
+ "yb1": 2,
+ "yb2": 1,
+ "yb3": 4,
+ "yb4": 15,
+ "yb5": 2,
+ "yb6": 7,
+ "yb7": 3,
+ "yb8": 20,
+ "yb9": 5,
+ "ybA": 8,
+ "ybB": 1,
+ "ybC": 32,
+ "ybD": 1,
+ "ybE": 1,
+ "ybF": 1,
+ "ax1": 11,
+ "radius": 2,
+ "ay2": 23,
+ "ay3": 6,
+ "ay4": 4,
+ "a0": 8,
+ "a2": 1,
+ "farc": 41,
+ "another": 7,
+ "arc/line": 1,
+ "Round": 1,
+ "recipes": 1,
+ "C": 11,
+ "D": 18,
+ "fline": 88,
+ "xa2": 48,
+ "xb2": 26,
+ "xa1": 8,
+ "xb1": 2,
+ "more": 90,
+ "xa3": 8,
+ "xb3": 6,
+ "xb4": 35,
+ "a9": 3,
+ "ax2": 30,
+ "ay1": 10,
+ "a7": 2,
+ "aE": 1,
+ "aC": 2,
+ ".": 2,
+ "aF": 4,
+ "aD": 3,
+ "aB": 2,
+ "xa4": 13,
+ "a8": 8,
+ "@": 1,
+ "a4": 3,
+ "B": 15,
+ "H": 1,
+ "J": 1,
+ "L": 5,
+ "N": 1,
+ "P": 6,
+ "R": 3,
+ "T": 5,
+ "aA": 5,
+ "V": 7,
+ "X": 4,
+ "Z": 1,
+ "b": 1,
+ "d": 2,
+ "f": 2,
+ "h": 2,
+ "j": 2,
+ "l": 2,
+ "t": 10,
+ "v": 1,
+ "z": 4,
+ "delta": 10,
+ "bullet": 1,
+ "fx": 1,
+ "*************************************": 2,
+ "org": 2,
+ "loop": 14,
+ "rdlong": 16,
+ "t1": 139,
+ "par": 20,
+ "wz": 21,
+ "arguments": 1,
+ "mov": 154,
+ "t2": 90,
+ "t3": 10,
+ "#8": 14,
+ "arg": 3,
+ "arg0": 12,
+ "add": 92,
+ "d0": 11,
+ "#4": 8,
+ "djnz": 24,
+ "wrlong": 6,
+ "dx": 20,
+ "dy": 15,
+ "arg1": 3,
+ "ror": 4,
+ "#16": 6,
+ "jump": 1,
+ "jumps": 6,
+ "color_": 1,
+ "plot_": 2,
+ "arc_": 2,
+ "vecarc_": 1,
+ "pixarc_": 1,
+ "textarc_": 2,
+ "fill_": 1,
+ "setup_": 1,
+ "xlongs": 4,
+ "xorigin": 2,
+ "yorigin": 4,
+ "arg3": 12,
+ "basesptr": 4,
+ "arg5": 6,
+ "jmp": 24,
+ "#loop": 9,
+ "width_": 1,
+ "pwidth": 3,
+ "passes": 3,
+ "#plotd": 3,
+ "line_": 1,
+ "#linepd": 2,
+ "arg7": 6,
+ "#3": 7,
+ "cmp": 16,
+ "exit": 5,
+ "px": 14,
+ "py": 11,
+ "mode": 7,
+ "if_z": 11,
+ "#plotp": 3,
+ "test": 38,
+ "arg4": 5,
+ "iterations": 1,
+ "vecdef": 1,
+ "rdword": 10,
+ "t7": 8,
+ "add/sub": 1,
+ "to/from": 1,
+ "t6": 7,
+ "sumc": 4,
+ "#multiply": 2,
+ "round": 1,
+ "up": 4,
+ "/2": 1,
+ "lsb": 1,
+ "shr": 24,
+ "t4": 7,
+ "if_nc": 15,
+ "h8000": 5,
+ "wc": 57,
+ "if_c": 37,
+ "xwords": 1,
+ "ywords": 1,
+ "xxxxxxxx": 2,
+ "save": 1,
+ "actual": 4,
+ "sy": 5,
+ "rdbyte": 3,
+ "origin": 1,
+ "adjust": 4,
+ "neg": 2,
+ "sub": 12,
+ "arg2": 7,
+ "sumnc": 7,
+ "if_nz": 18,
+ "yline": 1,
+ "sx": 4,
+ "#0": 20,
+ "next": 16,
+ "#2": 15,
+ "shl": 21,
+ "t5": 4,
+ "xpixel": 2,
+ "rol": 1,
+ "muxc": 5,
+ "pcolor": 5,
+ "color1": 2,
+ "color2": 2,
+ "@string": 1,
+ "#arcmod": 1,
+ "text_": 1,
+ "chr": 4,
+ "done": 3,
+ "scan": 7,
+ "tjz": 8,
+ "def": 2,
+ "extract": 4,
+ "_0001_1": 1,
+ "#fontb": 3,
+ "textsy": 2,
+ "starting": 1,
+ "_0011_0": 1,
+ "#11": 1,
+ "#arcd": 1,
+ "#fontxy": 1,
+ "advance": 2,
+ "textsx": 3,
+ "_0111_0": 1,
+ "setd_ret": 1,
+ "fontxy_ret": 1,
+ "ret": 17,
+ "fontb": 1,
+ "multiply": 8,
+ "fontb_ret": 1,
+ "textmode_": 1,
+ "textsp": 2,
+ "da": 1,
+ "db": 1,
+ "db2": 1,
+ "linechange": 1,
+ "lines_minus_1": 1,
+ "right": 9,
+ "fractions": 1,
+ "pre": 1,
+ "increment": 1,
+ "counter": 1,
+ "yloop": 2,
+ "integers": 1,
+ "base0": 17,
+ "base1": 10,
+ "sar": 8,
+ "cmps": 3,
+ "out": 24,
+ "range": 2,
+ "ylongs": 6,
+ "skip": 5,
+ "mins": 1,
+ "mask": 3,
+ "mask0": 8,
+ "#5": 2,
+ "ready": 10,
+ "count": 4,
+ "mask1": 6,
+ "bits0": 6,
+ "bits1": 5,
+ "pass": 5,
+ "not": 6,
+ "full": 3,
+ "longs": 15,
+ "deltas": 1,
+ "linepd": 1,
+ "wr": 2,
+ "direction": 2,
+ "abs": 1,
+ "dominant": 2,
+ "axis": 1,
+ "last": 6,
+ "ratio": 1,
+ "xloop": 1,
+ "linepd_ret": 1,
+ "plotd": 1,
+ "wide": 3,
+ "bounds": 2,
+ "#plotp_ret": 2,
+ "#7": 2,
+ "store": 1,
+ "writes": 1,
+ "pair": 1,
+ "account": 1,
+ "special": 1,
+ "case": 5,
+ "andn": 7,
+ "slice": 7,
+ "shift0": 1,
+ "colorize": 1,
+ "upper": 2,
+ "subx": 1,
+ "#wslice": 1,
+ "offset": 14,
+ "Get": 2,
+ "args": 5,
+ "move": 2,
+ "using": 1,
+ "first": 9,
+ "arg6": 1,
+ "arcmod_ret": 1,
+ "arg2/t4": 1,
+ "arg4/t6": 1,
+ "arcd": 1,
+ "#setd": 1,
+ "#polarx": 1,
+ "Polar": 1,
+ "cartesian": 1,
+ "polarx": 1,
+ "sine_90": 2,
+ "sine": 7,
+ "quadrant": 3,
+ "nz": 3,
+ "negate": 2,
+ "table": 9,
+ "sine_table": 1,
+ "shift": 7,
+ "final": 3,
+ "sine/cosine": 1,
+ "integer": 2,
+ "negnz": 3,
+ "sine_180": 1,
+ "shifted": 1,
+ "multiplier": 3,
+ "product": 1,
+ "Defined": 1,
+ "constants": 2,
+ "hFFFFFFFF": 1,
+ "FFFFFFFF": 1,
+ "fontptr": 1,
+ "Undefined": 2,
+ "temps": 1,
+ "res": 89,
+ "pointers": 2,
+ "slicesptr": 1,
+ "line/plot": 1,
+ "coordinates": 1,
+ "Inductive": 1,
+ "Sensor": 1,
+ "Demo": 1,
+ "Test": 2,
+ "Circuit": 1,
+ "pF": 1,
+ "K": 4,
+ "M": 1,
+ "FPin": 2,
+ "SDF": 1,
+ "sigma": 3,
+ "feedback": 2,
+ "SDI": 1,
+ "GND": 4,
+ "Coils": 1,
+ "Wire": 1,
+ "used": 9,
+ "was": 2,
+ "GREEN": 2,
+ "about": 4,
+ "gauge": 1,
+ "Coke": 3,
+ "Can": 3,
+ "form": 7,
+ "MHz": 16,
+ "BIC": 1,
+ "pen": 1,
+ "How": 1,
+ "does": 2,
+ "work": 2,
+ "Note": 1,
+ "reported": 2,
+ "resonate": 5,
+ "frequency": 18,
+ "LC": 8,
+ "frequency.": 2,
+ "Instead": 1,
+ "voltage": 5,
+ "produced": 1,
+ "circuit": 5,
+ "clipped.": 1,
+ "In": 2,
+ "below": 4,
+ "When": 1,
+ "you": 5,
+ "apply": 1,
+ "small": 1,
+ "specific": 1,
+ "near": 1,
+ "uncommon": 1,
+ "measure": 1,
+ "times": 3,
+ "amount": 1,
+ "applying": 1,
+ "circuit.": 1,
+ "through": 1,
+ "diode": 2,
+ "basically": 1,
+ "feeds": 1,
+ "divide": 3,
+ "divider": 1,
+ "...So": 1,
+ "order": 1,
+ "see": 2,
+ "ADC": 2,
+ "sweep": 2,
+ "result": 6,
+ "output": 11,
+ "needs": 1,
+ "generate": 1,
+ "Volts": 1,
+ "ground.": 1,
+ "drop": 1,
+ "across": 1,
+ "since": 1,
+ "sensitive": 1,
+ "works": 1,
+ "after": 2,
+ "divider.": 1,
+ "typical": 1,
+ "magnitude": 1,
+ "applied": 2,
+ "might": 1,
+ "look": 2,
+ "something": 1,
+ "*****": 4,
+ "...With": 1,
+ "looks": 1,
+ "X****": 1,
+ "...The": 1,
+ "denotes": 1,
+ "location": 1,
+ "reason": 1,
+ "slightly": 1,
+ "reasons": 1,
+ "really.": 1,
+ "lazy": 1,
+ "I": 1,
+ "didn": 1,
+ "acts": 1,
+ "dead": 1,
+ "short.": 1,
+ "situation": 1,
+ "exactly": 1,
+ "great": 1,
+ "gr.start": 2,
+ "gr.setup": 2,
+ "FindResonateFrequency": 1,
+ "DisplayInductorValue": 2,
+ "Freq.Synth": 1,
+ "FValue": 1,
+ "ADC.SigmaDelta": 1,
+ "@FTemp": 1,
+ "gr.clear": 1,
+ "gr.copy": 2,
+ "display_base": 2,
+ "Option": 2,
+ "Start": 6,
+ "*********************************************": 2,
+ "Frequency": 1,
+ "LowerFrequency": 2,
+ "*100/": 1,
+ "UpperFrequency": 1,
+ "gr.colorwidth": 4,
+ "gr.plot": 3,
+ "gr.line": 3,
+ "FTemp/1024": 1,
+ "Finish": 1,
+ "PS/2": 1,
+ "Keyboard": 1,
+ "v1.0.1": 2,
+ "REVISION": 2,
+ "HISTORY": 2,
+ "/15/2006": 2,
+ "Tool": 1,
+ "par_tail": 1,
+ "key": 4,
+ "buffer": 4,
+ "head": 1,
+ "par_present": 1,
+ "states": 1,
+ "par_keys": 1,
+ "******************************************": 2,
+ "entry": 1,
+ "movd": 10,
+ "#_dpin": 1,
+ "masks": 1,
+ "dmask": 4,
+ "_dpin": 3,
+ "cmask": 2,
+ "_cpin": 2,
+ "reset": 14,
+ "parameter": 14,
+ "_head": 6,
+ "_present/_states": 1,
+ "dlsb": 2,
+ "stat": 6,
+ "Update": 1,
+ "_head/_present/_states": 1,
+ "#1*4": 1,
+ "scancode": 2,
+ "state": 2,
+ "#receive": 1,
+ "AA": 1,
+ "extended": 1,
+ "if_nc_and_z": 2,
+ "F0": 3,
+ "unknown": 2,
+ "ignore": 2,
+ "#newcode": 1,
+ "_states": 2,
+ "set/clear": 1,
+ "#_states": 1,
+ "reg": 5,
+ "muxnc": 5,
+ "cmpsub": 4,
+ "shift/ctrl/alt/win": 1,
+ "pairs": 1,
+ "E0": 1,
+ "handle": 1,
+ "scrlock/capslock/numlock": 1,
+ "_000": 5,
+ "_locks": 5,
+ "#29": 1,
+ "change": 3,
+ "configure": 3,
+ "flag": 5,
+ "leds": 3,
+ "check": 5,
+ "shift1": 1,
+ "if_nz_and_c": 4,
+ "#@shift1": 1,
+ "@table": 1,
+ "#look": 1,
+ "alpha": 1,
+ "considering": 1,
+ "capslock": 1,
+ "if_nz_and_nc": 1,
+ "xor": 8,
+ "flags": 1,
+ "alt": 1,
+ "room": 1,
+ "valid": 2,
+ "enter": 1,
+ "FF": 3,
+ "#11*4": 1,
+ "wrword": 1,
+ "F3": 1,
+ "keyboard": 3,
+ "lock": 1,
+ "#transmit": 2,
+ "rev": 1,
+ "rcl": 2,
+ "_present": 2,
+ "#update": 1,
+ "Lookup": 2,
+ "perform": 2,
+ "lookup": 1,
+ "movs": 9,
+ "#table": 1,
+ "#27": 1,
+ "#rand": 1,
+ "Transmit": 1,
+ "pull": 2,
+ "clock": 4,
+ "low": 5,
+ "napshr": 3,
+ "#13": 3,
+ "#18": 2,
+ "release": 1,
+ "transmit_bit": 1,
+ "#wait_c0": 2,
+ "_d2": 1,
+ "wcond": 3,
+ "c1": 2,
+ "c0d0": 2,
+ "wait": 6,
+ "until": 3,
+ "#wait": 2,
+ "#receive_ack": 1,
+ "ack": 1,
+ "error": 1,
+ "#reset": 2,
+ "transmit_ret": 1,
+ "receive": 1,
+ "receive_bit": 1,
+ "pause": 1,
+ "us": 1,
+ "#nap": 1,
+ "_d3": 1,
+ "#receive_bit": 1,
+ "align": 1,
+ "isolate": 1,
+ "look_ret": 1,
+ "receive_ack_ret": 1,
+ "receive_ret": 1,
+ "wait_c0": 1,
+ "c0": 1,
+ "timeout": 1,
+ "ms": 4,
+ "wloop": 1,
+ "required": 4,
+ "_d4": 1,
+ "replaced": 1,
+ "c0/c1/c0d0/c1d1": 1,
+ "if_never": 1,
+ "replacements": 1,
+ "#wloop": 3,
+ "if_c_or_nz": 1,
+ "c1d1": 1,
+ "if_nc_or_z": 1,
+ "nap": 5,
+ "scales": 1,
+ "time": 7,
+ "snag": 1,
+ "cnt": 2,
+ "elapses": 1,
+ "nap_ret": 1,
+ "F9": 1,
+ "F5": 1,
+ "D2": 1,
+ "F1": 2,
+ "D1": 1,
+ "F12": 1,
+ "F10": 1,
+ "D7": 1,
+ "F6": 1,
+ "D3": 1,
+ "Tab": 2,
+ "Alt": 2,
+ "F3F2": 1,
+ "q": 1,
+ "Win": 2,
+ "Space": 2,
+ "Apps": 1,
+ "Power": 1,
+ "Sleep": 1,
+ "EF2F": 1,
+ "CapsLock": 1,
+ "Enter": 3,
+ "WakeUp": 1,
+ "BackSpace": 1,
+ "C5E1": 1,
+ "C0E4": 1,
+ "Home": 1,
+ "Insert": 1,
+ "C9EA": 1,
+ "Down": 1,
+ "E5": 1,
+ "Right": 1,
+ "C2E8": 1,
+ "Esc": 1,
+ "DF": 2,
+ "F11": 1,
+ "EC": 1,
+ "PageDn": 1,
+ "ED": 1,
+ "PrScr": 1,
+ "C6E9": 1,
+ "ScrLock": 1,
+ "D6": 1,
+ "Uninitialized": 3,
+ "_________": 5,
+ "Key": 1,
+ "Codes": 1,
+ "keypress": 1,
+ "keystate": 2,
+ "E0..FF": 1,
+ "AS": 1,
+ "TV": 9,
+ "May": 2,
+ "tile": 41,
+ "size": 5,
+ "enable": 5,
+ "efficient": 2,
+ "tv_mode": 2,
+ "NTSC": 11,
+ "lntsc": 3,
+ "cycles": 4,
+ "per": 4,
+ "sync": 10,
+ "fpal": 2,
+ "_433_618": 2,
+ "PAL": 10,
+ "spal": 3,
+ "colortable": 7,
+ "inside": 2,
+ "tvptr": 3,
+ "starts": 4,
+ "available": 4,
+ "@entry": 3,
+ "Assembly": 2,
+ "language": 2,
+ "Entry": 2,
+ "tasks": 6,
+ "#10": 2,
+ "Superfield": 2,
+ "_mode": 7,
+ "interlace": 20,
+ "vinv": 2,
+ "hsync": 5,
+ "waitvid": 3,
+ "burst": 2,
+ "sync_high2": 2,
+ "task": 2,
+ "section": 4,
+ "undisturbed": 2,
+ "black": 2,
+ "visible": 7,
+ "vb": 2,
+ "leftmost": 1,
+ "_vt": 3,
+ "vertical": 29,
+ "expand": 3,
+ "vert": 1,
+ "vscl": 12,
+ "hb": 2,
+ "horizontal": 21,
+ "hx": 5,
+ "colors": 18,
+ "screen": 13,
+ "video": 7,
+ "repoint": 2,
+ "hf": 2,
+ "linerot": 5,
+ "field1": 4,
+ "unless": 2,
+ "invisible": 8,
+ "if_z_eq_c": 1,
+ "#hsync": 1,
+ "vsync": 4,
+ "pulses": 2,
+ "vsync1": 2,
+ "#sync_low1": 1,
+ "hhalf": 2,
+ "field2": 1,
+ "#superfield": 1,
+ "Blank": 1,
+ "Horizontal": 1,
+ "pal": 2,
+ "toggle": 1,
+ "phaseflip": 4,
+ "phasemask": 2,
+ "sync_scale1": 1,
+ "blank": 2,
+ "hsync_ret": 1,
+ "vsync_high": 1,
+ "#sync_high1": 1,
+ "Tasks": 1,
+ "performed": 1,
+ "sections": 1,
+ "during": 2,
+ "back": 8,
+ "porch": 9,
+ "load": 3,
+ "#_enable": 1,
+ "_pins": 4,
+ "_enable": 2,
+ "#disabled": 2,
+ "break": 6,
+ "return": 15,
+ "later": 6,
+ "rd": 1,
+ "#wtab": 1,
+ "ltab": 1,
+ "#ltab": 1,
+ "CLKFREQ": 10,
+ "cancel": 1,
+ "_broadcast": 4,
+ "m8": 3,
+ "jmpret": 5,
+ "taskptr": 3,
+ "taskret": 4,
+ "ctra": 5,
+ "pll": 5,
+ "fcolor": 4,
+ "#divide": 2,
+ "vco": 3,
+ "movi": 3,
+ "_111": 1,
+ "ctrb": 4,
+ "limit": 4,
+ "m128": 2,
+ "_100": 1,
+ "within": 5,
+ "_001": 1,
+ "frqb": 2,
+ "swap": 2,
+ "broadcast/baseband": 1,
+ "strip": 3,
+ "chroma": 19,
+ "baseband": 18,
+ "_auralcog": 1,
+ "_hx": 4,
+ "consider": 2,
+ "lineadd": 4,
+ "lineinc": 3,
+ "/160": 2,
+ "loaded": 3,
+ "#9": 2,
+ "FC": 2,
+ "_colors": 2,
+ "colorreg": 3,
+ "d6": 3,
+ "colorloop": 1,
+ "keep": 2,
+ "loading": 2,
+ "m1": 4,
+ "multiply_ret": 2,
+ "Disabled": 2,
+ "try": 2,
+ "again": 2,
+ "reload": 1,
+ "_000_000": 6,
+ "d0s1": 1,
+ "F0F0F0F0": 1,
+ "pins0": 1,
+ "_01110000_00001111_00000111": 1,
+ "pins1": 1,
+ "_11110111_01111111_01110111": 1,
+ "sync_high1": 1,
+ "_101010_0101": 1,
+ "NTSC/PAL": 2,
+ "metrics": 1,
+ "tables": 1,
+ "wtab": 1,
+ "sntsc": 3,
+ "lpal": 3,
+ "hrest": 2,
+ "vvis": 2,
+ "vrep": 2,
+ "_8A": 1,
+ "_AA": 1,
+ "sync_scale2": 1,
+ "_00000000_01_10101010101010_0101": 1,
+ "m2": 1,
+ "Parameter": 4,
+ "/non": 4,
+ "tccip": 3,
+ "_screen": 3,
+ "@long": 2,
+ "_ht": 2,
+ "_ho": 2,
+ "fit": 2,
+ "contiguous": 1,
+ "tv_status": 4,
+ "off/on": 3,
+ "tv_pins": 5,
+ "ntsc/pal": 3,
+ "tv_screen": 5,
+ "tv_ht": 5,
+ "tv_hx": 5,
+ "expansion": 8,
+ "tv_ho": 5,
+ "tv_broadcast": 4,
+ "aural": 13,
+ "fm": 6,
+ "preceding": 2,
+ "copied": 2,
+ "your": 2,
+ "code.": 2,
+ "After": 2,
+ "setting": 2,
+ "variables": 3,
+ "@tv_status": 3,
+ "All": 2,
+ "reloaded": 2,
+ "superframe": 2,
+ "allowing": 2,
+ "live": 2,
+ "changes.": 2,
+ "minimize": 2,
+ "correlate": 2,
+ "changes": 3,
+ "tv_status.": 1,
+ "Experimentation": 2,
+ "optimize": 2,
+ "some": 3,
+ "parameters.": 2,
+ "descriptions": 2,
+ "sets": 3,
+ "indicate": 2,
+ "disabled": 3,
+ "tv_enable": 2,
+ "requirement": 2,
+ "currently": 4,
+ "outputting": 4,
+ "driven": 2,
+ "reduces": 2,
+ "power": 3,
+ "_______": 2,
+ "select": 9,
+ "group": 7,
+ "_0111": 6,
+ "broadcast": 19,
+ "_1111": 6,
+ "_0000": 4,
+ "active": 3,
+ "top": 10,
+ "nibble": 4,
+ "bottom": 5,
+ "signal": 8,
+ "arranged": 3,
+ "attach": 1,
+ "ohm": 10,
+ "resistor": 4,
+ "sum": 7,
+ "/560/1100": 2,
+ "subcarrier": 3,
+ "network": 1,
+ "visual": 1,
+ "carrier": 1,
+ "selects": 4,
+ "x32": 6,
+ "tileheight": 4,
+ "controls": 4,
+ "mixing": 2,
+ "mix": 2,
+ "black/white": 2,
+ "composite": 1,
+ "progressive": 2,
+ "less": 5,
+ "good": 5,
+ "motion": 2,
+ "interlaced": 5,
+ "doubles": 1,
+ "format": 1,
+ "ticks": 11,
+ "must": 18,
+ "least": 14,
+ "_318_180": 1,
+ "_579_545": 1,
+ "Hz": 5,
+ "_734_472": 1,
+ "itself": 1,
+ "words": 5,
+ "define": 10,
+ "tv_vt": 3,
+ "has": 4,
+ "bitfields": 2,
+ "colorset": 2,
+ "ptr": 5,
+ "pixelgroup": 2,
+ "colorset*": 2,
+ "pixelgroup**": 2,
+ "ppppppppppcccc00": 2,
+ "colorsets": 4,
+ "four": 8,
+ "**": 2,
+ "pixelgroups": 2,
+ "": 5,
+ "tv_colors": 2,
+ "fields": 2,
+ "values": 2,
+ "luminance": 2,
+ "modulation": 4,
+ "adds/subtracts": 1,
+ "beware": 1,
+ "modulated": 1,
+ "produce": 1,
+ "saturated": 1,
+ "toggling": 1,
+ "levels": 1,
+ "because": 1,
+ "abruptly": 1,
+ "rather": 1,
+ "against": 1,
+ "white": 2,
+ "background": 1,
+ "best": 1,
+ "appearance": 1,
+ "_____": 6,
+ "practical": 2,
+ "/30": 1,
+ "factor": 4,
+ "sure": 4,
+ "||": 5,
+ "than": 5,
+ "tv_vx": 2,
+ "tv_vo": 2,
+ "pos/neg": 4,
+ "centered": 2,
+ "image": 2,
+ "shifts": 4,
+ "right/left": 2,
+ "up/down": 2,
+ "____________": 1,
+ "expressed": 1,
+ "ie": 1,
+ "channel": 1,
+ "_250_000": 2,
+ "modulator": 2,
+ "turned": 2,
+ "saves": 2,
+ "broadcasting": 1,
+ "___________": 1,
+ "tv_auralcog": 1,
+ "supply": 1,
+ "selected": 1,
+ "bandwidth": 2,
+ "KHz": 3,
+ "vary": 1,
+ "Terminal": 1,
+ "instead": 1,
+ "minimum": 2,
+ "x_scale": 4,
+ "x_spacing": 4,
+ "normal": 1,
+ "x_chr": 2,
+ "y_chr": 5,
+ "y_scale": 3,
+ "y_spacing": 3,
+ "y_offset": 2,
+ "x_limit": 2,
+ "x_screen": 1,
+ "y_limit": 3,
+ "y_screen": 4,
+ "y_max": 3,
+ "y_screen_bytes": 2,
+ "y_scroll": 2,
+ "y_scroll_longs": 4,
+ "y_clear": 2,
+ "y_clear_longs": 2,
+ "paramcount": 1,
+ "ccinp": 1,
+ "tv_hc": 1,
+ "cells": 1,
+ "cell": 1,
+ "@bitmap": 1,
+ "FC0": 1,
+ "gr.textmode": 1,
+ "gr.width": 1,
+ "tv.stop": 2,
+ "gr.stop": 1,
+ "schemes": 1,
+ "tab": 3,
+ "gr.color": 1,
+ "gr.text": 1,
+ "@c": 1,
+ "gr.finish": 2,
+ "newline": 3,
+ "strsize": 2,
+ "_000_000_000": 2,
+ "//": 4,
+ "elseif": 2,
+ "lookupz": 2,
+ "..": 4,
+ "PRI": 1,
+ "longmove": 2,
+ "longfill": 2,
+ "tvparams": 1,
+ "tvparams_pins": 1,
+ "_0101": 1,
+ "vc": 1,
+ "vx": 2,
+ "vo": 1,
+ "auralcog": 1,
+ "color_schemes": 1,
+ "BC_6C_05_02": 1,
+ "E_0D_0C_0A": 1,
+ "E_6D_6C_6A": 1,
+ "BE_BD_BC_BA": 1,
+ "Text": 1,
+ "x13": 2,
+ "cols": 5,
+ "rows": 4,
+ "screensize": 4,
+ "lastrow": 2,
+ "tv_count": 2,
+ "row": 4,
+ "tv": 2,
+ "basepin": 3,
+ "setcolors": 2,
+ "@palette": 1,
+ "@tv_params": 1,
+ "@screen": 3,
+ "tv.start": 1,
+ "stringptr": 3,
+ "k": 1,
+ "Output": 1,
+ "backspace": 1,
+ "spaces": 1,
+ "follows": 4,
+ "Y": 2,
+ "others": 1,
+ "printable": 1,
+ "characters": 1,
+ "wordfill": 2,
+ "print": 2,
+ "A..": 1,
+ "other": 1,
+ "colorptr": 2,
+ "fore": 3,
+ "Override": 1,
+ "default": 1,
+ "palette": 2,
+ "list": 1,
+ "scroll": 1,
+ "hc": 1,
+ "ho": 1,
+ "dark": 2,
+ "blue": 3,
+ "BB": 1,
+ "yellow": 1,
+ "brown": 1,
+ "cyan": 3,
+ "red": 2,
+ "pink": 1,
+ "VGA": 8,
+ "vga_mode": 3,
+ "vgaptr": 3,
+ "hv": 5,
+ "bcolor": 3,
+ "#colortable": 2,
+ "#blank_line": 3,
+ "nobl": 1,
+ "_vx": 1,
+ "nobp": 1,
+ "nofp": 1,
+ "#blank_hsync": 1,
+ "front": 4,
+ "vf": 1,
+ "nofl": 1,
+ "#tasks": 1,
+ "before": 1,
+ "_vs": 2,
+ "except": 1,
+ "#blank_vsync": 1,
+ "#field": 1,
+ "superfield": 1,
+ "blank_vsync": 1,
+ "h2": 2,
+ "if_c_and_nz": 1,
+ "blank_hsync": 1,
+ "_hf": 1,
+ "invisble": 1,
+ "_hb": 1,
+ "#hv": 1,
+ "blank_hsync_ret": 1,
+ "blank_line_ret": 1,
+ "blank_vsync_ret": 1,
+ "_status": 1,
+ "#paramcount": 1,
+ "directions": 1,
+ "_rate": 3,
+ "pllmin": 1,
+ "_011": 1,
+ "rate": 6,
+ "hvbase": 5,
+ "frqa": 3,
+ "vmask": 1,
+ "hmask": 1,
+ "vcfg": 2,
+ "colormask": 1,
+ "waitcnt": 3,
+ "#entry": 1,
+ "Initialized": 1,
+ "lowest": 1,
+ "pllmax": 1,
+ "*16": 1,
+ "m4": 1,
+ "tihv": 1,
+ "_hd": 1,
+ "_hs": 1,
+ "_vd": 1,
+ "underneath": 1,
+ "BF": 1,
+ "___": 1,
+ "/1/2": 1,
+ "off/visible/invisible": 1,
+ "vga_enable": 3,
+ "pppttt": 1,
+ "vga_colors": 2,
+ "vga_vt": 6,
+ "vga_vx": 4,
+ "vga_vo": 4,
+ "vga_hf": 2,
+ "vga_hb": 2,
+ "vga_vf": 2,
+ "vga_vb": 2,
+ "tick": 2,
+ "@vga_status": 1,
+ "vga_status.": 1,
+ "__________": 4,
+ "vga_status": 1,
+ "________": 3,
+ "vga_pins": 1,
+ "monitors": 1,
+ "allows": 1,
+ "polarity": 1,
+ "respectively": 1,
+ "vga_screen": 1,
+ "vga_ht": 3,
+ "care": 1,
+ "suggested": 1,
+ "bits/pins": 3,
+ "green": 1,
+ "bit/pin": 1,
+ "signals": 1,
+ "connect": 3,
+ "RED": 1,
+ "BLUE": 1,
+ "connector": 3,
+ "always": 2,
+ "HSYNC": 1,
+ "VSYNC": 1,
+ "______": 14,
+ "vga_hx": 3,
+ "vga_ho": 2,
+ "equal": 1,
+ "vga_hd": 2,
+ "exceed": 1,
+ "vga_vd": 2,
+ "recommended": 2,
+ "vga_hs": 1,
+ "vga_vs": 1,
+ "vga_rate": 2,
+ "should": 1,
+ "Vocal": 2,
+ "Tract": 2,
+ "October": 1,
+ "synthesizes": 1,
+ "human": 1,
+ "vocal": 10,
+ "tract": 12,
+ "real": 2,
+ "It": 1,
+ "MHz.": 1,
+ "controlled": 1,
+ "reside": 1,
+ "parent": 1,
+ "aa": 2,
+ "ga": 5,
+ "gp": 2,
+ "vp": 3,
+ "vr": 1,
+ "f1": 4,
+ "f2": 1,
+ "f3": 3,
+ "f4": 2,
+ "na": 2,
+ "nf": 2,
+ "fa": 2,
+ "ff": 2,
+ "values.": 2,
+ "Before": 1,
+ "were": 1,
+ "interpolation": 1,
+ "shy": 1,
+ "frame": 12,
+ "makes": 1,
+ "behave": 1,
+ "sensibly": 1,
+ "gaps.": 1,
+ "frame_buffers": 2,
+ "bytes": 2,
+ "frame_longs": 3,
+ "frame_bytes": 1,
+ "...must": 1,
+ "dira_": 3,
+ "dirb_": 1,
+ "ctra_": 1,
+ "ctrb_": 3,
+ "frqa_": 3,
+ "cnt_": 1,
+ "many": 1,
+ "...contiguous": 1,
+ "tract_ptr": 3,
+ "pos_pin": 7,
+ "neg_pin": 6,
+ "fm_offset": 5,
+ "positive": 1,
+ "also": 1,
+ "enabled": 2,
+ "generation": 2,
+ "_500_000": 1,
+ "Remember": 1,
+ "duty": 2,
+ "Ready": 1,
+ "clkfreq": 2,
+ "Launch": 1,
+ "@attenuation": 1,
+ "Reset": 1,
+ "buffers": 1,
+ "@index": 1,
+ "constant": 3,
+ "frame_buffer_longs": 2,
+ "set_attenuation": 1,
+ "master": 2,
+ "attenuation": 3,
+ "initially": 2,
+ "set_pace": 2,
+ "percentage": 3,
+ "pace": 3,
+ "go": 1,
+ "Queue": 1,
+ "transition": 1,
+ "over": 2,
+ "Load": 1,
+ "bytemove": 1,
+ "@frames": 1,
+ "index": 5,
+ "Increment": 1,
+ "Returns": 4,
+ "queue": 2,
+ "useful": 2,
+ "checking": 1,
+ "would": 1,
+ "have": 1,
+ "frames": 2,
+ "empty": 2,
+ "detecting": 1,
+ "finished": 1,
+ "sample_ptr": 1,
+ "receives": 1,
+ "audio": 1,
+ "samples": 1,
+ "updated": 1,
+ "@sample": 1,
+ "aural_id": 1,
+ "id": 2,
+ "executing": 1,
+ "algorithm": 1,
+ "connecting": 1,
+ "Initialization": 1,
+ "reserved": 3,
+ "clear_cnt": 1,
+ "#2*15": 1,
+ "hub": 1,
+ "minst": 3,
+ "d0s0": 3,
+ "mult_ret": 1,
+ "antilog_ret": 1,
+ "assemble": 1,
+ "cordic": 4,
+ "reserves": 2,
+ "cstep": 1,
+ "instruction": 2,
+ "prepare": 1,
+ "cnt_value": 3,
+ "cnt_ticks": 3,
+ "Loop": 1,
+ "sample": 2,
+ "period": 1,
+ "cycle": 1,
+ "driving": 1,
+ "h80000000": 2,
+ "White": 1,
+ "noise": 3,
+ "source": 2,
+ "lfsr": 1,
+ "lfsr_taps": 2,
+ "Aspiration": 1,
+ "vibrato": 3,
+ "vphase": 2,
+ "glottal": 2,
+ "pitch": 5,
+ "mesh": 1,
+ "tune": 2,
+ "convert": 1,
+ "log": 2,
+ "phase": 2,
+ "gphase": 3,
+ "formant2": 2,
+ "rotate": 2,
+ "f2x": 3,
+ "f2y": 3,
+ "#cordic": 2,
+ "formant4": 2,
+ "f4x": 3,
+ "f4y": 3,
+ "subtract": 1,
+ "nx": 4,
+ "negated": 1,
+ "nasal": 2,
+ "amplitude": 3,
+ "#mult": 1,
+ "fphase": 4,
+ "frication": 2,
+ "#sine": 1,
+ "Handle": 1,
+ "frame_ptr": 6,
+ "past": 1,
+ "miscellaneous": 2,
+ "frame_index": 3,
+ "stepsize": 2,
+ "step_size": 5,
+ "h00FFFFFF": 2,
+ "final1": 2,
+ "finali": 2,
+ "iterate": 3,
+ "aa..ff": 4,
+ "accurate": 1,
+ "accumulation": 1,
+ "step_acc": 3,
+ "set2": 3,
+ "#par_curr": 1,
+ "set3": 2,
+ "#par_next": 1,
+ "set4": 3,
+ "#par_step": 1,
+ "#24": 1,
+ "par_curr": 3,
+ "absolute": 1,
+ "msb": 2,
+ "nr": 1,
+ "mult": 2,
+ "par_step": 1,
+ "frame_cnt": 2,
+ "step1": 2,
+ "stepi": 1,
+ "stepframe": 1,
+ "#frame_bytes": 1,
+ "par_next": 2,
+ "Math": 1,
+ "Subroutines": 1,
+ "Antilog": 1,
+ "whole": 2,
+ "fraction": 1,
+ "antilog": 2,
+ "FFEA0000": 1,
+ "h00000FFE": 2,
+ "insert": 2,
+ "leading": 1,
+ "Scaled": 1,
+ "unsigned": 3,
+ "h00001000": 2,
+ "negc": 1,
+ "Multiply": 1,
+ "#15": 1,
+ "mult_step": 1,
+ "Cordic": 1,
+ "degree": 1,
+ "#cordic_steps": 1,
+ "gets": 1,
+ "assembled": 1,
+ "cordic_dx": 1,
+ "incremented": 1,
+ "cordic_a": 1,
+ "cordic_delta": 2,
+ "linear": 1,
+ "register": 1,
+ "B901476": 1,
+ "greater": 1,
+ "h40000000": 1,
+ "h01000000": 1,
+ "FFFFFF": 1,
+ "h00010000": 1,
+ "h0000D000": 1,
+ "D000": 1,
+ "h00007000": 1,
+ "FFE": 1,
+ "h00000800": 1,
+ "registers": 2,
+ "startup": 2,
+ "Data": 1,
+ "zeroed": 1,
+ "cleared": 1,
+ "f1x": 1,
+ "f1y": 1,
+ "f3x": 1,
+ "f3y": 1,
+ "aspiration": 1,
+ "***": 1,
+ "mult_steps": 1,
+ "assembly": 1,
+ "area": 1,
+ "w/ret": 1,
+ "cordic_ret": 1
+ },
"Protocol Buffer": {
"package": 1,
"tutorial": 1,
@@ -33168,34 +56325,464 @@
"AddressBook": 1,
"person": 1
},
+ "PureScript": {
+ "module": 4,
+ "Control.Arrow": 1,
+ "where": 20,
+ "import": 32,
+ "Data.Tuple": 3,
+ "class": 4,
+ "Arrow": 5,
+ "a": 46,
+ "arr": 10,
+ "forall": 26,
+ "b": 49,
+ "c.": 3,
+ "(": 111,
+ "-": 88,
+ "c": 17,
+ ")": 115,
+ "first": 4,
+ "d.": 2,
+ "Tuple": 21,
+ "d": 6,
+ "instance": 12,
+ "arrowFunction": 1,
+ "f": 28,
+ "second": 3,
+ "Category": 3,
+ "swap": 4,
+ "b.": 1,
+ "x": 26,
+ "y": 2,
+ "infixr": 3,
+ "***": 2,
+ "&&": 3,
+ "&": 3,
+ ".": 2,
+ "g": 4,
+ "ArrowZero": 1,
+ "zeroArrow": 1,
+ "<+>": 2,
+ "ArrowPlus": 1,
+ "Data.Foreign": 2,
+ "Foreign": 12,
+ "..": 1,
+ "ForeignParser": 29,
+ "parseForeign": 6,
+ "parseJSON": 3,
+ "ReadForeign": 11,
+ "read": 10,
+ "prop": 3,
+ "Prelude": 3,
+ "Data.Array": 3,
+ "Data.Either": 1,
+ "Data.Maybe": 3,
+ "Data.Traversable": 2,
+ "foreign": 6,
+ "data": 3,
+ "*": 1,
+ "fromString": 2,
+ "String": 13,
+ "Either": 6,
+ "readPrimType": 5,
+ "a.": 6,
+ "readMaybeImpl": 2,
+ "Maybe": 5,
+ "readPropImpl": 2,
+ "showForeignImpl": 2,
+ "showForeign": 1,
+ "Prelude.Show": 1,
+ "show": 5,
+ "p": 11,
+ "json": 2,
+ "monadForeignParser": 1,
+ "Prelude.Monad": 1,
+ "return": 6,
+ "_": 7,
+ "Right": 9,
+ "case": 9,
+ "of": 9,
+ "Left": 8,
+ "err": 8,
+ "applicativeForeignParser": 1,
+ "Prelude.Applicative": 1,
+ "pure": 1,
+ "<*>": 2,
+ "<$>": 8,
+ "functorForeignParser": 1,
+ "Prelude.Functor": 1,
+ "readString": 1,
+ "readNumber": 1,
+ "Number": 1,
+ "readBoolean": 1,
+ "Boolean": 1,
+ "readArray": 1,
+ "[": 5,
+ "]": 5,
+ "let": 4,
+ "arrayItem": 2,
+ "i": 2,
+ "result": 4,
+ "+": 30,
+ "in": 2,
+ "xs": 3,
+ "traverse": 2,
+ "zip": 1,
+ "range": 1,
+ "length": 3,
+ "readMaybe": 1,
+ "<<": 4,
+ "<": 13,
+ "Just": 7,
+ "Nothing": 7,
+ "Data.Map": 1,
+ "Map": 26,
+ "empty": 6,
+ "singleton": 5,
+ "insert": 10,
+ "lookup": 8,
+ "delete": 9,
+ "alter": 8,
+ "toList": 10,
+ "fromList": 3,
+ "union": 3,
+ "map": 8,
+ "qualified": 1,
+ "as": 1,
+ "P": 1,
+ "concat": 3,
+ "Data.Foldable": 2,
+ "foldl": 4,
+ "k": 108,
+ "v": 57,
+ "Leaf": 15,
+ "|": 9,
+ "Branch": 27,
+ "{": 25,
+ "key": 13,
+ "value": 8,
+ "left": 15,
+ "right": 14,
+ "}": 26,
+ "eqMap": 1,
+ "P.Eq": 11,
+ "m1": 6,
+ "m2": 6,
+ "P.": 11,
+ "/": 1,
+ "P.not": 1,
+ "showMap": 1,
+ "P.Show": 3,
+ "m": 6,
+ "P.show": 1,
+ "v.": 11,
+ "P.Ord": 9,
+ "b@": 6,
+ "k1": 16,
+ "b.left": 9,
+ "b.right": 8,
+ "findMinKey": 5,
+ "glue": 4,
+ "minKey": 3,
+ "root": 2,
+ "b.key": 1,
+ "b.value": 2,
+ "v1": 3,
+ "v2.": 1,
+ "v2": 2,
+ "ReactiveJQueryTest": 1,
+ "flip": 2,
+ "Control.Monad": 1,
+ "Control.Monad.Eff": 1,
+ "Control.Monad.JQuery": 1,
+ "Control.Reactive": 1,
+ "Control.Reactive.JQuery": 1,
+ "head": 2,
+ "Data.Monoid": 1,
+ "Debug.Trace": 1,
+ "Global": 1,
+ "parseInt": 1,
+ "main": 1,
+ "do": 4,
+ "personDemo": 2,
+ "todoListDemo": 1,
+ "greet": 1,
+ "firstName": 2,
+ "lastName": 2,
+ "Create": 3,
+ "new": 1,
+ "reactive": 1,
+ "variables": 1,
+ "to": 3,
+ "hold": 1,
+ "the": 3,
+ "user": 1,
+ "readRArray": 1,
+ "insertRArray": 1,
+ "text": 5,
+ "completed": 2,
+ "paragraph": 2,
+ "display": 2,
+ "next": 1,
+ "task": 4,
+ "nextTaskLabel": 3,
+ "create": 2,
+ "append": 2,
+ "nextTask": 2,
+ "toComputedArray": 2,
+ "toComputed": 2,
+ "bindTextOneWay": 2,
+ "counter": 3,
+ "counterLabel": 3,
+ "rs": 2,
+ "cs": 2,
+ "<->": 1,
+ "if": 1,
+ "then": 1,
+ "else": 1,
+ "entry": 1,
+ "entry.completed": 1
+ },
"Python": {
- "from": 34,
+ "xspacing": 4,
+ "#": 28,
+ "How": 2,
+ "far": 1,
+ "apart": 1,
+ "should": 1,
+ "each": 1,
+ "horizontal": 1,
+ "location": 1,
+ "be": 1,
+ "spaced": 1,
+ "maxwaves": 3,
+ "total": 1,
+ "of": 5,
+ "waves": 1,
+ "to": 5,
+ "add": 1,
+ "together": 1,
+ "theta": 3,
+ "amplitude": 3,
+ "[": 165,
+ "]": 165,
+ "Height": 1,
+ "wave": 2,
+ "dx": 8,
+ "yvalues": 7,
+ "def": 87,
+ "setup": 2,
+ "(": 850,
+ ")": 861,
+ "size": 5,
+ "frameRate": 1,
+ "colorMode": 1,
+ "RGB": 1,
+ "w": 2,
+ "width": 1,
+ "+": 51,
+ "for": 69,
+ "i": 13,
+ "in": 91,
+ "range": 5,
+ "amplitude.append": 1,
+ "random": 2,
+ "period": 2,
+ "many": 1,
+ "pixels": 1,
+ "before": 1,
+ "the": 6,
+ "repeats": 1,
+ "dx.append": 1,
+ "TWO_PI": 1,
+ "/": 26,
+ "*": 38,
+ "_": 6,
+ "yvalues.append": 1,
+ "draw": 2,
+ "background": 2,
+ "calcWave": 2,
+ "renderWave": 2,
+ "len": 11,
+ "j": 7,
+ "x": 34,
+ "if": 160,
+ "%": 33,
+ "sin": 1,
+ "else": 33,
+ "cos": 1,
+ "noStroke": 2,
+ "fill": 2,
+ "ellipseMode": 1,
+ "CENTER": 1,
+ "v": 19,
+ "enumerate": 2,
+ "ellipse": 1,
+ "height": 1,
+ "import": 55,
+ "os": 2,
+ "sys": 3,
+ "json": 1,
+ "c4d": 1,
+ "c4dtools": 1,
+ "itertools": 1,
+ "from": 36,
+ "c4d.modules": 1,
+ "graphview": 1,
+ "as": 14,
+ "gv": 1,
+ "c4dtools.misc": 1,
+ "graphnode": 1,
+ "res": 3,
+ "importer": 1,
+ "c4dtools.prepare": 1,
+ "__file__": 1,
+ "__res__": 1,
+ "settings": 2,
+ "c4dtools.helpers.Attributor": 2,
+ "{": 27,
+ "res.file": 3,
+ "}": 27,
+ "align_nodes": 2,
+ "nodes": 11,
+ "mode": 5,
+ "spacing": 7,
+ "r": 9,
+ "modes": 3,
+ "not": 69,
+ "return": 68,
+ "raise": 23,
+ "ValueError": 6,
+ ".join": 4,
+ "get_0": 12,
+ "lambda": 6,
+ "x.x": 1,
+ "get_1": 4,
+ "x.y": 1,
+ "set_0": 6,
+ "setattr": 16,
+ "set_1": 4,
+ "graphnode.GraphNode": 1,
+ "n": 6,
+ "nodes.sort": 1,
+ "key": 6,
+ "n.position": 1,
+ "midpoint": 3,
+ "graphnode.find_nodes_mid": 1,
+ "first_position": 2,
+ ".position": 1,
+ "new_positions": 2,
+ "prev_offset": 6,
+ "node": 2,
+ "position": 12,
+ "node.position": 2,
+ "-": 36,
+ "node.size": 1,
+ "<": 2,
+ "new_positions.append": 1,
+ "bbox_size": 2,
+ "bbox_size_2": 2,
+ "itertools.izip": 1,
+ "align_nodes_shortcut": 3,
+ "master": 2,
+ "gv.GetMaster": 1,
+ "root": 3,
+ "master.GetRoot": 1,
+ "graphnode.find_selected_nodes": 1,
+ "master.AddUndo": 1,
+ "c4d.EventAdd": 1,
+ "True": 25,
+ "class": 19,
+ "XPAT_Options": 3,
+ "defaults": 1,
+ "__init__": 7,
+ "self": 113,
+ "filename": 12,
+ "None": 92,
+ "super": 4,
+ ".__init__": 3,
+ "self.load": 1,
+ "load": 1,
+ "is": 31,
+ "settings.options_filename": 2,
+ "os.path.isfile": 1,
+ "self.dict_": 2,
+ "self.defaults.copy": 2,
+ "with": 2,
+ "open": 2,
+ "fp": 4,
+ "self.dict_.update": 1,
+ "json.load": 1,
+ "self.save": 1,
+ "save": 2,
+ "values": 15,
+ "dict": 4,
+ "k": 7,
+ "self.dict_.iteritems": 1,
+ "self.defaults": 1,
+ "json.dump": 1,
+ "XPAT_OptionsDialog": 2,
+ "c4d.gui.GeDialog": 1,
+ "CreateLayout": 1,
+ "self.LoadDialogResource": 1,
+ "res.DLG_OPTIONS": 1,
+ "InitValues": 1,
+ "self.SetLong": 2,
+ "res.EDT_HSPACE": 2,
+ "options.hspace": 3,
+ "res.EDT_VSPACE": 2,
+ "options.vspace": 3,
+ "Command": 1,
+ "id": 2,
+ "msg": 1,
+ "res.BTN_SAVE": 1,
+ "self.GetLong": 2,
+ "options.save": 1,
+ "self.Close": 1,
+ "XPAT_Command_OpenOptionsDialog": 2,
+ "c4dtools.plugins.Command": 3,
+ "self._dialog": 4,
+ "@property": 2,
+ "dialog": 1,
+ "PLUGIN_ID": 3,
+ "PLUGIN_NAME": 3,
+ "res.string.XPAT_COMMAND_OPENOPTIONSDIALOG": 1,
+ "PLUGIN_HELP": 3,
+ "res.string.XPAT_COMMAND_OPENOPTIONSDIALOG_HELP": 1,
+ "Execute": 3,
+ "doc": 3,
+ "self.dialog.Open": 1,
+ "c4d.DLG_TYPE_MODAL": 1,
+ "XPAT_Command_AlignHorizontal": 1,
+ "res.string.XPAT_COMMAND_ALIGNHORIZONTAL": 1,
+ "PLUGIN_ICON": 2,
+ "res.string.XPAT_COMMAND_ALIGNHORIZONTAL_HELP": 1,
+ "XPAT_Command_AlignVertical": 1,
+ "res.string.XPAT_COMMAND_ALIGNVERTICAL": 1,
+ "res.string.XPAT_COMMAND_ALIGNVERTICAL_HELP": 1,
+ "options": 4,
+ "__name__": 3,
+ "c4dtools.plugins.main": 1,
"__future__": 2,
- "import": 47,
"unicode_literals": 1,
"copy": 1,
- "sys": 2,
"functools": 1,
"update_wrapper": 2,
"future_builtins": 1,
"zip": 8,
"django.db.models.manager": 1,
- "#": 13,
"Imported": 1,
- "to": 4,
"register": 1,
"signal": 1,
"handler.": 1,
"django.conf": 1,
- "settings": 1,
"django.core.exceptions": 1,
- "(": 719,
"ObjectDoesNotExist": 2,
"MultipleObjectsReturned": 2,
"FieldError": 4,
"ValidationError": 8,
"NON_FIELD_ERRORS": 3,
- ")": 730,
"django.core": 1,
"validators": 1,
"django.db.models.fields": 1,
@@ -33225,8 +56812,6 @@
"get_model": 3,
"django.utils.translation": 1,
"ugettext_lazy": 1,
- "as": 11,
- "_": 5,
"django.utils.functional": 1,
"curry": 6,
"django.utils.encoding": 1,
@@ -33235,54 +56820,37 @@
"django.utils.text": 1,
"get_text_list": 2,
"capfirst": 6,
- "class": 14,
"ModelBase": 4,
"type": 6,
- "def": 68,
"__new__": 2,
"cls": 32,
"name": 39,
"bases": 6,
"attrs": 7,
"super_new": 3,
- "super": 2,
".__new__": 1,
"parents": 8,
- "[": 152,
"b": 11,
- "for": 59,
- "in": 79,
- "if": 145,
"isinstance": 11,
- "]": 152,
- "not": 64,
- "return": 57,
"module": 6,
"attrs.pop": 2,
"new_class": 9,
- "{": 25,
- "}": 25,
"attr_meta": 5,
- "None": 86,
"abstract": 3,
"getattr": 30,
"False": 28,
"meta": 12,
- "else": 30,
"base_meta": 2,
- "is": 29,
"model_module": 1,
"sys.modules": 1,
"new_class.__module__": 1,
"kwargs": 9,
"model_module.__name__.split": 1,
- "-": 30,
"new_class.add_to_class": 7,
"**kwargs": 9,
"subclass_exception": 3,
"tuple": 3,
"x.DoesNotExist": 1,
- "x": 22,
"hasattr": 11,
"and": 35,
"x._meta.abstract": 2,
@@ -33308,7 +56876,6 @@
"attrs.items": 1,
"new_fields": 2,
"new_class._meta.local_fields": 3,
- "+": 37,
"new_class._meta.local_many_to_many": 2,
"new_class._meta.virtual_fields": 1,
"field_names": 5,
@@ -33319,15 +56886,12 @@
"parent": 5,
"parent._meta.abstract": 1,
"parent._meta.fields": 1,
- "raise": 22,
"TypeError": 4,
- "%": 32,
"continue": 10,
"new_class._meta.setup_proxy": 1,
"new_class._meta.concrete_model": 2,
"base._meta.concrete_model": 2,
"o2o_map": 3,
- "dict": 3,
"f.rel.to": 1,
"original_base": 1,
"parent_fields": 3,
@@ -33341,7 +56905,6 @@
"attr_name": 3,
"base._meta.module_name": 1,
"auto_created": 1,
- "True": 20,
"parent_link": 1,
"new_class._meta.parents": 1,
"copy.deepcopy": 2,
@@ -33366,7 +56929,6 @@
"add_to_class": 1,
"value": 9,
"value.contribute_to_class": 1,
- "setattr": 14,
"_prepare": 1,
"opts": 5,
"cls._meta": 3,
@@ -33385,7 +56947,6 @@
"opts.order_with_respect_to.rel.to": 1,
"cls.__doc__": 3,
"cls.__name__": 1,
- ".join": 3,
"f.attname": 5,
"opts.fields": 1,
"cls.get_absolute_url": 3,
@@ -33394,8 +56955,6 @@
"sender": 5,
"ModelState": 2,
"object": 6,
- "__init__": 5,
- "self": 100,
"db": 2,
"self.db": 1,
"self.adding": 1,
@@ -33408,7 +56967,6 @@
"args": 8,
"self._state": 1,
"args_len": 2,
- "len": 9,
"self._meta.fields": 5,
"IndexError": 2,
"fields_iter": 4,
@@ -33429,7 +56987,6 @@
"property": 2,
"AttributeError": 1,
"pass": 4,
- ".__init__": 1,
"signals.post_init.send": 1,
"instance": 5,
"__repr__": 2,
@@ -33468,12 +57025,10 @@
"serializable_value": 1,
"field_name": 8,
"self._meta.get_field_by_name": 1,
- "save": 1,
"force_insert": 7,
"force_update": 10,
"using": 30,
"update_fields": 23,
- "ValueError": 5,
"frozenset": 2,
"field.primary_key": 1,
"non_model_fields": 2,
@@ -33502,13 +57057,11 @@
"manager.using": 3,
".filter": 7,
".exists": 1,
- "values": 13,
"f.pre_save": 1,
"rows": 3,
"._update": 1,
"meta.order_with_respect_to": 2,
"order_value": 2,
- "*": 33,
".count": 1,
"self._order": 1,
"fields": 12,
@@ -33568,8 +57121,6 @@
"self._perform_unique_checks": 1,
"date_errors": 1,
"self._perform_date_checks": 1,
- "k": 4,
- "v": 11,
"date_errors.items": 1,
"errors.setdefault": 3,
".extend": 2,
@@ -33607,7 +57158,6 @@
"model_class._meta": 2,
"qs.exclude": 2,
"qs.exists": 2,
- "key": 5,
".append": 2,
"self.unique_error_message": 1,
"_perform_date_checks": 1,
@@ -33629,7 +57179,6 @@
"field.error_messages": 1,
"field_labels": 4,
"map": 1,
- "lambda": 1,
"full_clean": 1,
"self.clean_fields": 1,
"e": 13,
@@ -33651,15 +57200,11 @@
"ordered_obj._meta.order_with_respect_to.rel.field_name": 2,
"order_name": 4,
"ordered_obj._meta.order_with_respect_to.name": 2,
- "i": 7,
- "j": 2,
- "enumerate": 1,
"ordered_obj.objects.filter": 2,
".update": 1,
"_order": 1,
"pk_name": 3,
"ordered_obj._meta.pk.name": 1,
- "r": 3,
".values": 1,
"##############################################": 2,
"func": 2,
@@ -33688,8 +57233,6 @@
"decorate": 2,
"based": 1,
"views": 1,
- "the": 5,
- "of": 3,
"as_view": 1,
".": 1,
"However": 1,
@@ -33725,6 +57268,22 @@
"meth": 5,
"request.method.lower": 1,
"request.method": 2,
+ "P3D": 1,
+ "lights": 1,
+ "camera": 1,
+ "mouseY": 1,
+ "eyeX": 1,
+ "eyeY": 1,
+ "eyeZ": 1,
+ "centerX": 1,
+ "centerY": 1,
+ "centerZ": 1,
+ "upX": 1,
+ "upY": 1,
+ "upZ": 1,
+ "box": 1,
+ "stroke": 1,
+ "line": 3,
"google.protobuf": 4,
"descriptor": 1,
"_descriptor": 1,
@@ -33740,7 +57299,6 @@
"_PERSON": 3,
"_descriptor.Descriptor": 1,
"full_name": 2,
- "filename": 1,
"file": 1,
"containing_type": 2,
"_descriptor.FieldDescriptor": 1,
@@ -33754,7 +57312,6 @@
"enum_type": 1,
"is_extension": 1,
"extension_scope": 1,
- "options": 3,
"extensions": 1,
"nested_types": 1,
"enum_types": 1,
@@ -33768,13 +57325,11 @@
"_reflection.GeneratedProtocolMessageType": 1,
"SHEBANG#!python": 4,
"print": 39,
- "os": 1,
"main": 4,
"usage": 3,
"string": 1,
"command": 4,
"sys.argv": 2,
- "<": 1,
"sys.exit": 1,
"printDelimiter": 4,
"get": 1,
@@ -33797,7 +57352,6 @@
"os.walk": 1,
".next": 1,
"os.path.isdir": 1,
- "__name__": 2,
"argparse": 1,
"matplotlib.pyplot": 1,
"pl": 1,
@@ -33810,7 +57364,6 @@
"S": 4,
"phif": 7,
"U": 10,
- "/": 23,
"_parse_args": 2,
"V": 12,
"np.genfromtxt": 8,
@@ -33907,7 +57460,6 @@
"phi": 5,
"c": 3,
"a*x": 1,
- "dx": 6,
"d**": 2,
"dy": 4,
"dx_err": 3,
@@ -34099,7 +57651,6 @@
"uri.partition": 1,
"self.arguments": 2,
"supports_http_1_1": 1,
- "@property": 1,
"cookies": 1,
"self._cookies": 3,
"Cookie.SimpleCookie": 1,
@@ -34111,10 +57662,8 @@
"get_ssl_certificate": 1,
"self.connection.stream.socket.getpeercert": 1,
"ssl.SSLError": 1,
- "n": 3,
"_valid_ip": 1,
"ip": 2,
- "res": 2,
"socket.getaddrinfo": 1,
"socket.AF_UNSPEC": 1,
"socket.SOCK_STREAM": 1,
@@ -34188,36 +57737,133 @@
"Test.ui": 1
},
"R": {
- "SHEBANG#!Rscript": 1,
+ "df.residual.mira": 1,
+ "<": 46,
+ "-": 53,
+ "function": 18,
+ "(": 219,
+ "object": 12,
+ "...": 4,
+ ")": 220,
+ "{": 58,
+ "fit": 2,
+ "analyses": 1,
+ "[": 23,
+ "]": 24,
+ "return": 8,
+ "df.residual": 2,
+ "}": 58,
+ "df.residual.lme": 1,
+ "fixDF": 1,
+ "df.residual.mer": 1,
+ "sum": 1,
+ "object@dims": 1,
+ "*": 2,
+ "c": 11,
+ "+": 4,
+ "df.residual.default": 1,
+ "q": 3,
+ "df": 3,
+ "if": 19,
+ "is.null": 8,
+ "mk": 2,
+ "try": 3,
+ "coef": 1,
+ "silent": 3,
+ "TRUE": 14,
+ "mn": 2,
+ "f": 9,
+ "fitted": 1,
+ "inherits": 6,
+ "|": 3,
+ "NULL": 2,
+ "n": 3,
+ "ifelse": 1,
+ "is.data.frame": 1,
+ "is.matrix": 1,
+ "nrow": 1,
+ "length": 3,
+ "k": 3,
+ "max": 1,
+ "SHEBANG#!Rscript": 2,
+ "#": 45,
+ "MedianNorm": 2,
+ "data": 13,
+ "geomeans": 3,
+ "<->": 1,
+ "exp": 1,
+ "rowMeans": 1,
+ "log": 5,
+ "apply": 2,
+ "2": 1,
+ "cnts": 2,
+ "median": 1,
+ "library": 1,
+ "print_usage": 2,
+ "file": 4,
+ "stderr": 1,
+ "cat": 1,
+ "spec": 2,
+ "matrix": 3,
+ "byrow": 3,
+ "ncol": 3,
+ "opt": 23,
+ "getopt": 1,
+ "help": 1,
+ "stdout": 1,
+ "status": 1,
+ "height": 7,
+ "out": 4,
+ "res": 6,
+ "width": 7,
+ "ylim": 7,
+ "read.table": 1,
+ "header": 1,
+ "sep": 4,
+ "quote": 1,
+ "nsamp": 8,
+ "dim": 1,
+ "outfile": 4,
+ "sprintf": 2,
+ "png": 2,
+ "h": 13,
+ "hist": 4,
+ "plot": 7,
+ "FALSE": 9,
+ "mids": 4,
+ "density": 4,
+ "type": 3,
+ "col": 4,
+ "rainbow": 4,
+ "main": 2,
+ "xlab": 2,
+ "ylab": 2,
+ "for": 4,
+ "i": 6,
+ "in": 8,
+ "lines": 6,
+ "devnum": 2,
+ "dev.off": 2,
+ "size.factors": 2,
+ "data.matrix": 1,
+ "data.norm": 3,
+ "t": 1,
+ "x": 3,
+ "/": 1,
"ParseDates": 2,
- "<": 12,
- "-": 12,
- "function": 3,
- "(": 28,
- "lines": 4,
- ")": 28,
- "{": 3,
"dates": 3,
- "matrix": 2,
"unlist": 2,
- "strsplit": 2,
- "ncol": 2,
- "byrow": 2,
- "TRUE": 3,
+ "strsplit": 3,
"days": 2,
- "[": 3,
- "]": 3,
"times": 2,
"hours": 2,
"all.days": 2,
- "c": 2,
"all.hours": 2,
"data.frame": 1,
"Day": 2,
"factor": 2,
"levels": 2,
"Hour": 2,
- "}": 3,
"Main": 2,
"system": 1,
"intern": 1,
@@ -34228,8 +57874,6 @@
"ggplot": 1,
"aes": 2,
"y": 1,
- "x": 1,
- "+": 2,
"geom_point": 1,
"size": 1,
"Freq": 1,
@@ -34237,11 +57881,279 @@
"range": 1,
"ggsave": 1,
"filename": 1,
- "plot": 1,
- "width": 1,
- "height": 1,
"hello": 2,
- "print": 1
+ "print": 1,
+ "module": 25,
+ "code": 21,
+ "available": 1,
+ "via": 1,
+ "the": 16,
+ "environment": 4,
+ "like": 1,
+ "it": 3,
+ "returns.": 1,
+ "@param": 2,
+ "an": 1,
+ "identifier": 1,
+ "specifying": 1,
+ "full": 1,
+ "path": 9,
+ "search": 5,
+ "see": 1,
+ "Details": 1,
+ "even": 1,
+ "attach": 11,
+ "is": 7,
+ "optionally": 1,
+ "attached": 2,
+ "to": 9,
+ "of": 2,
+ "current": 2,
+ "scope": 1,
+ "defaults": 1,
+ ".": 7,
+ "However": 1,
+ "interactive": 2,
+ "invoked": 1,
+ "directly": 1,
+ "from": 5,
+ "terminal": 1,
+ "only": 1,
+ "i.e.": 1,
+ "not": 4,
+ "within": 1,
+ "modules": 4,
+ "import.attach": 1,
+ "can": 3,
+ "be": 8,
+ "set": 2,
+ "or": 1,
+ "depending": 1,
+ "on": 2,
+ "user": 1,
+ "s": 2,
+ "preference.": 1,
+ "attach_operators": 3,
+ "causes": 1,
+ "emph": 3,
+ "operators": 3,
+ "by": 2,
+ "default": 1,
+ "path.": 1,
+ "Not": 1,
+ "attaching": 1,
+ "them": 1,
+ "therefore": 1,
+ "drastically": 1,
+ "limits": 1,
+ "a": 6,
+ "usefulness.": 1,
+ "Modules": 1,
+ "are": 4,
+ "searched": 1,
+ "options": 1,
+ "priority.": 1,
+ "The": 5,
+ "directory": 1,
+ "always": 1,
+ "considered": 1,
+ "first.": 1,
+ "That": 1,
+ "local": 3,
+ "./a.r": 1,
+ "will": 2,
+ "loaded.": 1,
+ "Module": 1,
+ "names": 2,
+ "fully": 1,
+ "qualified": 1,
+ "refer": 1,
+ "nested": 1,
+ "paths.": 1,
+ "See": 1,
+ "import": 5,
+ "executed": 1,
+ "global": 1,
+ "effect": 1,
+ "same.": 1,
+ "When": 1,
+ "used": 2,
+ "globally": 1,
+ "inside": 1,
+ "newly": 2,
+ "outside": 1,
+ "nor": 1,
+ "other": 2,
+ "which": 3,
+ "might": 1,
+ "loaded": 4,
+ "@examples": 1,
+ "@seealso": 3,
+ "reload": 3,
+ "@export": 2,
+ "substitute": 2,
+ "stopifnot": 3,
+ "missing": 1,
+ "&&": 2,
+ "module_name": 7,
+ "getOption": 1,
+ "else": 4,
+ "class": 4,
+ "module_path": 15,
+ "find_module": 1,
+ "stop": 1,
+ "attr": 2,
+ "message": 1,
+ "containing_modules": 3,
+ "module_init_files": 1,
+ "mapply": 1,
+ "do_import": 4,
+ "mod_ns": 5,
+ "as.character": 3,
+ "module_parent": 8,
+ "parent.frame": 2,
+ "mod_env": 7,
+ "exhibit_namespace": 3,
+ "identical": 2,
+ ".GlobalEnv": 2,
+ "name": 10,
+ "environmentName": 2,
+ "parent.env": 4,
+ "export_operators": 2,
+ "invisible": 1,
+ "is_module_loaded": 1,
+ "get_loaded_module": 1,
+ "namespace": 13,
+ "structure": 3,
+ "new.env": 1,
+ "parent": 9,
+ ".BaseNamespaceEnv": 1,
+ "paste": 3,
+ "source": 3,
+ "chdir": 1,
+ "envir": 5,
+ "cache_module": 1,
+ "exported_functions": 2,
+ "lsf.str": 2,
+ "list2env": 2,
+ "sapply": 2,
+ "get": 2,
+ "ops": 2,
+ "is_predefined": 2,
+ "%": 2,
+ "is_op": 2,
+ "prefix": 3,
+ "||": 1,
+ "grepl": 1,
+ "Filter": 1,
+ "op_env": 4,
+ "cache.": 1,
+ "@note": 1,
+ "Any": 1,
+ "references": 1,
+ "remain": 1,
+ "unchanged": 1,
+ "and": 5,
+ "files": 1,
+ "would": 1,
+ "have": 1,
+ "happened": 1,
+ "without": 1,
+ "unload": 2,
+ "should": 2,
+ "production": 1,
+ "code.": 1,
+ "does": 1,
+ "currently": 1,
+ "detach": 1,
+ "environments.": 1,
+ "Reload": 1,
+ "given": 1,
+ "Remove": 1,
+ "cache": 1,
+ "forcing": 1,
+ "reload.": 1,
+ "reloaded": 1,
+ "reference": 1,
+ "unloaded": 1,
+ "still": 1,
+ "work.": 1,
+ "Reloading": 1,
+ "primarily": 1,
+ "useful": 1,
+ "testing": 1,
+ "during": 1,
+ "module_ref": 3,
+ "rm": 1,
+ "list": 1,
+ ".loaded_modules": 1,
+ "whatnot.": 1,
+ "assign": 1,
+ "##polyg": 1,
+ "vector": 2,
+ "##numpoints": 1,
+ "number": 1,
+ "##output": 1,
+ "output": 1,
+ "##": 1,
+ "Example": 1,
+ "scripts": 1,
+ "group": 1,
+ "pts": 1,
+ "spsample": 1,
+ "polyg": 1,
+ "numpoints": 1,
+ "docType": 1,
+ "package": 5,
+ "scholar": 6,
+ "alias": 2,
+ "title": 1,
+ "reads": 1,
+ "url": 2,
+ "http": 2,
+ "//scholar.google.com": 1,
+ "Dates": 1,
+ "citation": 2,
+ "counts": 1,
+ "estimated": 1,
+ "determined": 1,
+ "automatically": 1,
+ "computer": 1,
+ "program.": 1,
+ "Use": 1,
+ "at": 2,
+ "your": 1,
+ "own": 1,
+ "risk.": 1,
+ "description": 1,
+ "provides": 1,
+ "functions": 3,
+ "extract": 1,
+ "Google": 2,
+ "Scholar.": 1,
+ "There": 1,
+ "also": 1,
+ "convenience": 1,
+ "comparing": 1,
+ "multiple": 1,
+ "scholars": 1,
+ "predicting": 1,
+ "index": 1,
+ "scores": 1,
+ "based": 1,
+ "past": 1,
+ "publication": 1,
+ "records.": 1,
+ "note": 1,
+ "A": 1,
+ "complementary": 1,
+ "Scholar": 1,
+ "found": 1,
+ "//biostat.jhsph.edu/": 1,
+ "jleek/code/googleCite.r": 1,
+ "was": 1,
+ "developed": 1,
+ "independently.": 1
},
"Racket": {
";": 3,
@@ -34659,3686 +58571,416 @@
"particular": 1,
"purpose.": 1
},
- "C++": {
- "class": 34,
- "Bar": 2,
- "{": 550,
- "protected": 4,
- "char": 122,
- "*name": 6,
- ";": 2290,
- "public": 27,
- "void": 150,
- "hello": 2,
- "(": 2422,
- ")": 2424,
- "}": 549,
- "#include": 106,
- "": 1,
- "": 1,
- "": 2,
- "static": 260,
- "Env": 13,
- "*env_instance": 1,
- "*": 159,
- "NULL": 108,
- "*Env": 1,
- "instance": 4,
- "if": 295,
- "env_instance": 3,
- "new": 9,
- "return": 147,
- "QObject": 2,
- "QCoreApplication": 1,
- "parse": 3,
- "const": 166,
- "**envp": 1,
- "**env": 1,
- "**": 2,
- "QString": 20,
- "envvar": 2,
- "name": 21,
- "value": 18,
- "int": 144,
- "indexOfEquals": 5,
- "for": 18,
- "env": 3,
- "envp": 4,
- "*env": 1,
- "+": 50,
- "envvar.indexOf": 1,
- "continue": 2,
- "envvar.left": 1,
- "envvar.mid": 1,
- "m_map.insert": 1,
- "QVariantMap": 3,
- "asVariantMap": 2,
- "m_map": 2,
- "#ifndef": 23,
- "ENV_H": 3,
- "#define": 190,
- "": 1,
- "Q_OBJECT": 1,
- "*instance": 1,
- "private": 12,
- "#endif": 82,
- "//": 238,
- "GDSDBREADER_H": 3,
- "": 1,
- "GDS_DIR": 1,
- "enum": 6,
- "level": 1,
- "LEVEL_ONE": 1,
- "LEVEL_TWO": 1,
- "LEVEL_THREE": 1,
- "dbDataStructure": 2,
- "label": 1,
- "quint32": 3,
- "depth": 1,
- "userIndex": 1,
- "QByteArray": 1,
- "data": 2,
- "This": 6,
- "is": 35,
- "COMPRESSED": 1,
- "optimize": 1,
- "ram": 1,
- "and": 14,
- "disk": 1,
- "space": 2,
- "decompressed": 1,
- "quint64": 1,
- "uniqueID": 1,
- "QVector": 2,
- "": 1,
- "nextItems": 1,
- "": 1,
- "nextItemsIndices": 1,
- "dbDataStructure*": 1,
- "father": 1,
- "fatherIndex": 1,
- "bool": 99,
- "noFatherRoot": 1,
- "Used": 1,
- "to": 75,
- "tell": 1,
- "this": 22,
- "node": 1,
- "the": 178,
- "root": 1,
- "so": 1,
- "hasn": 1,
- "t": 13,
- "in": 9,
- "argument": 1,
- "list": 2,
- "of": 48,
- "an": 3,
- "operator": 10,
- "overload.": 1,
- "A": 1,
- "friend": 10,
- "stream": 5,
- "<<": 18,
- "myclass.label": 2,
- "myclass.depth": 2,
- "myclass.userIndex": 2,
- "qCompress": 2,
- "myclass.data": 4,
- "myclass.uniqueID": 2,
- "myclass.nextItemsIndices": 2,
- "myclass.fatherIndex": 2,
- "myclass.noFatherRoot": 2,
- "myclass.fileName": 2,
- "myclass.firstLineData": 4,
- "myclass.linesNumbers": 2,
- "QDataStream": 2,
- "&": 146,
- "myclass": 1,
- "//Don": 1,
- "read": 1,
- "it": 2,
- "either": 1,
- "qUncompress": 2,
- "": 1,
- "using": 1,
- "namespace": 26,
- "std": 49,
- "main": 2,
- "cout": 1,
- "endl": 1,
- "": 1,
- "": 1,
- "": 1,
- "EC_KEY_regenerate_key": 1,
- "EC_KEY": 3,
- "*eckey": 2,
- "BIGNUM": 9,
- "*priv_key": 1,
- "ok": 3,
- "BN_CTX": 2,
- "*ctx": 2,
- "EC_POINT": 4,
- "*pub_key": 1,
- "eckey": 7,
- "EC_GROUP": 2,
- "*group": 2,
- "EC_KEY_get0_group": 2,
- "ctx": 26,
- "BN_CTX_new": 2,
- "goto": 156,
- "err": 26,
- "pub_key": 6,
- "EC_POINT_new": 4,
- "group": 12,
- "EC_POINT_mul": 3,
- "priv_key": 2,
- "EC_KEY_set_private_key": 1,
- "EC_KEY_set_public_key": 2,
- "EC_POINT_free": 4,
- "BN_CTX_free": 2,
- "ECDSA_SIG_recover_key_GFp": 3,
- "ECDSA_SIG": 3,
- "*ecsig": 1,
- "unsigned": 20,
- "*msg": 2,
- "msglen": 2,
- "recid": 3,
- "check": 2,
- "ret": 24,
- "*x": 1,
- "*e": 1,
- "*order": 1,
- "*sor": 1,
- "*eor": 1,
- "*field": 1,
- "*R": 1,
- "*O": 1,
- "*Q": 1,
- "*rr": 1,
- "*zero": 1,
- "n": 28,
- "i": 47,
- "/": 13,
- "-": 225,
- "BN_CTX_start": 1,
- "order": 8,
- "BN_CTX_get": 8,
- "EC_GROUP_get_order": 1,
- "x": 44,
- "BN_copy": 1,
- "BN_mul_word": 1,
- "BN_add": 1,
- "ecsig": 3,
- "r": 36,
- "field": 3,
- "EC_GROUP_get_curve_GFp": 1,
- "BN_cmp": 1,
- "R": 6,
- "EC_POINT_set_compressed_coordinates_GFp": 1,
- "%": 4,
- "O": 5,
- "EC_POINT_is_at_infinity": 1,
- "Q": 5,
- "EC_GROUP_get_degree": 1,
- "e": 14,
- "BN_bin2bn": 3,
- "msg": 1,
- "*msglen": 1,
- "BN_rshift": 1,
- "zero": 3,
- "BN_zero": 1,
- "BN_mod_sub": 1,
- "rr": 4,
- "BN_mod_inverse": 1,
- "sor": 3,
- "BN_mod_mul": 2,
- "s": 9,
- "eor": 3,
- "BN_CTX_end": 1,
- "CKey": 26,
- "SetCompressedPubKey": 4,
- "EC_KEY_set_conv_form": 1,
- "pkey": 14,
- "POINT_CONVERSION_COMPRESSED": 1,
- "fCompressedPubKey": 5,
- "true": 39,
- "Reset": 5,
- "false": 42,
- "EC_KEY_new_by_curve_name": 2,
- "NID_secp256k1": 2,
- "throw": 4,
- "key_error": 6,
- "fSet": 7,
- "b": 57,
- "EC_KEY_dup": 1,
- "b.pkey": 2,
- "b.fSet": 2,
- "EC_KEY_copy": 1,
- "hash": 20,
- "sizeof": 14,
- "vchSig": 18,
- "[": 201,
- "]": 201,
- "nSize": 2,
- "vchSig.clear": 2,
- "vchSig.resize": 2,
- "Shrink": 1,
- "fit": 1,
- "actual": 1,
- "size": 9,
- "SignCompact": 2,
- "uint256": 10,
- "vector": 14,
- "": 19,
- "fOk": 3,
- "*sig": 2,
- "ECDSA_do_sign": 1,
- "char*": 14,
- "sig": 11,
- "nBitsR": 3,
- "BN_num_bits": 2,
- "nBitsS": 3,
- "<": 53,
- "&&": 23,
- "nRecId": 4,
- "<4;>": 1,
- "keyRec": 5,
- "1": 2,
- "GetPubKey": 5,
- "break": 34,
- "BN_bn2bin": 2,
- "/8": 2,
- "ECDSA_SIG_free": 2,
- "SetCompactSignature": 2,
- "vchSig.size": 2,
- "nV": 6,
- "<27>": 1,
- "ECDSA_SIG_new": 1,
- "EC_KEY_free": 1,
- "Verify": 2,
- "ECDSA_verify": 1,
- "VerifyCompact": 2,
- "key": 23,
- "key.SetCompactSignature": 1,
- "key.GetPubKey": 1,
- "IsValid": 4,
- "fCompr": 3,
- "CSecret": 4,
- "secret": 2,
- "GetSecret": 2,
- "key2": 1,
- "key2.SetSecret": 1,
- "key2.GetPubKey": 1,
- "BITCOIN_KEY_H": 2,
- "": 1,
- "": 2,
- "": 1,
- "definition": 1,
- "runtime_error": 2,
- "explicit": 3,
- "string": 10,
- "str": 2,
- "CKeyID": 5,
- "uint160": 8,
- "CScriptID": 3,
- "CPubKey": 11,
- "vchPubKey": 6,
- "vchPubKeyIn": 2,
- "a": 84,
- "a.vchPubKey": 3,
- "b.vchPubKey": 3,
- "IMPLEMENT_SERIALIZE": 1,
- "READWRITE": 1,
- "GetID": 1,
- "Hash160": 1,
- "GetHash": 1,
- "Hash": 1,
- "vchPubKey.begin": 1,
- "vchPubKey.end": 1,
- "vchPubKey.size": 3,
- "||": 17,
- "IsCompressed": 2,
- "Raw": 1,
- "typedef": 38,
- "secure_allocator": 2,
- "CPrivKey": 3,
- "EC_KEY*": 1,
- "IsNull": 1,
- "MakeNewKey": 1,
- "fCompressed": 3,
- "SetPrivKey": 1,
- "vchPrivKey": 1,
- "SetSecret": 1,
- "vchSecret": 1,
- "GetPrivKey": 1,
- "SetPubKey": 1,
- "Sign": 1,
- "#ifdef": 16,
- "Q_OS_LINUX": 2,
- "": 1,
- "#if": 44,
- "QT_VERSION": 1,
- "QT_VERSION_CHECK": 1,
- "#error": 9,
- "Something": 1,
- "wrong": 1,
- "with": 6,
- "setup.": 1,
- "Please": 3,
- "report": 2,
- "mailing": 1,
- "argc": 2,
- "char**": 2,
- "argv": 2,
- "google_breakpad": 1,
- "ExceptionHandler": 1,
- "eh": 1,
- "Utils": 4,
- "exceptionHandler": 2,
- "qInstallMsgHandler": 1,
- "messageHandler": 2,
- "QApplication": 1,
- "app": 1,
- "STATIC_BUILD": 1,
- "Q_INIT_RESOURCE": 2,
- "WebKit": 1,
- "InspectorBackendStub": 1,
- "app.setWindowIcon": 1,
- "QIcon": 1,
- "app.setApplicationName": 1,
- "app.setOrganizationName": 1,
- "app.setOrganizationDomain": 1,
- "app.setApplicationVersion": 1,
- "PHANTOMJS_VERSION_STRING": 1,
- "Phantom": 1,
- "phantom": 1,
- "phantom.execute": 1,
- "app.exec": 1,
- "phantom.returnValue": 1,
- "INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION": 1,
- "": 1,
- "": 2,
- "": 1,
- "": 1,
- "": 1,
- "": 1,
- "": 1,
- "": 1,
- "": 1,
- "persons": 4,
- "google": 72,
- "protobuf": 72,
- "Descriptor*": 3,
- "Person_descriptor_": 6,
- "internal": 46,
- "GeneratedMessageReflection*": 1,
- "Person_reflection_": 4,
- "protobuf_AssignDesc_protocol_2dbuffer_2eproto": 4,
- "protobuf_AddDesc_protocol_2dbuffer_2eproto": 6,
- "FileDescriptor*": 1,
- "file": 6,
- "DescriptorPool": 3,
- "generated_pool": 2,
- "FindFileByName": 1,
- "GOOGLE_CHECK": 1,
- "message_type": 1,
- "Person_offsets_": 2,
- "GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET": 3,
- "Person": 65,
- "name_": 30,
- "GeneratedMessageReflection": 1,
- "default_instance_": 8,
- "_has_bits_": 14,
- "_unknown_fields_": 5,
- "MessageFactory": 3,
- "generated_factory": 1,
- "GOOGLE_PROTOBUF_DECLARE_ONCE": 1,
- "protobuf_AssignDescriptors_once_": 2,
- "inline": 39,
- "protobuf_AssignDescriptorsOnce": 4,
- "GoogleOnceInit": 1,
- "protobuf_RegisterTypes": 2,
- "InternalRegisterGeneratedMessage": 1,
- "default_instance": 3,
- "protobuf_ShutdownFile_protocol_2dbuffer_2eproto": 4,
- "delete": 6,
- "already_here": 3,
- "GOOGLE_PROTOBUF_VERIFY_VERSION": 1,
- "InternalAddGeneratedFile": 1,
- "InternalRegisterGeneratedFile": 1,
- "InitAsDefaultInstance": 3,
- "OnShutdown": 1,
- "struct": 8,
- "StaticDescriptorInitializer_protocol_2dbuffer_2eproto": 2,
- "static_descriptor_initializer_protocol_2dbuffer_2eproto_": 1,
- "_MSC_VER": 3,
- "kNameFieldNumber": 2,
- "Message": 7,
- "SharedCtor": 4,
- "from": 25,
- "MergeFrom": 9,
- "_cached_size_": 7,
- "const_cast": 3,
- "string*": 11,
- "kEmptyString": 12,
- "memset": 2,
- "SharedDtor": 3,
- "SetCachedSize": 2,
- "GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN": 2,
- "GOOGLE_SAFE_CONCURRENT_WRITES_END": 2,
- "descriptor": 2,
- "*default_instance_": 1,
- "Person*": 7,
- "New": 4,
- "Clear": 5,
- "xffu": 3,
- "has_name": 6,
- "clear": 2,
- "mutable_unknown_fields": 4,
- "MergePartialFromCodedStream": 2,
- "io": 4,
- "CodedInputStream*": 2,
- "input": 6,
- "DO_": 4,
- "EXPRESSION": 2,
- "uint32": 2,
- "tag": 6,
- "while": 11,
- "ReadTag": 1,
- "switch": 3,
- "WireFormatLite": 9,
- "GetTagFieldNumber": 1,
- "case": 33,
- "GetTagWireType": 2,
- "WIRETYPE_LENGTH_DELIMITED": 1,
- "ReadString": 1,
- "mutable_name": 3,
- "WireFormat": 10,
- "VerifyUTF8String": 3,
- ".data": 3,
- ".length": 3,
- "PARSE": 1,
- "else": 46,
- "handle_uninterpreted": 2,
- "ExpectAtEnd": 1,
- "default": 4,
- "WIRETYPE_END_GROUP": 1,
- "SkipField": 1,
- "#undef": 3,
- "SerializeWithCachedSizes": 2,
- "CodedOutputStream*": 2,
- "output": 5,
- "SERIALIZE": 2,
- "WriteString": 1,
- "unknown_fields": 7,
- ".empty": 3,
- "SerializeUnknownFields": 1,
- "uint8*": 4,
- "SerializeWithCachedSizesToArray": 2,
- "target": 6,
- "WriteStringToArray": 1,
- "SerializeUnknownFieldsToArray": 1,
- "ByteSize": 2,
- "total_size": 5,
- "StringSize": 1,
- "ComputeUnknownFieldsSize": 1,
- "GOOGLE_CHECK_NE": 2,
- "source": 9,
- "dynamic_cast_if_available": 1,
- "": 12,
- "ReflectionOps": 1,
- "Merge": 1,
- "from._has_bits_": 1,
- "from.has_name": 1,
- "set_name": 7,
- "from.name": 1,
- "from.unknown_fields": 1,
- "CopyFrom": 5,
- "IsInitialized": 3,
- "Swap": 2,
- "other": 7,
- "swap": 3,
- "_unknown_fields_.Swap": 1,
- "Metadata": 3,
- "GetMetadata": 2,
- "metadata": 2,
- "metadata.descriptor": 1,
- "metadata.reflection": 1,
- "PROTOBUF_protocol_2dbuffer_2eproto__INCLUDED": 3,
- "": 1,
- "GOOGLE_PROTOBUF_VERSION": 1,
- "was": 3,
- "generated": 2,
- "by": 5,
- "newer": 2,
- "version": 4,
- "protoc": 2,
- "which": 2,
- "incompatible": 2,
- "your": 3,
- "Protocol": 2,
- "Buffer": 2,
- "headers.": 3,
- "update": 1,
- "GOOGLE_PROTOBUF_MIN_PROTOC_VERSION": 1,
- "older": 1,
- "regenerate": 1,
- "protoc.": 1,
- "": 1,
- "": 1,
- "": 1,
- "": 1,
- "": 1,
- "virtual": 10,
- "*this": 1,
- "UnknownFieldSet": 2,
- "UnknownFieldSet*": 1,
- "GetCachedSize": 1,
- "clear_name": 2,
- "size_t": 5,
- "release_name": 2,
- "set_allocated_name": 2,
- "set_has_name": 7,
- "clear_has_name": 5,
- "mutable": 1,
- "u": 9,
- "|": 8,
- "*name_": 1,
- "assign": 3,
- "reinterpret_cast": 7,
- "temp": 2,
- "SWIG": 2,
- "QSCICOMMAND_H": 2,
- "__APPLE__": 4,
- "extern": 4,
- "": 1,
- "": 2,
- "": 1,
- "QsciScintilla": 7,
- "brief": 2,
- "The": 8,
- "QsciCommand": 7,
- "represents": 1,
- "editor": 1,
- "command": 9,
- "that": 7,
- "may": 2,
- "have": 1,
- "one": 42,
- "or": 10,
- "two": 1,
- "keys": 3,
- "bound": 4,
- "it.": 2,
- "Methods": 1,
- "are": 3,
- "provided": 1,
- "change": 1,
- "remove": 1,
- "binding.": 1,
- "Each": 1,
- "has": 2,
- "user": 2,
- "friendly": 2,
- "description": 3,
- "use": 1,
- "mapping": 1,
- "dialogs.": 1,
- "QSCINTILLA_EXPORT": 2,
- "defines": 1,
- "different": 1,
- "commands": 1,
- "can": 3,
- "be": 9,
- "assigned": 1,
- "key.": 1,
- "Command": 4,
- "Move": 26,
- "down": 12,
- "line.": 33,
- "LineDown": 1,
- "QsciScintillaBase": 100,
- "SCI_LINEDOWN": 1,
- "Extend": 33,
- "selection": 39,
- "LineDownExtend": 1,
- "SCI_LINEDOWNEXTEND": 1,
- "rectangular": 9,
- "LineDownRectExtend": 1,
- "SCI_LINEDOWNRECTEXTEND": 1,
- "Scroll": 5,
- "view": 2,
- "LineScrollDown": 1,
- "SCI_LINESCROLLDOWN": 1,
- "up": 13,
- "LineUp": 1,
- "SCI_LINEUP": 1,
- "LineUpExtend": 1,
- "SCI_LINEUPEXTEND": 1,
- "LineUpRectExtend": 1,
- "SCI_LINEUPRECTEXTEND": 1,
- "LineScrollUp": 1,
- "SCI_LINESCROLLUP": 1,
- "start": 11,
- "document.": 8,
- "ScrollToStart": 1,
- "SCI_SCROLLTOSTART": 1,
- "end": 18,
- "ScrollToEnd": 1,
- "SCI_SCROLLTOEND": 1,
- "vertically": 1,
- "centre": 1,
- "current": 9,
- "VerticalCentreCaret": 1,
- "SCI_VERTICALCENTRECARET": 1,
- "paragraph.": 4,
- "ParaDown": 1,
- "SCI_PARADOWN": 1,
- "ParaDownExtend": 1,
- "SCI_PARADOWNEXTEND": 1,
- "ParaUp": 1,
- "SCI_PARAUP": 1,
- "ParaUpExtend": 1,
- "SCI_PARAUPEXTEND": 1,
- "left": 7,
- "character.": 9,
- "CharLeft": 1,
- "SCI_CHARLEFT": 1,
- "CharLeftExtend": 1,
- "SCI_CHARLEFTEXTEND": 1,
- "CharLeftRectExtend": 1,
- "SCI_CHARLEFTRECTEXTEND": 1,
- "right": 8,
- "CharRight": 1,
- "SCI_CHARRIGHT": 1,
- "CharRightExtend": 1,
- "SCI_CHARRIGHTEXTEND": 1,
- "CharRightRectExtend": 1,
- "SCI_CHARRIGHTRECTEXTEND": 1,
- "word.": 9,
- "WordLeft": 1,
- "SCI_WORDLEFT": 1,
- "WordLeftExtend": 1,
- "SCI_WORDLEFTEXTEND": 1,
- "WordRight": 1,
- "SCI_WORDRIGHT": 1,
- "WordRightExtend": 1,
- "SCI_WORDRIGHTEXTEND": 1,
- "previous": 5,
- "WordLeftEnd": 1,
- "SCI_WORDLEFTEND": 1,
- "WordLeftEndExtend": 1,
- "SCI_WORDLEFTENDEXTEND": 1,
- "next": 6,
- "WordRightEnd": 1,
- "SCI_WORDRIGHTEND": 1,
- "WordRightEndExtend": 1,
- "SCI_WORDRIGHTENDEXTEND": 1,
- "word": 6,
- "part.": 4,
- "WordPartLeft": 1,
- "SCI_WORDPARTLEFT": 1,
- "WordPartLeftExtend": 1,
- "SCI_WORDPARTLEFTEXTEND": 1,
- "WordPartRight": 1,
- "SCI_WORDPARTRIGHT": 1,
- "WordPartRightExtend": 1,
- "SCI_WORDPARTRIGHTEXTEND": 1,
- "document": 16,
- "Home": 1,
- "SCI_HOME": 1,
- "HomeExtend": 1,
- "SCI_HOMEEXTEND": 1,
- "HomeRectExtend": 1,
- "SCI_HOMERECTEXTEND": 1,
- "displayed": 10,
- "HomeDisplay": 1,
- "SCI_HOMEDISPLAY": 1,
- "HomeDisplayExtend": 1,
- "SCI_HOMEDISPLAYEXTEND": 1,
- "HomeWrap": 1,
- "SCI_HOMEWRAP": 1,
- "HomeWrapExtend": 1,
- "SCI_HOMEWRAPEXTEND": 1,
- "first": 8,
- "visible": 6,
- "character": 8,
- "VCHome": 1,
- "SCI_VCHOME": 1,
- "VCHomeExtend": 1,
- "SCI_VCHOMEEXTEND": 1,
- "VCHomeRectExtend": 1,
- "SCI_VCHOMERECTEXTEND": 1,
- "VCHomeWrap": 1,
- "SCI_VCHOMEWRAP": 1,
- "VCHomeWrapExtend": 1,
- "SCI_VCHOMEWRAPEXTEND": 1,
- "LineEnd": 1,
- "SCI_LINEEND": 1,
- "LineEndExtend": 1,
- "SCI_LINEENDEXTEND": 1,
- "LineEndRectExtend": 1,
- "SCI_LINEENDRECTEXTEND": 1,
- "LineEndDisplay": 1,
- "SCI_LINEENDDISPLAY": 1,
- "LineEndDisplayExtend": 1,
- "SCI_LINEENDDISPLAYEXTEND": 1,
- "LineEndWrap": 1,
- "SCI_LINEENDWRAP": 1,
- "LineEndWrapExtend": 1,
- "SCI_LINEENDWRAPEXTEND": 1,
- "DocumentStart": 1,
- "SCI_DOCUMENTSTART": 1,
- "DocumentStartExtend": 1,
- "SCI_DOCUMENTSTARTEXTEND": 1,
- "DocumentEnd": 1,
- "SCI_DOCUMENTEND": 1,
- "DocumentEndExtend": 1,
- "SCI_DOCUMENTENDEXTEND": 1,
- "page.": 13,
- "PageUp": 1,
- "SCI_PAGEUP": 1,
- "PageUpExtend": 1,
- "SCI_PAGEUPEXTEND": 1,
- "PageUpRectExtend": 1,
- "SCI_PAGEUPRECTEXTEND": 1,
- "PageDown": 1,
- "SCI_PAGEDOWN": 1,
- "PageDownExtend": 1,
- "SCI_PAGEDOWNEXTEND": 1,
- "PageDownRectExtend": 1,
- "SCI_PAGEDOWNRECTEXTEND": 1,
- "Stuttered": 4,
- "move": 2,
- "StutteredPageUp": 1,
- "SCI_STUTTEREDPAGEUP": 1,
- "extend": 2,
- "StutteredPageUpExtend": 1,
- "SCI_STUTTEREDPAGEUPEXTEND": 1,
- "StutteredPageDown": 1,
- "SCI_STUTTEREDPAGEDOWN": 1,
- "StutteredPageDownExtend": 1,
- "SCI_STUTTEREDPAGEDOWNEXTEND": 1,
- "Delete": 10,
- "SCI_CLEAR": 1,
- "DeleteBack": 1,
- "SCI_DELETEBACK": 1,
- "not": 1,
- "at": 4,
- "DeleteBackNotLine": 1,
- "SCI_DELETEBACKNOTLINE": 1,
- "left.": 2,
- "DeleteWordLeft": 1,
- "SCI_DELWORDLEFT": 1,
- "right.": 2,
- "DeleteWordRight": 1,
- "SCI_DELWORDRIGHT": 1,
- "DeleteWordRightEnd": 1,
- "SCI_DELWORDRIGHTEND": 1,
- "line": 10,
- "DeleteLineLeft": 1,
- "SCI_DELLINELEFT": 1,
- "DeleteLineRight": 1,
- "SCI_DELLINERIGHT": 1,
- "LineDelete": 1,
- "SCI_LINEDELETE": 1,
- "Cut": 2,
- "clipboard.": 5,
- "LineCut": 1,
- "SCI_LINECUT": 1,
- "Copy": 2,
- "LineCopy": 1,
- "SCI_LINECOPY": 1,
- "Transpose": 1,
- "lines.": 1,
- "LineTranspose": 1,
- "SCI_LINETRANSPOSE": 1,
- "Duplicate": 2,
- "LineDuplicate": 1,
- "SCI_LINEDUPLICATE": 1,
- "Select": 33,
- "whole": 2,
- "SelectAll": 1,
- "SCI_SELECTALL": 1,
- "selected": 2,
- "lines": 3,
- "MoveSelectedLinesUp": 1,
- "SCI_MOVESELECTEDLINESUP": 1,
- "MoveSelectedLinesDown": 1,
- "SCI_MOVESELECTEDLINESDOWN": 1,
- "selection.": 1,
- "SelectionDuplicate": 1,
- "SCI_SELECTIONDUPLICATE": 1,
- "Convert": 2,
- "lower": 1,
- "case.": 2,
- "SelectionLowerCase": 1,
- "SCI_LOWERCASE": 1,
- "upper": 1,
- "SelectionUpperCase": 1,
- "SCI_UPPERCASE": 1,
- "SelectionCut": 1,
- "SCI_CUT": 1,
- "SelectionCopy": 1,
- "SCI_COPY": 1,
- "Paste": 2,
- "SCI_PASTE": 1,
- "Toggle": 1,
- "insert/overtype.": 1,
- "EditToggleOvertype": 1,
- "SCI_EDITTOGGLEOVERTYPE": 1,
- "Insert": 2,
- "platform": 1,
- "dependent": 1,
- "newline.": 1,
- "Newline": 1,
- "SCI_NEWLINE": 1,
- "formfeed.": 1,
- "Formfeed": 1,
- "SCI_FORMFEED": 1,
- "Indent": 1,
- "level.": 2,
- "Tab": 1,
- "SCI_TAB": 1,
- "De": 1,
- "indent": 1,
- "Backtab": 1,
- "SCI_BACKTAB": 1,
- "Cancel": 2,
- "any": 5,
- "operation.": 1,
- "SCI_CANCEL": 1,
- "Undo": 2,
- "last": 4,
- "command.": 5,
- "SCI_UNDO": 1,
- "Redo": 2,
- "SCI_REDO": 1,
- "Zoom": 2,
- "in.": 1,
- "ZoomIn": 1,
- "SCI_ZOOMIN": 1,
- "out.": 1,
- "ZoomOut": 1,
- "SCI_ZOOMOUT": 1,
- "Return": 3,
- "will": 2,
- "executed": 1,
- "instance.": 2,
- "scicmd": 2,
- "Execute": 1,
- "execute": 1,
- "Binds": 2,
- "If": 4,
- "then": 6,
- "binding": 3,
- "removed.": 2,
- "invalid": 5,
- "unchanged.": 1,
- "Valid": 1,
- "control": 1,
- "c": 50,
- "Key_Down": 1,
- "Key_Up": 1,
- "Key_Left": 1,
- "Key_Right": 1,
- "Key_Home": 1,
- "Key_End": 1,
- "Key_PageUp": 1,
- "Key_PageDown": 1,
- "Key_Delete": 1,
- "Key_Insert": 1,
- "Key_Escape": 1,
- "Key_Backspace": 1,
- "Key_Tab": 1,
- "Key_Return.": 1,
- "Keys": 1,
- "modified": 2,
- "combination": 1,
- "SHIFT": 1,
- "CTRL": 1,
- "ALT": 1,
- "META.": 1,
- "sa": 8,
- "setAlternateKey": 3,
- "validKey": 3,
- "setKey": 3,
- "alternate": 3,
- "altkey": 3,
- "alternateKey": 3,
- "currently": 2,
- "returned.": 4,
- "qkey": 2,
- "qaltkey": 2,
- "valid": 2,
- "QsciCommandSet": 1,
- "*qs": 1,
- "cmd": 1,
- "*desc": 1,
- "bindKey": 1,
- "qk": 1,
- "scik": 1,
- "*qsCmd": 1,
- "scikey": 1,
- "scialtkey": 1,
- "*descCmd": 1,
- "QSCIPRINTER_H": 2,
- "": 1,
- "": 1,
- "QT_BEGIN_NAMESPACE": 1,
- "QRect": 2,
- "QPainter": 2,
- "QT_END_NAMESPACE": 1,
- "QsciPrinter": 9,
- "sub": 2,
- "Qt": 1,
- "QPrinter": 3,
- "able": 1,
- "print": 4,
- "text": 5,
- "Scintilla": 2,
- "further": 1,
- "classed": 1,
- "alter": 1,
- "layout": 1,
- "adding": 2,
- "headers": 3,
- "footers": 2,
- "example.": 1,
- "Constructs": 1,
- "printer": 1,
- "paint": 1,
- "device": 1,
- "mode": 4,
- "mode.": 1,
- "PrinterMode": 1,
- "ScreenResolution": 1,
- "Destroys": 1,
- "Format": 1,
- "page": 4,
- "example": 1,
- "before": 1,
- "drawn": 2,
- "on": 1,
- "painter": 4,
- "used": 4,
- "add": 3,
- "customised": 2,
- "graphics.": 2,
- "drawing": 4,
- "actually": 1,
- "being": 2,
- "rather": 1,
- "than": 1,
- "sized.": 1,
- "methods": 1,
- "must": 1,
- "only": 1,
- "called": 1,
- "when": 5,
- "true.": 1,
- "area": 5,
- "draw": 1,
- "text.": 3,
- "should": 1,
- "necessary": 1,
- "reserve": 1,
- "By": 1,
- "relative": 1,
- "printable": 1,
- "Use": 1,
- "setFullPage": 1,
- "because": 2,
- "calling": 1,
- "printRange": 2,
- "you": 1,
- "want": 2,
- "try": 1,
- "over": 1,
- "pagenr": 2,
- "number": 3,
- "numbered": 1,
- "formatPage": 1,
- "points": 2,
- "each": 2,
- "font": 2,
- "printing.": 2,
- "setMagnification": 2,
- "magnification": 3,
- "mag": 2,
- "Sets": 2,
- "printing": 2,
- "magnification.": 1,
- "Print": 1,
- "range": 1,
- "qsb.": 1,
- "negative": 2,
- "signifies": 2,
- "returned": 2,
- "there": 1,
- "no": 1,
- "error.": 1,
- "*qsb": 1,
- "wrap": 4,
- "WrapWord.": 1,
- "setWrapMode": 2,
- "WrapMode": 3,
- "wrapMode": 2,
- "wmode.": 1,
- "wmode": 1,
- "v8": 9,
- "Scanner": 16,
- "UnicodeCache*": 4,
- "unicode_cache": 3,
- "unicode_cache_": 10,
- "octal_pos_": 5,
- "Location": 14,
- "harmony_scoping_": 4,
- "harmony_modules_": 4,
- "Initialize": 4,
- "Utf16CharacterStream*": 3,
- "source_": 7,
- "Init": 3,
- "has_line_terminator_before_next_": 9,
- "SkipWhiteSpace": 4,
- "Scan": 5,
- "uc32": 19,
- "ScanHexNumber": 2,
- "expected_length": 4,
- "ASSERT": 17,
- "prevent": 1,
- "overflow": 1,
- "digits": 3,
- "c0_": 64,
- "d": 8,
- "HexValue": 2,
- "j": 4,
- "PushBack": 8,
- "Advance": 44,
- "STATIC_ASSERT": 5,
- "Token": 212,
- "NUM_TOKENS": 1,
- "byte": 1,
- "one_char_tokens": 2,
- "ILLEGAL": 120,
- "LPAREN": 2,
- "RPAREN": 2,
- "COMMA": 2,
- "COLON": 2,
- "SEMICOLON": 2,
- "CONDITIONAL": 2,
- "f": 5,
- "LBRACK": 2,
- "RBRACK": 2,
- "LBRACE": 2,
- "RBRACE": 2,
- "BIT_NOT": 2,
- "Value": 23,
- "Next": 3,
- "current_": 2,
- "next_": 2,
- "has_multiline_comment_before_next_": 5,
- "static_cast": 7,
- "token": 64,
- "": 1,
- "pos": 12,
- "source_pos": 10,
- "next_.token": 3,
- "next_.location.beg_pos": 3,
- "next_.location.end_pos": 4,
- "current_.token": 4,
- "IsByteOrderMark": 2,
- "xFEFF": 1,
- "xFFFE": 1,
- "start_position": 2,
- "IsWhiteSpace": 2,
- "IsLineTerminator": 6,
- "SkipSingleLineComment": 6,
- "undo": 4,
- "WHITESPACE": 6,
- "SkipMultiLineComment": 3,
- "ch": 5,
- "ScanHtmlComment": 3,
- "LT": 2,
- "next_.literal_chars": 13,
- "do": 4,
- "ScanString": 3,
- "LTE": 1,
- "ASSIGN_SHL": 1,
- "SHL": 1,
- "GTE": 1,
- "ASSIGN_SAR": 1,
- "ASSIGN_SHR": 1,
- "SHR": 1,
- "SAR": 1,
- "GT": 1,
- "EQ_STRICT": 1,
- "EQ": 1,
- "ASSIGN": 1,
- "NE_STRICT": 1,
- "NE": 1,
- "NOT": 1,
- "INC": 1,
- "ASSIGN_ADD": 1,
- "ADD": 1,
- "DEC": 1,
- "ASSIGN_SUB": 1,
- "SUB": 1,
- "ASSIGN_MUL": 1,
- "MUL": 1,
- "ASSIGN_MOD": 1,
- "MOD": 1,
- "ASSIGN_DIV": 1,
- "DIV": 1,
- "AND": 1,
- "ASSIGN_BIT_AND": 1,
- "BIT_AND": 1,
- "OR": 1,
- "ASSIGN_BIT_OR": 1,
- "BIT_OR": 1,
- "ASSIGN_BIT_XOR": 1,
- "BIT_XOR": 1,
- "IsDecimalDigit": 2,
- "ScanNumber": 3,
- "PERIOD": 1,
- "IsIdentifierStart": 2,
- "ScanIdentifierOrKeyword": 2,
- "EOS": 1,
- "SeekForward": 4,
- "current_pos": 4,
- "ASSERT_EQ": 1,
- "ScanEscape": 2,
- "IsCarriageReturn": 2,
- "IsLineFeed": 2,
- "fall": 2,
- "through": 2,
- "v": 3,
- "xx": 1,
- "xxx": 1,
- "error": 1,
- "immediately": 1,
- "octal": 1,
- "escape": 1,
- "quote": 3,
- "consume": 2,
- "LiteralScope": 4,
- "literal": 2,
- ".": 2,
- "X": 2,
- "E": 3,
- "l": 1,
- "p": 5,
- "w": 1,
- "y": 13,
- "keyword": 1,
- "Unescaped": 1,
- "in_character_class": 2,
- "AddLiteralCharAdvance": 3,
- "literal.Complete": 2,
- "ScanLiteralUnicodeEscape": 3,
- "V8_SCANNER_H_": 3,
- "ParsingFlags": 1,
- "kNoParsingFlags": 1,
- "kLanguageModeMask": 4,
- "kAllowLazy": 1,
- "kAllowNativesSyntax": 1,
- "kAllowModules": 1,
- "CLASSIC_MODE": 2,
- "STRICT_MODE": 2,
- "EXTENDED_MODE": 2,
- "detect": 1,
- "x16": 1,
- "x36.": 1,
- "Utf16CharacterStream": 3,
- "pos_": 6,
- "buffer_cursor_": 5,
- "buffer_end_": 3,
- "ReadBlock": 2,
- "": 1,
- "kEndOfInput": 2,
- "code_unit_count": 7,
- "buffered_chars": 2,
- "SlowSeekForward": 2,
- "int32_t": 1,
- "code_unit": 6,
- "uc16*": 3,
- "UnicodeCache": 3,
- "unibrow": 11,
- "Utf8InputBuffer": 2,
- "<1024>": 2,
- "Utf8Decoder": 2,
- "StaticResource": 2,
- "": 2,
- "utf8_decoder": 1,
- "utf8_decoder_": 2,
- "uchar": 4,
- "kIsIdentifierStart.get": 1,
- "IsIdentifierPart": 1,
- "kIsIdentifierPart.get": 1,
- "kIsLineTerminator.get": 1,
- "kIsWhiteSpace.get": 1,
- "Predicate": 4,
- "": 1,
- "128": 4,
- "kIsIdentifierStart": 1,
- "": 1,
- "kIsIdentifierPart": 1,
- "": 1,
- "kIsLineTerminator": 1,
- "": 1,
- "kIsWhiteSpace": 1,
- "DISALLOW_COPY_AND_ASSIGN": 2,
- "LiteralBuffer": 6,
- "is_ascii_": 10,
- "position_": 17,
- "backing_store_": 7,
- "backing_store_.length": 4,
- "backing_store_.Dispose": 3,
- "INLINE": 2,
- "AddChar": 2,
- "uint32_t": 8,
- "ExpandBuffer": 2,
- "kMaxAsciiCharCodeU": 1,
- "": 6,
- "kASCIISize": 1,
- "ConvertToUtf16": 2,
- "*reinterpret_cast": 1,
- "": 2,
- "kUC16Size": 2,
- "is_ascii": 3,
- "Vector": 13,
- "uc16": 5,
- "utf16_literal": 3,
- "backing_store_.start": 5,
- "ascii_literal": 3,
- "length": 8,
- "kInitialCapacity": 2,
- "kGrowthFactory": 2,
- "kMinConversionSlack": 1,
- "kMaxGrowth": 2,
- "MB": 1,
- "NewCapacity": 3,
- "min_capacity": 2,
- "capacity": 3,
- "Max": 1,
- "new_capacity": 2,
- "Min": 1,
- "new_store": 6,
- "memcpy": 1,
- "new_store.start": 3,
- "new_content_size": 4,
- "src": 2,
- "": 1,
- "dst": 2,
- "Scanner*": 2,
- "self": 5,
- "scanner_": 5,
- "complete_": 4,
- "StartLiteral": 2,
- "DropLiteral": 2,
- "Complete": 1,
- "TerminateLiteral": 2,
- "beg_pos": 5,
- "end_pos": 4,
- "kNoOctalLocation": 1,
- "scanner_contants": 1,
- "current_token": 1,
- "location": 4,
- "current_.location": 2,
- "literal_ascii_string": 1,
- "ASSERT_NOT_NULL": 9,
- "current_.literal_chars": 11,
- "literal_utf16_string": 1,
- "is_literal_ascii": 1,
- "literal_length": 1,
- "literal_contains_escapes": 1,
- "source_length": 3,
- "location.end_pos": 1,
- "location.beg_pos": 1,
- "STRING": 1,
- "peek": 1,
- "peek_location": 1,
- "next_.location": 1,
- "next_literal_ascii_string": 1,
- "next_literal_utf16_string": 1,
- "is_next_literal_ascii": 1,
- "next_literal_length": 1,
- "kCharacterLookaheadBufferSize": 3,
- "ScanOctalEscape": 1,
- "octal_position": 1,
- "clear_octal_position": 1,
- "HarmonyScoping": 1,
- "SetHarmonyScoping": 1,
- "scoping": 2,
- "HarmonyModules": 1,
- "SetHarmonyModules": 1,
- "modules": 2,
- "HasAnyLineTerminatorBeforeNext": 1,
- "ScanRegExpPattern": 1,
- "seen_equal": 1,
- "ScanRegExpFlags": 1,
- "IsIdentifier": 1,
- "CharacterStream*": 1,
- "buffer": 1,
- "TokenDesc": 3,
- "LiteralBuffer*": 2,
- "literal_chars": 1,
- "free_buffer": 3,
- "literal_buffer1_": 3,
- "literal_buffer2_": 2,
- "AddLiteralChar": 2,
- "tok": 2,
- "else_": 2,
- "ScanDecimalDigits": 1,
- "seen_period": 1,
- "ScanIdentifierSuffix": 1,
- "LiteralScope*": 1,
- "ScanIdentifierUnicodeEscape": 1,
- "desc": 2,
- "as": 1,
- "look": 1,
- "ahead": 1,
- "UTILS_H": 3,
- "": 1,
- "": 1,
- "": 1,
- "QTemporaryFile": 1,
- "showUsage": 1,
- "QtMsgType": 1,
- "type": 6,
- "dump_path": 1,
- "minidump_id": 1,
- "void*": 1,
- "context": 8,
- "succeeded": 1,
- "QVariant": 1,
- "coffee2js": 1,
- "script": 1,
- "injectJsInFrame": 2,
- "jsFilePath": 5,
- "libraryPath": 5,
- "QWebFrame": 4,
- "*targetFrame": 4,
- "startingScript": 2,
- "Encoding": 3,
- "jsFileEnc": 2,
- "readResourceFileUtf8": 1,
- "resourceFilePath": 1,
- "loadJSForDebug": 2,
- "autorun": 2,
- "cleanupFromDebug": 1,
- "findScript": 1,
- "jsFromScriptFile": 1,
- "scriptPath": 1,
- "enc": 1,
- "shouldn": 1,
- "instantiated": 1,
- "QTemporaryFile*": 2,
- "m_tempHarness": 1,
- "We": 1,
- "make": 1,
- "sure": 1,
- "clean": 1,
- "after": 1,
- "ourselves": 1,
- "m_tempWrapper": 1,
- "V8_DECLARE_ONCE": 1,
- "init_once": 2,
- "V8": 21,
- "is_running_": 6,
- "has_been_set_up_": 4,
- "has_been_disposed_": 6,
- "has_fatal_error_": 5,
- "use_crankshaft_": 6,
- "List": 3,
- "": 3,
- "call_completed_callbacks_": 16,
- "LazyMutex": 1,
- "entropy_mutex": 1,
- "LAZY_MUTEX_INITIALIZER": 1,
- "EntropySource": 3,
- "entropy_source": 4,
- "Deserializer*": 2,
- "des": 3,
- "FlagList": 1,
- "EnforceFlagImplications": 1,
- "InitializeOncePerProcess": 4,
- "Isolate": 9,
- "CurrentPerIsolateThreadData": 4,
- "EnterDefaultIsolate": 1,
- "thread_id": 1,
- ".Equals": 1,
- "ThreadId": 1,
- "Current": 5,
- "isolate": 15,
- "IsDead": 2,
- "Isolate*": 6,
- "SetFatalError": 2,
- "TearDown": 5,
- "IsDefaultIsolate": 1,
- "ElementsAccessor": 2,
- "LOperand": 2,
- "TearDownCaches": 1,
- "RegisteredExtension": 1,
- "UnregisterAll": 1,
- "OS": 3,
- "seed_random": 2,
- "uint32_t*": 2,
- "state": 15,
- "FLAG_random_seed": 2,
- "val": 3,
- "ScopedLock": 1,
- "lock": 1,
- "entropy_mutex.Pointer": 1,
- "random": 1,
- "random_base": 3,
- "xFFFF": 2,
- "FFFF": 1,
- "SetEntropySource": 2,
- "SetReturnAddressLocationResolver": 3,
- "ReturnAddressLocationResolver": 2,
- "resolver": 3,
- "StackFrame": 1,
- "Random": 3,
- "Context*": 4,
- "IsGlobalContext": 1,
- "ByteArray*": 1,
- "seed": 2,
- "random_seed": 1,
- "": 1,
- "GetDataStartAddress": 1,
- "RandomPrivate": 2,
- "private_random_seed": 1,
- "IdleNotification": 3,
- "hint": 3,
- "FLAG_use_idle_notification": 1,
- "HEAP": 1,
- "AddCallCompletedCallback": 2,
- "CallCompletedCallback": 4,
- "callback": 7,
- "Lazy": 1,
- "init.": 1,
- "Add": 1,
- "RemoveCallCompletedCallback": 2,
- "Remove": 1,
- "FireCallCompletedCallback": 2,
- "HandleScopeImplementer*": 1,
- "handle_scope_implementer": 5,
- "CallDepthIsZero": 1,
- "IncrementCallDepth": 1,
- "DecrementCallDepth": 1,
- "union": 1,
- "double": 23,
- "double_value": 1,
- "uint64_t": 2,
- "uint64_t_value": 1,
- "double_int_union": 2,
- "Object*": 4,
- "FillHeapNumberWithRandom": 2,
- "heap_number": 4,
- "random_bits": 2,
- "binary_million": 3,
- "r.double_value": 3,
- "r.uint64_t_value": 1,
- "HeapNumber": 1,
- "cast": 1,
- "set_value": 1,
- "InitializeOncePerProcessImpl": 3,
- "SetUp": 4,
- "FLAG_crankshaft": 1,
- "Serializer": 1,
- "enabled": 1,
- "CPU": 2,
- "SupportsCrankshaft": 1,
- "PostSetUp": 1,
- "RuntimeProfiler": 1,
- "GlobalSetUp": 1,
- "FLAG_stress_compaction": 1,
- "FLAG_force_marking_deque_overflows": 1,
- "FLAG_gc_global": 1,
- "FLAG_max_new_space_size": 1,
- "kPageSizeBits": 1,
- "SetUpCaches": 1,
- "SetUpJSCallerSavedCodeData": 1,
- "SamplerRegistry": 1,
- "ExternalReference": 1,
- "CallOnce": 1,
- "V8_V8_H_": 3,
- "defined": 21,
- "GOOGLE3": 2,
- "DEBUG": 3,
- "NDEBUG": 4,
- "both": 1,
- "set": 1,
- "Deserializer": 1,
- "AllStatic": 1,
- "IsRunning": 1,
- "UseCrankshaft": 1,
- "FatalProcessOutOfMemory": 1,
- "take_snapshot": 1,
- "NilValue": 1,
- "kNullValue": 1,
- "kUndefinedValue": 1,
- "EqualityKind": 1,
- "kStrictEquality": 1,
- "kNonStrictEquality": 1,
- "PY_SSIZE_T_CLEAN": 1,
- "Py_PYTHON_H": 1,
- "Python": 1,
- "needed": 1,
- "compile": 1,
- "C": 1,
- "extensions": 1,
- "please": 1,
- "install": 1,
- "development": 1,
- "Python.": 1,
- "#else": 24,
- "": 1,
- "offsetof": 2,
- "member": 2,
- "type*": 1,
- "WIN32": 2,
- "MS_WINDOWS": 2,
- "__stdcall": 2,
- "__cdecl": 2,
- "__fastcall": 2,
- "DL_IMPORT": 2,
- "DL_EXPORT": 2,
- "PY_LONG_LONG": 5,
- "LONG_LONG": 1,
- "PY_VERSION_HEX": 9,
- "METH_COEXIST": 1,
- "PyDict_CheckExact": 1,
- "op": 6,
- "Py_TYPE": 4,
- "PyDict_Type": 1,
- "PyDict_Contains": 1,
- "o": 20,
- "PySequence_Contains": 1,
- "Py_ssize_t": 17,
- "PY_SSIZE_T_MAX": 1,
- "INT_MAX": 1,
- "PY_SSIZE_T_MIN": 1,
- "INT_MIN": 1,
- "PY_FORMAT_SIZE_T": 1,
- "PyInt_FromSsize_t": 2,
- "z": 46,
- "PyInt_FromLong": 13,
- "PyInt_AsSsize_t": 2,
- "PyInt_AsLong": 2,
- "PyNumber_Index": 1,
- "PyNumber_Int": 1,
- "PyIndex_Check": 1,
- "PyNumber_Check": 1,
- "PyErr_WarnEx": 1,
- "category": 2,
- "message": 2,
- "stacklevel": 1,
- "PyErr_Warn": 1,
- "Py_REFCNT": 1,
- "ob": 6,
- "PyObject*": 16,
- "ob_refcnt": 1,
- "ob_type": 7,
- "Py_SIZE": 1,
- "PyVarObject*": 1,
- "ob_size": 1,
- "PyVarObject_HEAD_INIT": 1,
- "PyObject_HEAD_INIT": 1,
- "PyType_Modified": 1,
- "*buf": 1,
- "PyObject": 221,
- "*obj": 2,
- "len": 1,
- "itemsize": 2,
- "readonly": 2,
- "ndim": 2,
- "*format": 1,
- "*shape": 1,
- "*strides": 1,
- "*suboffsets": 1,
- "*internal": 1,
- "Py_buffer": 5,
- "PyBUF_SIMPLE": 1,
- "PyBUF_WRITABLE": 1,
- "PyBUF_FORMAT": 1,
- "PyBUF_ND": 2,
- "PyBUF_STRIDES": 5,
- "PyBUF_C_CONTIGUOUS": 3,
- "PyBUF_F_CONTIGUOUS": 3,
- "PyBUF_ANY_CONTIGUOUS": 1,
- "PyBUF_INDIRECT": 1,
- "PY_MAJOR_VERSION": 10,
- "__Pyx_BUILTIN_MODULE_NAME": 2,
- "Py_TPFLAGS_CHECKTYPES": 1,
- "Py_TPFLAGS_HAVE_INDEX": 1,
- "Py_TPFLAGS_HAVE_NEWBUFFER": 1,
- "PyBaseString_Type": 1,
- "PyUnicode_Type": 2,
- "PyStringObject": 2,
- "PyUnicodeObject": 1,
- "PyString_Type": 2,
- "PyString_Check": 2,
- "PyUnicode_Check": 1,
- "PyString_CheckExact": 2,
- "PyUnicode_CheckExact": 1,
- "PyBytesObject": 1,
- "PyBytes_Type": 1,
- "PyBytes_Check": 1,
- "PyBytes_CheckExact": 1,
- "PyBytes_FromString": 2,
- "PyString_FromString": 1,
- "PyBytes_FromStringAndSize": 1,
- "PyString_FromStringAndSize": 1,
- "PyBytes_FromFormat": 1,
- "PyString_FromFormat": 1,
- "PyBytes_DecodeEscape": 1,
- "PyString_DecodeEscape": 1,
- "PyBytes_AsString": 2,
- "PyString_AsString": 1,
- "PyBytes_AsStringAndSize": 1,
- "PyString_AsStringAndSize": 1,
- "PyBytes_Size": 1,
- "PyString_Size": 1,
- "PyBytes_AS_STRING": 1,
- "PyString_AS_STRING": 1,
- "PyBytes_GET_SIZE": 1,
- "PyString_GET_SIZE": 1,
- "PyBytes_Repr": 1,
- "PyString_Repr": 1,
- "PyBytes_Concat": 1,
- "PyString_Concat": 1,
- "PyBytes_ConcatAndDel": 1,
- "PyString_ConcatAndDel": 1,
- "PySet_Check": 1,
- "obj": 42,
- "PyObject_TypeCheck": 3,
- "PySet_Type": 2,
- "PyFrozenSet_Check": 1,
- "PyFrozenSet_Type": 1,
- "PySet_CheckExact": 2,
- "__Pyx_TypeCheck": 1,
- "PyTypeObject": 2,
- "PyIntObject": 1,
- "PyLongObject": 2,
- "PyInt_Type": 1,
- "PyLong_Type": 1,
- "PyInt_Check": 1,
- "PyLong_Check": 1,
- "PyInt_CheckExact": 1,
- "PyLong_CheckExact": 1,
- "PyInt_FromString": 1,
- "PyLong_FromString": 1,
- "PyInt_FromUnicode": 1,
- "PyLong_FromUnicode": 1,
- "PyLong_FromLong": 1,
- "PyInt_FromSize_t": 1,
- "PyLong_FromSize_t": 1,
- "PyLong_FromSsize_t": 1,
- "PyLong_AsLong": 1,
- "PyInt_AS_LONG": 1,
- "PyLong_AS_LONG": 1,
- "PyLong_AsSsize_t": 1,
- "PyInt_AsUnsignedLongMask": 1,
- "PyLong_AsUnsignedLongMask": 1,
- "PyInt_AsUnsignedLongLongMask": 1,
- "PyLong_AsUnsignedLongLongMask": 1,
- "PyBoolObject": 1,
- "__Pyx_PyNumber_Divide": 2,
- "PyNumber_TrueDivide": 1,
- "__Pyx_PyNumber_InPlaceDivide": 2,
- "PyNumber_InPlaceTrueDivide": 1,
- "PyNumber_Divide": 1,
- "PyNumber_InPlaceDivide": 1,
- "__Pyx_PySequence_GetSlice": 2,
- "PySequence_GetSlice": 2,
- "__Pyx_PySequence_SetSlice": 2,
- "PySequence_SetSlice": 2,
- "__Pyx_PySequence_DelSlice": 2,
- "PySequence_DelSlice": 2,
- "unlikely": 69,
- "PyErr_SetString": 4,
- "PyExc_SystemError": 3,
- "likely": 15,
- "tp_as_mapping": 3,
- "PyErr_Format": 4,
- "PyExc_TypeError": 5,
- "tp_name": 4,
- "PyMethod_New": 2,
- "func": 3,
- "klass": 1,
- "PyInstanceMethod_New": 1,
- "__Pyx_GetAttrString": 2,
- "PyObject_GetAttrString": 3,
- "__Pyx_SetAttrString": 2,
- "PyObject_SetAttrString": 2,
- "__Pyx_DelAttrString": 2,
- "PyObject_DelAttrString": 2,
- "__Pyx_NAMESTR": 3,
- "__Pyx_DOCSTR": 3,
- "__cplusplus": 10,
- "__PYX_EXTERN_C": 2,
- "_USE_MATH_DEFINES": 1,
- "": 1,
- "__PYX_HAVE_API__wrapper_inner": 1,
- "PYREX_WITHOUT_ASSERTIONS": 1,
- "CYTHON_WITHOUT_ASSERTIONS": 1,
- "CYTHON_INLINE": 68,
- "__GNUC__": 5,
- "__inline__": 1,
- "#elif": 3,
- "__inline": 1,
- "__STDC_VERSION__": 2,
- "L": 1,
- "CYTHON_UNUSED": 7,
- "**p": 1,
- "*s": 1,
- "long": 5,
- "encoding": 1,
- "is_unicode": 1,
- "is_str": 1,
- "intern": 1,
- "__Pyx_StringTabEntry": 1,
- "__Pyx_PyBytes_FromUString": 1,
- "__Pyx_PyBytes_AsUString": 1,
- "__Pyx_PyBool_FromLong": 1,
- "Py_INCREF": 3,
- "Py_True": 2,
- "Py_False": 2,
- "__Pyx_PyObject_IsTrue": 8,
- "__Pyx_PyNumber_Int": 1,
- "__Pyx_PyIndex_AsSsize_t": 1,
- "__Pyx_PyInt_FromSize_t": 1,
- "__Pyx_PyInt_AsSize_t": 1,
- "__pyx_PyFloat_AsDouble": 3,
- "PyFloat_CheckExact": 1,
- "PyFloat_AS_DOUBLE": 1,
- "PyFloat_AsDouble": 1,
- "__GNUC_MINOR__": 1,
- "__builtin_expect": 2,
- "*__pyx_m": 1,
- "*__pyx_b": 1,
- "*__pyx_empty_tuple": 1,
- "*__pyx_empty_bytes": 1,
- "__pyx_lineno": 80,
- "__pyx_clineno": 80,
- "__pyx_cfilenm": 1,
- "__FILE__": 2,
- "*__pyx_filename": 1,
- "CYTHON_CCOMPLEX": 12,
- "_Complex_I": 3,
- "": 1,
- "": 1,
- "__sun__": 1,
- "fj": 1,
- "*__pyx_f": 1,
- "npy_int8": 1,
- "__pyx_t_5numpy_int8_t": 1,
- "npy_int16": 1,
- "__pyx_t_5numpy_int16_t": 1,
- "npy_int32": 1,
- "__pyx_t_5numpy_int32_t": 1,
- "npy_int64": 1,
- "__pyx_t_5numpy_int64_t": 1,
- "npy_uint8": 1,
- "__pyx_t_5numpy_uint8_t": 1,
- "npy_uint16": 1,
- "__pyx_t_5numpy_uint16_t": 1,
- "npy_uint32": 1,
- "__pyx_t_5numpy_uint32_t": 1,
- "npy_uint64": 1,
- "__pyx_t_5numpy_uint64_t": 1,
- "npy_float32": 1,
- "__pyx_t_5numpy_float32_t": 1,
- "npy_float64": 1,
- "__pyx_t_5numpy_float64_t": 1,
- "npy_long": 1,
- "__pyx_t_5numpy_int_t": 1,
- "npy_longlong": 1,
- "__pyx_t_5numpy_long_t": 1,
- "npy_intp": 10,
- "__pyx_t_5numpy_intp_t": 1,
- "npy_uintp": 1,
- "__pyx_t_5numpy_uintp_t": 1,
- "npy_ulong": 1,
- "__pyx_t_5numpy_uint_t": 1,
- "npy_ulonglong": 1,
- "__pyx_t_5numpy_ulong_t": 1,
- "npy_double": 2,
- "__pyx_t_5numpy_float_t": 1,
- "__pyx_t_5numpy_double_t": 1,
- "npy_longdouble": 1,
- "__pyx_t_5numpy_longdouble_t": 1,
- "complex": 2,
- "float": 7,
- "__pyx_t_float_complex": 27,
- "_Complex": 2,
- "real": 2,
- "imag": 2,
- "__pyx_t_double_complex": 27,
- "npy_cfloat": 1,
- "__pyx_t_5numpy_cfloat_t": 1,
- "npy_cdouble": 2,
- "__pyx_t_5numpy_cdouble_t": 1,
- "npy_clongdouble": 1,
- "__pyx_t_5numpy_clongdouble_t": 1,
- "__pyx_t_5numpy_complex_t": 1,
- "CYTHON_REFNANNY": 3,
- "__Pyx_RefNannyAPIStruct": 4,
- "*__Pyx_RefNanny": 1,
- "__Pyx_RefNannyImportAPI": 1,
- "*modname": 1,
- "*m": 1,
- "*p": 1,
- "*r": 1,
- "m": 4,
- "PyImport_ImportModule": 1,
- "modname": 1,
- "PyLong_AsVoidPtr": 1,
- "Py_XDECREF": 3,
- "__Pyx_RefNannySetupContext": 13,
- "*__pyx_refnanny": 1,
- "__Pyx_RefNanny": 6,
- "SetupContext": 1,
- "__LINE__": 84,
- "__Pyx_RefNannyFinishContext": 12,
- "FinishContext": 1,
- "__pyx_refnanny": 5,
- "__Pyx_INCREF": 36,
- "INCREF": 1,
- "__Pyx_DECREF": 66,
- "DECREF": 1,
- "__Pyx_GOTREF": 60,
- "GOTREF": 1,
- "__Pyx_GIVEREF": 10,
- "GIVEREF": 1,
- "__Pyx_XDECREF": 26,
- "Py_DECREF": 1,
- "__Pyx_XGIVEREF": 7,
- "__Pyx_XGOTREF": 1,
- "__Pyx_TypeTest": 4,
- "*type": 3,
- "*__Pyx_GetName": 1,
- "*dict": 1,
- "__Pyx_ErrRestore": 1,
- "*value": 2,
- "*tb": 2,
- "__Pyx_ErrFetch": 1,
- "**type": 1,
- "**value": 1,
- "**tb": 1,
- "__Pyx_Raise": 8,
- "__Pyx_RaiseNoneNotIterableError": 1,
- "__Pyx_RaiseNeedMoreValuesError": 1,
- "index": 2,
- "__Pyx_RaiseTooManyValuesError": 1,
- "expected": 1,
- "__Pyx_UnpackTupleError": 2,
- "*__Pyx_Import": 1,
- "*from_list": 1,
- "__Pyx_Print": 1,
- "__pyx_print": 1,
- "__pyx_print_kwargs": 1,
- "__Pyx_PrintOne": 4,
- "*o": 1,
- "*__Pyx_PyInt_to_py_Py_intptr_t": 1,
- "Py_intptr_t": 1,
- "__Pyx_CREAL": 4,
- ".real": 3,
- "__Pyx_CIMAG": 4,
- ".imag": 3,
- "__real__": 1,
- "__imag__": 1,
- "_WIN32": 1,
- "__Pyx_SET_CREAL": 2,
- "__Pyx_SET_CIMAG": 2,
- "__pyx_t_float_complex_from_parts": 1,
- "__Pyx_c_eqf": 2,
- "__Pyx_c_sumf": 2,
- "__Pyx_c_difff": 2,
- "__Pyx_c_prodf": 2,
- "__Pyx_c_quotf": 2,
- "__Pyx_c_negf": 2,
- "__Pyx_c_is_zerof": 3,
- "__Pyx_c_conjf": 3,
- "conj": 3,
- "__Pyx_c_absf": 3,
- "abs": 2,
- "__Pyx_c_powf": 3,
- "pow": 2,
- "conjf": 1,
- "cabsf": 1,
- "cpowf": 1,
- "__pyx_t_double_complex_from_parts": 1,
- "__Pyx_c_eq": 2,
- "__Pyx_c_sum": 2,
- "__Pyx_c_diff": 2,
- "__Pyx_c_prod": 2,
- "__Pyx_c_quot": 2,
- "__Pyx_c_neg": 2,
- "__Pyx_c_is_zero": 3,
- "__Pyx_c_conj": 3,
- "__Pyx_c_abs": 3,
- "__Pyx_c_pow": 3,
- "cabs": 1,
- "cpow": 1,
- "__Pyx_PyInt_AsUnsignedChar": 1,
- "short": 3,
- "__Pyx_PyInt_AsUnsignedShort": 1,
- "__Pyx_PyInt_AsUnsignedInt": 1,
- "__Pyx_PyInt_AsChar": 1,
- "__Pyx_PyInt_AsShort": 1,
- "__Pyx_PyInt_AsInt": 1,
- "signed": 5,
- "__Pyx_PyInt_AsSignedChar": 1,
- "__Pyx_PyInt_AsSignedShort": 1,
- "__Pyx_PyInt_AsSignedInt": 1,
- "__Pyx_PyInt_AsLongDouble": 1,
- "__Pyx_PyInt_AsUnsignedLong": 1,
- "__Pyx_PyInt_AsUnsignedLongLong": 1,
- "__Pyx_PyInt_AsLong": 1,
- "__Pyx_PyInt_AsLongLong": 1,
- "__Pyx_PyInt_AsSignedLong": 1,
- "__Pyx_PyInt_AsSignedLongLong": 1,
- "__Pyx_WriteUnraisable": 3,
- "__Pyx_ExportFunction": 1,
- "*__pyx_f_5numpy_PyArray_MultiIterNew2": 2,
- "*__pyx_f_5numpy_PyArray_MultiIterNew3": 2,
- "*__pyx_f_5numpy_PyArray_MultiIterNew4": 2,
- "*__pyx_f_5numpy_PyArray_MultiIterNew5": 2,
- "*__pyx_f_5numpy__util_dtypestring": 2,
- "PyArray_Descr": 6,
- "__pyx_f_5numpy_set_array_base": 1,
- "PyArrayObject": 19,
- "*__pyx_f_5numpy_get_array_base": 1,
- "inner_work_1d": 2,
- "inner_work_2d": 2,
- "__Pyx_MODULE_NAME": 1,
- "__pyx_module_is_main_wrapper_inner": 1,
- "*__pyx_builtin_ValueError": 1,
- "*__pyx_builtin_range": 1,
- "*__pyx_builtin_RuntimeError": 1,
- "__pyx_k_1": 1,
- "__pyx_k_2": 1,
- "__pyx_k_3": 1,
- "__pyx_k_5": 1,
- "__pyx_k_7": 1,
- "__pyx_k_9": 1,
- "__pyx_k_11": 1,
- "__pyx_k_12": 1,
- "__pyx_k_15": 1,
- "__pyx_k__B": 2,
- "__pyx_k__H": 2,
- "__pyx_k__I": 2,
- "__pyx_k__L": 2,
- "__pyx_k__O": 2,
- "__pyx_k__Q": 2,
- "__pyx_k__b": 2,
- "__pyx_k__d": 2,
- "__pyx_k__f": 2,
- "__pyx_k__g": 2,
- "__pyx_k__h": 2,
- "__pyx_k__i": 2,
- "__pyx_k__l": 2,
- "__pyx_k__q": 2,
- "__pyx_k__Zd": 2,
- "__pyx_k__Zf": 2,
- "__pyx_k__Zg": 2,
- "__pyx_k__np": 1,
- "__pyx_k__buf": 1,
- "__pyx_k__obj": 1,
- "__pyx_k__base": 1,
- "__pyx_k__ndim": 1,
- "__pyx_k__ones": 1,
- "__pyx_k__descr": 1,
- "__pyx_k__names": 1,
- "__pyx_k__numpy": 1,
- "__pyx_k__range": 1,
- "__pyx_k__shape": 1,
- "__pyx_k__fields": 1,
- "__pyx_k__format": 1,
- "__pyx_k__strides": 1,
- "__pyx_k____main__": 1,
- "__pyx_k____test__": 1,
- "__pyx_k__itemsize": 1,
- "__pyx_k__readonly": 1,
- "__pyx_k__type_num": 1,
- "__pyx_k__byteorder": 1,
- "__pyx_k__ValueError": 1,
- "__pyx_k__suboffsets": 1,
- "__pyx_k__work_module": 1,
- "__pyx_k__RuntimeError": 1,
- "__pyx_k__pure_py_test": 1,
- "__pyx_k__wrapper_inner": 1,
- "__pyx_k__do_awesome_work": 1,
- "*__pyx_kp_s_1": 1,
- "*__pyx_kp_u_11": 1,
- "*__pyx_kp_u_12": 1,
- "*__pyx_kp_u_15": 1,
- "*__pyx_kp_s_2": 1,
- "*__pyx_kp_s_3": 1,
- "*__pyx_kp_u_5": 1,
- "*__pyx_kp_u_7": 1,
- "*__pyx_kp_u_9": 1,
- "*__pyx_n_s__RuntimeError": 1,
- "*__pyx_n_s__ValueError": 1,
- "*__pyx_n_s____main__": 1,
- "*__pyx_n_s____test__": 1,
- "*__pyx_n_s__base": 1,
- "*__pyx_n_s__buf": 1,
- "*__pyx_n_s__byteorder": 1,
- "*__pyx_n_s__descr": 1,
- "*__pyx_n_s__do_awesome_work": 1,
- "*__pyx_n_s__fields": 1,
- "*__pyx_n_s__format": 1,
- "*__pyx_n_s__itemsize": 1,
- "*__pyx_n_s__names": 1,
- "*__pyx_n_s__ndim": 1,
- "*__pyx_n_s__np": 1,
- "*__pyx_n_s__numpy": 1,
- "*__pyx_n_s__obj": 1,
- "*__pyx_n_s__ones": 1,
- "*__pyx_n_s__pure_py_test": 1,
- "*__pyx_n_s__range": 1,
- "*__pyx_n_s__readonly": 1,
- "*__pyx_n_s__shape": 1,
- "*__pyx_n_s__strides": 1,
- "*__pyx_n_s__suboffsets": 1,
- "*__pyx_n_s__type_num": 1,
- "*__pyx_n_s__work_module": 1,
- "*__pyx_n_s__wrapper_inner": 1,
- "*__pyx_int_5": 1,
- "*__pyx_int_15": 1,
- "*__pyx_k_tuple_4": 1,
- "*__pyx_k_tuple_6": 1,
- "*__pyx_k_tuple_8": 1,
- "*__pyx_k_tuple_10": 1,
- "*__pyx_k_tuple_13": 1,
- "*__pyx_k_tuple_14": 1,
- "*__pyx_k_tuple_16": 1,
- "__pyx_v_num_x": 4,
- "*__pyx_v_data_ptr": 2,
- "*__pyx_v_answer_ptr": 2,
- "__pyx_v_nd": 6,
- "*__pyx_v_dims": 2,
- "__pyx_v_typenum": 6,
- "*__pyx_v_data_np": 2,
- "__pyx_v_sum": 6,
- "__pyx_t_1": 154,
- "*__pyx_t_2": 4,
- "*__pyx_t_3": 4,
- "*__pyx_t_4": 3,
- "__pyx_t_5": 75,
- "__pyx_kp_s_1": 1,
- "__pyx_filename": 79,
- "__pyx_f": 79,
- "__pyx_L1_error": 88,
- "__pyx_v_dims": 4,
- "NPY_DOUBLE": 3,
- "__pyx_t_2": 120,
- "PyArray_SimpleNewFromData": 2,
- "__pyx_v_data_ptr": 2,
- "Py_None": 38,
- "__pyx_ptype_5numpy_ndarray": 2,
- "__pyx_v_data_np": 10,
- "__Pyx_GetName": 4,
- "__pyx_m": 4,
- "__pyx_n_s__work_module": 3,
- "__pyx_t_3": 113,
- "PyObject_GetAttr": 4,
- "__pyx_n_s__do_awesome_work": 3,
- "PyTuple_New": 4,
- "PyTuple_SET_ITEM": 4,
- "__pyx_t_4": 35,
- "PyObject_Call": 11,
- "PyErr_Occurred": 2,
- "__pyx_v_answer_ptr": 2,
- "__pyx_L0": 24,
- "__pyx_v_num_y": 2,
- "__pyx_kp_s_2": 1,
- "*__pyx_pf_13wrapper_inner_pure_py_test": 2,
- "*__pyx_self": 2,
- "*unused": 2,
- "PyMethodDef": 1,
- "__pyx_mdef_13wrapper_inner_pure_py_test": 1,
- "PyCFunction": 1,
- "__pyx_pf_13wrapper_inner_pure_py_test": 1,
- "METH_NOARGS": 1,
- "*__pyx_v_data": 1,
- "*__pyx_r": 7,
- "*__pyx_t_1": 8,
- "__pyx_self": 2,
- "__pyx_v_data": 7,
- "__pyx_kp_s_3": 1,
- "__pyx_n_s__np": 1,
- "__pyx_n_s__ones": 1,
- "__pyx_k_tuple_4": 1,
- "__pyx_r": 39,
- "__Pyx_AddTraceback": 7,
- "__pyx_pf_5numpy_7ndarray___getbuffer__": 2,
- "*__pyx_v_self": 4,
- "*__pyx_v_info": 4,
- "__pyx_v_flags": 4,
- "__pyx_v_copy_shape": 5,
- "__pyx_v_i": 6,
- "__pyx_v_ndim": 6,
- "__pyx_v_endian_detector": 6,
- "__pyx_v_little_endian": 8,
- "__pyx_v_t": 29,
- "*__pyx_v_f": 2,
- "*__pyx_v_descr": 2,
- "__pyx_v_offset": 9,
- "__pyx_v_hasfields": 4,
- "__pyx_t_6": 40,
- "__pyx_t_7": 9,
- "*__pyx_t_8": 1,
- "*__pyx_t_9": 1,
- "__pyx_v_info": 33,
- "__pyx_v_self": 16,
- "PyArray_NDIM": 1,
- "__pyx_L5": 6,
- "PyArray_CHKFLAGS": 2,
- "NPY_C_CONTIGUOUS": 1,
- "__pyx_builtin_ValueError": 5,
- "__pyx_k_tuple_6": 1,
- "__pyx_L6": 6,
- "NPY_F_CONTIGUOUS": 1,
- "__pyx_k_tuple_8": 1,
- "__pyx_L7": 2,
- "buf": 1,
- "PyArray_DATA": 1,
- "strides": 5,
- "malloc": 2,
- "shape": 3,
- "PyArray_STRIDES": 2,
- "PyArray_DIMS": 2,
- "__pyx_L8": 2,
- "suboffsets": 1,
- "PyArray_ITEMSIZE": 1,
- "PyArray_ISWRITEABLE": 1,
- "__pyx_v_f": 31,
- "descr": 2,
- "__pyx_v_descr": 10,
- "PyDataType_HASFIELDS": 2,
- "__pyx_L11": 7,
- "type_num": 2,
- "byteorder": 4,
- "__pyx_k_tuple_10": 1,
- "__pyx_L13": 2,
- "NPY_BYTE": 2,
- "__pyx_L14": 18,
- "NPY_UBYTE": 2,
- "NPY_SHORT": 2,
- "NPY_USHORT": 2,
- "NPY_INT": 2,
- "NPY_UINT": 2,
- "NPY_LONG": 1,
- "NPY_ULONG": 1,
- "NPY_LONGLONG": 1,
- "NPY_ULONGLONG": 1,
- "NPY_FLOAT": 1,
- "NPY_LONGDOUBLE": 1,
- "NPY_CFLOAT": 1,
- "NPY_CDOUBLE": 1,
- "NPY_CLONGDOUBLE": 1,
- "NPY_OBJECT": 1,
- "__pyx_t_8": 16,
- "PyNumber_Remainder": 1,
- "__pyx_kp_u_11": 1,
- "format": 6,
- "__pyx_L12": 2,
- "__pyx_t_9": 7,
- "__pyx_f_5numpy__util_dtypestring": 1,
- "__pyx_L2": 2,
- "__pyx_pf_5numpy_7ndarray_1__releasebuffer__": 2,
- "PyArray_HASFIELDS": 1,
- "free": 2,
- "*__pyx_f_5numpy_PyArray_MultiIterNew1": 1,
- "*__pyx_v_a": 5,
- "PyArray_MultiIterNew": 5,
- "__pyx_v_a": 5,
- "*__pyx_v_b": 4,
- "__pyx_v_b": 4,
- "*__pyx_v_c": 3,
- "__pyx_v_c": 3,
- "*__pyx_v_d": 2,
- "__pyx_v_d": 2,
- "*__pyx_v_e": 1,
- "__pyx_v_e": 1,
- "*__pyx_v_end": 1,
- "*__pyx_v_offset": 1,
- "*__pyx_v_child": 1,
- "*__pyx_v_fields": 1,
- "*__pyx_v_childname": 1,
- "*__pyx_v_new_offset": 1,
- "*__pyx_v_t": 1,
- "*__pyx_t_5": 1,
- "__pyx_t_10": 7,
- "*__pyx_t_11": 1,
- "__pyx_v_child": 8,
- "__pyx_v_fields": 7,
- "__pyx_v_childname": 4,
- "__pyx_v_new_offset": 5,
- "names": 2,
- "PyTuple_GET_SIZE": 2,
- "PyTuple_GET_ITEM": 3,
- "PyObject_GetItem": 1,
- "fields": 1,
- "PyTuple_CheckExact": 1,
- "tuple": 3,
- "__pyx_ptype_5numpy_dtype": 1,
- "__pyx_v_end": 2,
- "PyNumber_Subtract": 2,
- "PyObject_RichCompare": 8,
- "__pyx_int_15": 1,
- "Py_LT": 2,
- "__pyx_builtin_RuntimeError": 2,
- "__pyx_k_tuple_13": 1,
- "__pyx_k_tuple_14": 1,
- "elsize": 1,
- "__pyx_k_tuple_16": 1,
- "__pyx_L10": 2,
- "Py_EQ": 6
- },
- "Forth": {
- "(": 88,
- "Block": 2,
- "words.": 6,
- ")": 87,
- "variable": 3,
- "blk": 3,
- "current": 5,
- "-": 473,
- "block": 8,
- "n": 22,
- "addr": 11,
- ";": 61,
- "buffer": 2,
- "evaluate": 1,
- "extended": 3,
- "semantics": 3,
- "flush": 1,
- "load": 2,
- "...": 4,
- "dup": 10,
- "save": 2,
- "input": 2,
- "in": 4,
- "@": 13,
- "source": 5,
- "#source": 2,
- "interpret": 1,
- "restore": 1,
- "buffers": 2,
- "update": 1,
- "extension": 4,
- "empty": 2,
- "scr": 2,
- "list": 1,
- "bounds": 1,
- "do": 2,
- "i": 5,
- "emit": 2,
- "loop": 4,
- "refill": 2,
- "thru": 1,
- "x": 10,
- "y": 5,
- "+": 17,
- "swap": 12,
- "*": 9,
- "forth": 2,
- "Copyright": 3,
- "Lars": 3,
- "Brinkhoff": 3,
- "Kernel": 4,
- "#tib": 2,
- "TODO": 12,
- ".r": 1,
- ".": 5,
- "[": 16,
- "char": 10,
- "]": 15,
- "parse": 5,
- "type": 3,
- "immediate": 19,
- "<": 14,
- "flag": 4,
- "r": 18,
- "x1": 5,
- "x2": 5,
- "R": 13,
- "rot": 2,
- "r@": 2,
- "noname": 1,
- "align": 2,
- "here": 9,
- "c": 3,
- "allot": 2,
- "lastxt": 4,
- "SP": 1,
- "query": 1,
- "tib": 1,
- "body": 1,
- "true": 1,
- "tuck": 2,
- "over": 5,
- "u.r": 1,
- "u": 3,
- "if": 9,
- "drop": 4,
- "false": 1,
- "else": 6,
- "then": 5,
- "unused": 1,
- "value": 1,
- "create": 2,
- "does": 5,
- "within": 1,
- "compile": 2,
- "Forth2012": 2,
- "core": 1,
- "action": 1,
- "of": 3,
- "defer": 2,
- "name": 1,
- "s": 4,
- "c@": 2,
- "negate": 1,
- "nip": 2,
- "bl": 4,
- "word": 9,
- "ahead": 2,
- "resolve": 4,
- "literal": 4,
- "postpone": 14,
- "nonimmediate": 1,
- "caddr": 1,
- "C": 9,
- "find": 2,
- "cells": 1,
- "postponers": 1,
- "execute": 1,
- "unresolved": 4,
- "orig": 5,
- "chars": 1,
- "n1": 2,
- "n2": 2,
- "orig1": 1,
- "orig2": 1,
- "branch": 5,
- "dodoes_code": 1,
- "code": 3,
- "begin": 2,
- "dest": 5,
- "while": 2,
- "repeat": 2,
- "until": 1,
- "recurse": 1,
- "pad": 3,
- "If": 1,
- "necessary": 1,
- "and": 3,
- "keep": 1,
- "parsing.": 1,
- "string": 3,
- "cmove": 1,
- "state": 2,
- "cr": 3,
- "abort": 3,
- "": 1,
- "Undefined": 1,
- "ok": 1,
- "HELLO": 4,
- "KataDiversion": 1,
- "Forth": 1,
- "utils": 1,
- "the": 7,
- "stack": 3,
- "EMPTY": 1,
- "DEPTH": 2,
- "IF": 10,
- "BEGIN": 3,
- "DROP": 5,
- "UNTIL": 3,
- "THEN": 10,
- "power": 2,
- "**": 2,
- "n1_pow_n2": 1,
- "SWAP": 8,
- "DUP": 14,
- "DO": 2,
- "OVER": 2,
- "LOOP": 2,
- "NIP": 4,
- "compute": 1,
- "highest": 1,
- "below": 1,
- "N.": 1,
- "e.g.": 2,
- "MAXPOW2": 2,
- "log2_n": 1,
- "ABORT": 1,
- "ELSE": 7,
- "|": 4,
- "I": 5,
- "i*2": 1,
- "/": 3,
- "kata": 1,
- "test": 1,
- "given": 3,
- "N": 6,
- "has": 1,
- "two": 2,
- "adjacent": 2,
- "bits": 3,
- "NOT": 3,
- "TWO": 3,
- "ADJACENT": 3,
- "BITS": 3,
- "bool": 1,
- "uses": 1,
- "following": 1,
- "algorithm": 1,
- "return": 5,
- "A": 5,
- "X": 5,
- "LOG2": 1,
- "end": 1,
- "OR": 1,
- "INVERT": 1,
- "maximum": 1,
- "number": 4,
- "which": 3,
- "can": 2,
- "be": 2,
- "made": 2,
- "with": 2,
- "MAX": 2,
- "NB": 3,
- "m": 2,
- "**n": 1,
- "numbers": 1,
- "or": 1,
- "less": 1,
- "have": 1,
- "not": 1,
- "bits.": 1,
- "see": 1,
- "http": 1,
- "//www.codekata.com/2007/01/code_kata_fifte.html": 1,
- "HOW": 1,
- "MANY": 1,
- "Tools": 2,
- ".s": 1,
- "depth": 1,
- "traverse": 1,
- "dictionary": 1,
- "assembler": 1,
- "kernel": 1,
- "bye": 1,
- "cs": 2,
- "pick": 1,
- "roll": 1,
- "editor": 1,
- "forget": 1,
- "reveal": 1,
- "tools": 1,
- "nr": 1,
- "synonym": 1,
- "undefined": 2,
- "defined": 1,
- "invert": 1,
- "/cell": 2,
- "cell": 2
- },
- "Lasso": {
- "<": 7,
- "LassoScript": 1,
- "//": 169,
- "JSON": 2,
- "Encoding": 1,
- "and": 52,
- "Decoding": 1,
- "Copyright": 1,
- "-": 2248,
- "LassoSoft": 1,
- "Inc.": 1,
- " ": 1,
- " ": 1,
- "": 1,
- "This": 5,
- "tag": 11,
- "is": 35,
- "now": 23,
- "incorporated": 1,
- "in": 46,
- "Lasso": 15,
- "If": 4,
- "(": 640,
- "Lasso_TagExists": 1,
- ")": 639,
- "False": 1,
- ";": 573,
- "Define_Tag": 1,
- "Namespace": 1,
- "Required": 1,
- "Optional": 1,
- "Local": 7,
- "Map": 3,
- "r": 8,
- "n": 30,
- "t": 8,
- "f": 2,
- "b": 2,
- "output": 30,
- "newoptions": 1,
- "options": 2,
- "array": 20,
- "set": 10,
- "list": 4,
- "queue": 2,
- "priorityqueue": 2,
- "stack": 2,
- "pair": 1,
- "map": 23,
- "[": 22,
- "]": 23,
- "literal": 3,
- "string": 59,
- "integer": 30,
- "decimal": 5,
- "boolean": 4,
- "null": 26,
- "date": 23,
- "temp": 12,
- "object": 7,
- "{": 18,
- "}": 18,
- "client_ip": 1,
- "client_address": 1,
- "__jsonclass__": 6,
- "deserialize": 2,
- "": 3,
- " ": 3,
- "Decode_JSON": 2,
- "Decode_": 1,
- "value": 14,
- "consume_string": 1,
- "ibytes": 9,
- "unescapes": 1,
- "u": 1,
- "UTF": 4,
- "%": 14,
- "QT": 4,
- "TZ": 2,
- "T": 3,
- "consume_token": 1,
- "obytes": 3,
- "delimit": 7,
- "true": 12,
- "false": 8,
- ".": 5,
- "consume_array": 1,
- "consume_object": 1,
- "key": 3,
- "val": 1,
- "native": 2,
- "comment": 2,
- "http": 6,
- "//www.lassosoft.com/json": 1,
- "start": 5,
- "Literal": 2,
- "String": 1,
- "Object": 2,
- "JSON_RPCCall": 1,
- "RPCCall": 1,
- "JSON_": 1,
- "method": 7,
- "params": 11,
- "id": 7,
- "host": 6,
- "//localhost/lassoapps.8/rpc/rpc.lasso": 1,
- "request": 2,
- "result": 6,
- "JSON_Records": 3,
- "KeyField": 1,
- "ReturnField": 1,
- "ExcludeField": 1,
- "Fields": 1,
- "_fields": 1,
- "fields": 2,
- "No": 1,
- "found": 5,
- "for": 65,
- "_keyfield": 4,
- "keyfield": 4,
- "ID": 1,
- "_index": 1,
- "_return": 1,
- "returnfield": 1,
- "_exclude": 1,
- "excludefield": 1,
- "_records": 1,
- "_record": 1,
- "_temp": 1,
- "_field": 1,
- "_output": 1,
- "error_msg": 15,
- "error_code": 11,
- "found_count": 11,
- "rows": 1,
- "#_records": 1,
- "Return": 7,
- "@#_output": 1,
- "/Define_Tag": 1,
- "/If": 3,
- "define": 20,
- "trait_json_serialize": 2,
- "trait": 1,
- "require": 1,
- "asString": 3,
- "json_serialize": 18,
- "e": 13,
- "bytes": 8,
- "+": 146,
- "#e": 13,
- "Replace": 19,
- "&": 21,
- "json_literal": 1,
- "asstring": 4,
- "format": 7,
- "gmt": 1,
- "|": 13,
- "trait_forEach": 1,
- "local": 116,
- "foreach": 1,
- "#output": 50,
- "#delimit": 7,
- "#1": 3,
- "return": 75,
- "with": 25,
- "pr": 1,
- "eachPair": 1,
- "select": 1,
- "#pr": 2,
- "first": 12,
- "second": 8,
- "join": 5,
- "json_object": 2,
- "foreachpair": 1,
- "any": 14,
- "serialize": 1,
- "json_consume_string": 3,
- "while": 9,
- "#temp": 19,
- "#ibytes": 17,
- "export8bits": 6,
- "#obytes": 5,
- "import8bits": 4,
- "Escape": 1,
- "/while": 7,
- "unescape": 1,
- "//Replace": 1,
- "if": 76,
- "BeginsWith": 1,
- "&&": 30,
- "EndsWith": 1,
- "Protect": 1,
- "serialization_reader": 1,
- "xml": 1,
- "read": 1,
- "/Protect": 1,
- "else": 32,
- "size": 24,
- "or": 6,
- "regexp": 1,
- "d": 2,
- "Z": 1,
- "matches": 1,
- "Format": 1,
- "yyyyMMdd": 2,
- "HHmmssZ": 1,
- "HHmmss": 1,
- "/if": 53,
- "json_consume_token": 2,
- "marker": 4,
- "Is": 1,
- "also": 5,
- "end": 2,
- "of": 24,
- "token": 1,
- "//............................................................................": 2,
- "string_IsNumeric": 1,
- "json_consume_array": 3,
- "While": 1,
- "Discard": 1,
- "whitespace": 3,
- "Else": 7,
- "insert": 18,
- "#key": 12,
- "json_consume_object": 2,
- "Loop_Abort": 1,
- "/While": 1,
- "Find": 3,
- "isa": 25,
- "First": 4,
- "find": 57,
- "Second": 1,
- "json_deserialize": 1,
- "removeLeading": 1,
- "bom_utf8": 1,
- "Reset": 1,
- "on": 1,
- "provided": 1,
- "**/": 1,
- "type": 63,
- "parent": 5,
- "public": 1,
- "onCreate": 1,
- "...": 3,
- "..onCreate": 1,
- "#rest": 1,
- "json_rpccall": 1,
- "#id": 2,
- "#host": 4,
- "Lasso_UniqueID": 1,
- "Include_URL": 1,
- "PostParams": 1,
- "Encode_JSON": 1,
- "#method": 1,
- "#params": 5,
- "": 6,
- "2009": 14,
- "09": 10,
- "04": 8,
- "JS": 126,
- "Added": 40,
- "content_body": 14,
- "compatibility": 4,
- "pre": 4,
- "8": 6,
- "5": 4,
- "05": 4,
- "07": 6,
- "timestamp": 4,
- "to": 98,
- "knop_cachestore": 4,
- "maxage": 2,
- "parameter": 8,
- "knop_cachefetch": 4,
- "Corrected": 8,
- "construction": 2,
- "cache_name": 2,
- "internally": 2,
- "the": 86,
- "knop_cache": 2,
- "tags": 14,
- "so": 16,
- "it": 20,
- "will": 12,
- "work": 6,
- "correctly": 2,
- "at": 10,
- "site": 4,
- "root": 2,
- "2008": 6,
- "11": 8,
- "dummy": 2,
- "knop_debug": 4,
- "ctype": 2,
- "be": 38,
- "able": 14,
- "transparently": 2,
- "without": 4,
- "L": 2,
- "Debug": 2,
- "24": 2,
- "knop_stripbackticks": 2,
- "01": 4,
- "28": 2,
- "Cache": 2,
- "name": 32,
- "used": 12,
- "when": 10,
- "using": 8,
- "session": 4,
- "storage": 8,
- "2007": 6,
- "12": 8,
- "knop_cachedelete": 2,
- "Created": 4,
- "03": 2,
- "knop_foundrows": 2,
- "condition": 4,
- "returning": 2,
- "normal": 2,
- "For": 2,
- "lasso_tagexists": 4,
- "define_tag": 48,
- "namespace=": 12,
- "__html_reply__": 4,
- "define_type": 14,
- "debug": 2,
- "_unknowntag": 6,
- "onconvert": 2,
- "stripbackticks": 2,
- "description=": 2,
- "priority=": 2,
- "required=": 2,
- "input": 2,
- "split": 2,
- "@#output": 2,
- "/define_tag": 36,
- "description": 34,
- "namespace": 16,
- "priority": 8,
- "Johan": 2,
- "S": 2,
- "lve": 2,
- "#charlist": 6,
- "current": 10,
- "time": 8,
- "a": 52,
- "mixed": 2,
- "up": 4,
- "as": 26,
- "seed": 6,
- "#seed": 36,
- "convert": 4,
- "this": 14,
- "base": 6,
- "conversion": 4,
- "get": 12,
- "#base": 8,
- "/": 6,
- "over": 2,
- "new": 14,
- "chunk": 2,
- "millisecond": 2,
- "math_random": 2,
- "lower": 2,
- "upper": 2,
- "__lassoservice_ip__": 2,
- "response_localpath": 8,
- "removetrailing": 8,
- "response_filepath": 8,
- "//tagswap.net/found_rows": 2,
- "action_statement": 2,
- "string_findregexp": 8,
- "#sql": 42,
- "ignorecase": 12,
- "||": 8,
- "maxrecords_value": 2,
- "inaccurate": 2,
- "must": 4,
- "accurate": 2,
- "Default": 2,
- "usually": 2,
- "fastest.": 2,
- "Can": 2,
- "not": 10,
- "GROUP": 4,
- "BY": 6,
- "example.": 2,
- "normalize": 4,
- "around": 2,
- "FROM": 2,
- "expression": 6,
- "string_replaceregexp": 8,
- "replace": 8,
- "ReplaceOnlyOne": 2,
- "substring": 6,
- "remove": 6,
- "ORDER": 2,
- "statement": 4,
- "since": 4,
- "causes": 4,
- "problems": 2,
- "field": 26,
- "aliases": 2,
- "we": 2,
- "can": 14,
- "simple": 2,
- "later": 2,
- "query": 4,
- "contains": 2,
- "use": 10,
- "SQL_CALC_FOUND_ROWS": 2,
- "which": 2,
- "much": 2,
- "slower": 2,
- "see": 16,
- "//bugs.mysql.com/bug.php": 2,
- "removeleading": 2,
- "inline": 4,
- "sql": 2,
- "exit": 2,
- "here": 2,
- "normally": 2,
- "/inline": 2,
- "fallback": 4,
- "required": 10,
- "optional": 36,
- "local_defined": 26,
- "knop_seed": 2,
- "#RandChars": 4,
- "Get": 2,
- "Math_Random": 2,
- "Min": 2,
- "Max": 2,
- "Size": 2,
- "#value": 14,
- "#numericValue": 4,
- "length": 8,
- "#cryptvalue": 10,
- "#anyChar": 2,
- "Encrypt_Blowfish": 2,
- "decrypt_blowfish": 2,
- "String_Remove": 2,
- "StartPosition": 2,
- "EndPosition": 2,
- "Seed": 2,
- "String_IsAlphaNumeric": 2,
- "self": 72,
- "_date_msec": 4,
- "/define_type": 4,
- "seconds": 4,
- "default": 4,
- "store": 4,
- "all": 6,
- "page": 14,
- "vars": 8,
- "specified": 8,
- "iterate": 12,
- "keys": 6,
- "var": 38,
- "#item": 10,
- "#type": 26,
- "#data": 14,
- "/iterate": 12,
- "//fail_if": 6,
- "session_id": 6,
- "#session": 10,
- "session_addvar": 4,
- "#cache_name": 72,
- "duration": 4,
- "#expires": 4,
- "server_name": 6,
- "initiate": 10,
- "thread": 6,
- "RW": 6,
- "lock": 24,
- "global": 40,
- "Thread_RWLock": 6,
- "create": 6,
- "reference": 10,
- "@": 8,
- "writing": 6,
- "#lock": 12,
- "writelock": 4,
- "check": 6,
- "cache": 4,
- "unlock": 6,
- "writeunlock": 4,
- "#maxage": 4,
- "cached": 8,
- "data": 12,
- "too": 4,
- "old": 4,
- "reading": 2,
- "readlock": 2,
- "readunlock": 2,
- "ignored": 2,
- "//##################################################################": 4,
- "knoptype": 2,
- "All": 4,
- "Knop": 6,
- "custom": 8,
- "types": 10,
- "should": 4,
- "have": 6,
- "identify": 2,
- "registered": 2,
- "knop": 6,
- "isknoptype": 2,
- "knop_knoptype": 2,
- "prototype": 4,
- "version": 4,
- "14": 4,
- "Base": 2,
- "framework": 2,
- "Contains": 2,
- "common": 4,
- "member": 10,
- "Used": 2,
- "boilerplate": 2,
- "creating": 4,
- "other": 4,
- "instance": 8,
- "variables": 2,
- "are": 4,
- "available": 2,
- "well": 2,
- "CHANGE": 4,
- "NOTES": 4,
- "Syntax": 4,
- "adjustments": 4,
- "9": 2,
- "Changed": 6,
- "error": 22,
- "numbers": 2,
- "added": 10,
- "even": 2,
- "language": 10,
- "already": 2,
- "exists.": 2,
- "improved": 4,
- "reporting": 2,
- "messages": 6,
- "such": 2,
- "from": 6,
- "bad": 2,
- "database": 14,
- "queries": 2,
- "error_lang": 2,
- "provide": 2,
- "knop_lang": 8,
- "add": 12,
- "localized": 2,
- "except": 2,
- "knop_base": 8,
- "html": 4,
- "xhtml": 28,
- "help": 10,
- "nicely": 2,
- "formatted": 2,
- "output.": 2,
- "Centralized": 2,
- "knop_base.": 2,
- "Moved": 6,
- "codes": 2,
- "improve": 2,
- "documentation.": 2,
- "It": 2,
- "always": 2,
- "an": 8,
- "parameter.": 2,
- "trace": 2,
- "tagtime": 4,
- "was": 6,
- "nav": 4,
- "earlier": 2,
- "varname": 4,
- "retreive": 2,
- "variable": 8,
- "that": 18,
- "stored": 2,
- "in.": 2,
- "automatically": 2,
- "sense": 2,
- "doctype": 6,
- "exists": 2,
- "buffer.": 2,
- "The": 6,
- "performance.": 2,
- "internal": 2,
- "html.": 2,
- "Introduced": 2,
- "_knop_data": 10,
- "general": 2,
- "level": 2,
- "caching": 2,
- "between": 2,
- "different": 2,
- "objects.": 2,
- "TODO": 2,
- "option": 2,
- "Google": 2,
- "Code": 2,
- "Wiki": 2,
- "working": 2,
- "properly": 4,
- "run": 2,
- "by": 12,
- "atbegin": 2,
- "handler": 2,
- "explicitly": 2,
- "*/": 2,
- "entire": 4,
- "ms": 2,
- "defined": 4,
- "each": 8,
- "instead": 4,
- "avoid": 2,
- "recursion": 2,
- "properties": 4,
- "#endslash": 10,
- "#tags": 2,
- "#t": 2,
- "doesn": 4,
- "p": 2,
- "Parameters": 4,
- "nParameters": 2,
- "Internal.": 2,
- "Finds": 2,
- "out": 2,
- "used.": 2,
- "Looks": 2,
- "unless": 2,
- "array.": 2,
- "variable.": 2,
- "Looking": 2,
- "#xhtmlparam": 4,
- "plain": 2,
- "#doctype": 4,
- "copy": 4,
- "standard": 2,
- "code": 2,
- "errors": 12,
- "error_data": 12,
- "form": 2,
- "grid": 2,
- "lang": 2,
- "user": 4,
- "#error_lang": 12,
- "addlanguage": 4,
- "strings": 6,
- "@#errorcodes": 2,
- "#error_lang_custom": 2,
- "#custom_language": 10,
- "once": 4,
- "one": 2,
- "#custom_string": 4,
- "#errorcodes": 4,
- "#error_code": 10,
- "message": 6,
- "getstring": 2,
- "test": 2,
- "known": 2,
- "lasso": 2,
- "knop_timer": 2,
- "knop_unique": 2,
- "look": 2,
- "#varname": 6,
- "loop_abort": 2,
- "tag_name": 2,
- "#timer": 2,
- "#trace": 4,
- "merge": 2,
- "#eol": 8,
- "2010": 4,
- "23": 4,
- "Custom": 2,
- "interact": 2,
- "databases": 2,
- "Supports": 4,
- "both": 2,
- "MySQL": 2,
- "FileMaker": 2,
- "datasources": 2,
- "2012": 4,
- "06": 2,
- "10": 2,
- "SP": 4,
- "Fix": 2,
- "precision": 2,
- "bug": 2,
- "6": 2,
- "0": 2,
- "1": 2,
- "renderfooter": 2,
- "15": 2,
- "Add": 2,
- "support": 6,
- "Thanks": 2,
- "Ric": 2,
- "Lewis": 2,
- "settable": 4,
- "removed": 2,
- "table": 6,
- "nextrecord": 12,
- "deprecation": 2,
- "warning": 2,
- "corrected": 2,
- "verification": 2,
- "index": 4,
- "before": 4,
- "calling": 2,
- "resultset_count": 6,
- "break": 2,
- "versions": 2,
- "fixed": 4,
- "incorrect": 2,
- "debug_trace": 2,
- "addrecord": 4,
- "how": 2,
- "keyvalue": 10,
- "returned": 6,
- "adding": 2,
- "records": 4,
- "inserting": 2,
- "generated": 2,
- "suppressed": 2,
- "specifying": 2,
- "saverecord": 8,
- "deleterecord": 4,
- "case.": 2,
- "recorddata": 6,
- "no": 2,
- "longer": 2,
- "touch": 2,
- "current_record": 2,
- "zero": 2,
- "access": 2,
- "occurrence": 2,
- "same": 4,
- "returns": 4,
- "knop_databaserows": 2,
- "inlinename.": 4,
- "next.": 2,
- "remains": 2,
- "supported": 2,
- "backwards": 2,
- "compatibility.": 2,
- "resets": 2,
- "record": 20,
- "pointer": 8,
- "reaching": 2,
- "last": 4,
- "honors": 2,
- "incremented": 2,
- "recordindex": 4,
- "specific": 2,
- "found.": 2,
- "getrecord": 8,
- "REALLY": 2,
- "works": 4,
- "keyvalues": 4,
- "double": 2,
- "oops": 4,
- "I": 4,
- "thought": 2,
- "but": 2,
- "misplaced": 2,
- "paren...": 2,
- "corresponding": 2,
- "resultset": 2,
- "/resultset": 2,
- "through": 2,
- "handling": 2,
- "better": 2,
- "knop_user": 4,
- "keeplock": 4,
- "updates": 2,
- "datatype": 2,
- "knop_databaserow": 2,
- "iterated.": 2,
- "When": 2,
- "iterating": 2,
- "row": 2,
- "values.": 2,
- "Addedd": 2,
- "increments": 2,
- "recordpointer": 2,
- "called": 2,
- "until": 2,
- "reached.": 2,
- "Returns": 2,
- "long": 2,
- "there": 2,
- "more": 2,
- "records.": 2,
- "Useful": 2,
- "loop": 2,
- "example": 2,
- "below": 2,
- "Implemented": 2,
- "reset": 2,
- "query.": 2,
- "shortcut": 2,
- "Removed": 2,
- "onassign": 2,
- "touble": 2,
- "Extended": 2,
- "field_names": 2,
- "names": 4,
- "db": 2,
- "objects": 2,
- "never": 2,
- "been": 2,
- "optionally": 2,
- "supports": 2,
- "sql.": 2,
- "Make": 2,
- "sure": 2,
- "SQL": 2,
- "includes": 2,
- "relevant": 2,
- "lockfield": 2,
- "locking": 4,
- "capturesearchvars": 2,
- "mysteriously": 2,
- "after": 2,
- "operations": 2,
- "caused": 2,
- "errors.": 2,
- "flag": 2,
- "save": 2,
- "locked": 2,
- "releasing": 2,
- "Adding": 2,
- "progress.": 2,
- "Done": 2,
- "oncreate": 2,
- "getrecord.": 2,
- "documentation": 2,
- "most": 2,
- "existing": 2,
- "it.": 2,
- "Faster": 2,
- "than": 2,
- "scratch.": 2,
- "shown_first": 2,
- "again": 2,
- "hoping": 2,
- "s": 2,
- "only": 2,
- "captured": 2,
- "update": 2,
- "uselimit": 2,
- "querys": 2,
- "LIMIT": 2,
- "still": 2,
- "gets": 2,
- "proper": 2,
- "searchresult": 2,
- "separate": 2,
- "COUNT": 2
- },
- "MoonScript": {
- "types": 2,
- "require": 5,
- "util": 2,
- "data": 1,
- "import": 5,
- "reversed": 2,
- "unpack": 22,
- "from": 4,
- "ntype": 16,
- "mtype": 3,
- "build": 7,
- "smart_node": 7,
- "is_slice": 2,
- "value_is_singular": 3,
- "insert": 18,
- "table": 2,
- "NameProxy": 14,
- "LocalName": 2,
- "destructure": 1,
- "local": 1,
- "implicitly_return": 2,
- "class": 4,
- "Run": 8,
- "new": 2,
- "(": 54,
- "@fn": 1,
- ")": 54,
- "self": 2,
- "[": 79,
- "]": 79,
- "call": 3,
- "state": 2,
- "self.fn": 1,
- "-": 51,
- "transform": 2,
- "the": 4,
- "last": 6,
- "stm": 16,
- "is": 2,
- "a": 4,
- "list": 6,
- "of": 1,
- "stms": 4,
- "will": 1,
- "puke": 1,
- "on": 1,
- "group": 1,
- "apply_to_last": 6,
- "fn": 3,
- "find": 2,
- "real": 1,
- "exp": 17,
- "last_exp_id": 3,
- "for": 20,
- "i": 15,
- "#stms": 1,
- "if": 43,
- "and": 8,
- "break": 1,
- "return": 11,
- "in": 18,
- "ipairs": 3,
- "else": 22,
- "body": 26,
- "sindle": 1,
- "expression/statement": 1,
- "is_singular": 2,
- "false": 2,
- "#body": 1,
- "true": 4,
- "find_assigns": 2,
- "out": 9,
- "{": 135,
- "}": 136,
- "thing": 4,
- "*body": 2,
- "switch": 7,
- "when": 12,
- "table.insert": 3,
- "extract": 1,
- "names": 16,
- "hoist_declarations": 1,
- "assigns": 5,
- "hoist": 1,
- "plain": 1,
- "old": 1,
- "*find_assigns": 1,
- "name": 31,
- "*names": 3,
- "type": 5,
- "after": 1,
- "runs": 1,
- "idx": 4,
- "while": 3,
- "do": 2,
- "+": 2,
- "expand_elseif_assign": 2,
- "ifstm": 5,
- "#ifstm": 1,
- "case": 13,
- "split": 4,
- "constructor_name": 2,
- "with_continue_listener": 4,
- "continue_name": 13,
- "nil": 8,
- "@listen": 1,
- "unless": 6,
- "@put_name": 2,
- "build.group": 14,
- "@splice": 1,
- "lines": 2,
- "Transformer": 2,
- "@transformers": 3,
- "@seen_nodes": 3,
- "setmetatable": 1,
- "__mode": 1,
- "scope": 4,
- "node": 68,
- "...": 10,
- "transformer": 3,
- "res": 3,
- "or": 6,
- "bind": 1,
- "@transform": 2,
- "__call": 1,
- "can_transform": 1,
- "construct_comprehension": 2,
- "inner": 2,
- "clauses": 4,
- "current_stms": 7,
- "_": 10,
- "clause": 4,
- "t": 10,
- "iter": 2,
- "elseif": 1,
- "cond": 11,
- "error": 4,
- "..t": 1,
- "Statement": 2,
- "root_stms": 1,
- "@": 1,
- "assign": 9,
- "values": 10,
- "bubble": 1,
- "cascading": 2,
- "transformed": 2,
- "#values": 1,
- "value": 7,
- "@transform.statement": 2,
- "types.cascading": 1,
- "ret": 16,
- "types.is_value": 1,
- "destructure.has_destructure": 2,
- "destructure.split_assign": 1,
- "continue": 1,
- "@send": 1,
- "build.assign_one": 11,
- "export": 1,
- "they": 1,
- "are": 1,
- "included": 1,
- "#node": 3,
- "cls": 5,
- "cls.name": 1,
- "build.assign": 3,
- "update": 1,
- "op": 2,
- "op_final": 3,
- "match": 1,
- "..op": 1,
- "not": 2,
- "source": 7,
- "stubs": 1,
- "real_names": 4,
- "build.chain": 7,
- "base": 8,
- "stub": 4,
- "*stubs": 2,
- "source_name": 3,
- "comprehension": 1,
- "action": 4,
- "decorated": 1,
- "dec": 6,
- "wrapped": 4,
- "fail": 5,
- "..": 1,
- "build.declare": 1,
- "*stm": 1,
- "expand": 1,
- "destructure.build_assign": 2,
- "build.do": 2,
- "apply": 1,
- "decorator": 1,
- "mutate": 1,
- "all": 1,
- "bodies": 1,
- "body_idx": 3,
- "with": 3,
- "block": 2,
- "scope_name": 5,
- "named_assign": 2,
- "assign_name": 1,
- "@set": 1,
- "foreach": 1,
- "node.iter": 1,
- "destructures": 5,
- "node.names": 3,
- "proxy": 2,
- "next": 1,
- "node.body": 9,
- "index_name": 3,
- "list_name": 6,
- "slice_var": 3,
- "bounds": 3,
- "slice": 7,
- "#list": 1,
- "table.remove": 2,
- "max_tmp_name": 5,
- "index": 2,
- "conds": 3,
- "exp_name": 3,
- "convert": 1,
- "into": 1,
- "statment": 1,
- "convert_cond": 2,
- "case_exps": 3,
- "cond_exp": 5,
- "first": 3,
- "if_stm": 5,
- "*conds": 1,
- "if_cond": 4,
- "parent_assign": 3,
- "parent_val": 1,
- "apart": 1,
- "properties": 4,
- "statements": 4,
- "item": 3,
- "tuple": 8,
- "*item": 1,
- "constructor": 7,
- "*properties": 1,
- "key": 3,
- "parent_cls_name": 5,
- "base_name": 4,
- "self_name": 4,
- "cls_name": 1,
- "build.fndef": 3,
- "args": 3,
- "arrow": 1,
- "then": 2,
- "constructor.arrow": 1,
- "real_name": 6,
- "#real_name": 1,
- "build.table": 2,
- "look": 1,
- "up": 1,
- "object": 1,
- "class_lookup": 3,
- "cls_mt": 2,
- "out_body": 1,
- "make": 1,
- "sure": 1,
- "we": 1,
- "don": 1,
- "string": 1,
- "parens": 2,
- "colon_stub": 1,
- "super": 1,
- "dot": 1,
- "varargs": 2,
- "arg_list": 1,
- "Value": 1
- },
"Rebol": {
- "REBOL": 1,
- "[": 3,
- "]": 3,
- "hello": 2,
+ "REBOL": 5,
+ "[": 54,
+ "System": 1,
+ "Title": 2,
+ "Rights": 1,
+ "{": 8,
+ "Copyright": 1,
+ "Technologies": 2,
+ "is": 4,
+ "a": 2,
+ "trademark": 1,
+ "of": 1,
+ "}": 8,
+ "License": 2,
+ "Licensed": 1,
+ "under": 1,
+ "the": 3,
+ "Apache": 1,
+ "Version": 1,
+ "See": 1,
+ "http": 1,
+ "//www.apache.org/licenses/LICENSE": 1,
+ "-": 26,
+ "Purpose": 1,
+ "These": 1,
+ "are": 2,
+ "used": 3,
+ "to": 2,
+ "define": 1,
+ "natives": 1,
+ "and": 2,
+ "actions.": 1,
+ "Bind": 1,
+ "attributes": 1,
+ "for": 4,
+ "this": 1,
+ "block": 5,
+ "BIND_SET": 1,
+ "SHALLOW": 1,
+ "]": 61,
+ ";": 19,
+ "Special": 1,
+ "as": 1,
+ "spec": 3,
+ "datatype": 2,
+ "test": 1,
+ "functions": 1,
+ "(": 30,
+ "e.g.": 1,
+ "time": 2,
+ ")": 33,
+ "value": 1,
+ "any": 1,
+ "type": 1,
+ "The": 1,
+ "native": 5,
+ "function": 3,
+ "must": 1,
+ "be": 1,
+ "defined": 1,
+ "first.": 1,
+ "This": 1,
+ "special": 1,
+ "boot": 1,
+ "created": 1,
+ "manually": 1,
+ "within": 1,
+ "C": 1,
+ "code.": 1,
+ "Creates": 2,
+ "internal": 2,
+ "usage": 2,
+ "only": 2,
+ ".": 4,
+ "no": 3,
+ "check": 2,
+ "required": 2,
+ "we": 2,
+ "know": 2,
+ "it": 2,
+ "correct": 2,
+ "action": 2,
+ "Rebol": 4,
+ "re": 20,
+ "func": 5,
+ "s": 5,
+ "/i": 1,
+ "rejoin": 1,
+ "compose": 1,
+ "either": 1,
+ "i": 1,
+ "little": 1,
+ "helper": 1,
+ "standard": 1,
+ "grammar": 1,
+ "regex": 2,
+ "date": 6,
+ "naive": 1,
+ "string": 1,
+ "|": 22,
+ "S": 3,
+ "*": 7,
+ "<(?:[^^\\>": 1,
+ "d": 3,
+ "+": 6,
+ "/": 5,
+ "@": 1,
+ "%": 2,
+ "A": 3,
+ "F": 1,
+ "url": 1,
+ "PR_LITERAL": 10,
+ "string_url": 1,
+ "email": 1,
+ "string_email": 1,
+ "binary": 1,
+ "binary_base_two": 1,
+ "binary_base_sixty_four": 1,
+ "binary_base_sixteen": 1,
+ "re/i": 2,
+ "issue": 1,
+ "string_issue": 1,
+ "values": 1,
+ "value_date": 1,
+ "value_time": 1,
+ "tuple": 1,
+ "value_tuple": 1,
+ "pair": 1,
+ "value_pair": 1,
+ "number": 2,
+ "PR": 1,
+ "Za": 2,
+ "z0": 2,
+ "<[=>": 1,
+ "rebol": 1,
+ "red": 1,
+ "/system": 1,
+ "world": 1,
+ "topaz": 1,
+ "true": 1,
+ "false": 1,
+ "yes": 1,
+ "on": 1,
+ "off": 1,
+ "none": 1,
+ "#": 1,
+ "hello": 8,
+ "print": 4,
+ "author": 1
+ },
+ "Red": {
+ "Red": 3,
+ "[": 111,
+ "Title": 2,
+ "Author": 1,
+ "]": 114,
+ "File": 1,
+ "%": 2,
+ "console.red": 1,
+ "Tabs": 1,
+ "Rights": 1,
+ "License": 2,
+ "{": 11,
+ "Distributed": 1,
+ "under": 1,
+ "the": 3,
+ "Boost": 1,
+ "Software": 1,
+ "Version": 1,
+ "See": 1,
+ "https": 1,
+ "//github.com/dockimbel/Red/blob/master/BSL": 1,
+ "-": 74,
+ "License.txt": 1,
+ "}": 11,
+ "Purpose": 2,
+ "Language": 2,
+ "http": 2,
+ "//www.red": 2,
+ "lang.org/": 2,
+ "#system": 1,
+ "global": 1,
+ "#either": 3,
+ "OS": 3,
+ "MacOSX": 2,
+ "History": 1,
+ "library": 1,
+ "cdecl": 3,
+ "add": 2,
+ "history": 2,
+ ";": 31,
+ "Add": 1,
+ "line": 9,
+ "to": 2,
+ "history.": 1,
+ "c": 7,
+ "string": 10,
+ "rl": 4,
+ "insert": 3,
+ "wrapper": 2,
"func": 1,
- "print": 1
+ "count": 3,
+ "integer": 16,
+ "key": 3,
+ "return": 10,
+ "Windows": 2,
+ "system/platform": 1,
+ "ret": 5,
+ "AttachConsole": 1,
+ "if": 2,
+ "zero": 3,
+ "print": 5,
+ "halt": 2,
+ "SetConsoleTitle": 1,
+ "as": 4,
+ "string/rs": 1,
+ "head": 1,
+ "str": 4,
+ "bind": 1,
+ "tab": 3,
+ "input": 2,
+ "routine": 1,
+ "prompt": 3,
+ "/local": 1,
+ "len": 1,
+ "buffer": 4,
+ "string/load": 1,
+ "+": 1,
+ "length": 1,
+ "free": 1,
+ "byte": 3,
+ "ptr": 14,
+ "SET_RETURN": 1,
+ "(": 6,
+ ")": 4,
+ "delimiters": 1,
+ "function": 6,
+ "block": 3,
+ "list": 1,
+ "copy": 2,
+ "none": 1,
+ "foreach": 1,
+ "case": 2,
+ "escaped": 2,
+ "no": 2,
+ "in": 2,
+ "comment": 2,
+ "switch": 3,
+ "#": 8,
+ "mono": 3,
+ "mode": 3,
+ "cnt/1": 1,
+ "red": 1,
+ "eval": 1,
+ "code": 3,
+ "load/all": 1,
+ "unless": 1,
+ "tail": 1,
+ "set/any": 1,
+ "not": 1,
+ "script/2": 1,
+ "do": 2,
+ "skip": 1,
+ "script": 1,
+ "quit": 2,
+ "init": 1,
+ "console": 2,
+ "Console": 1,
+ "alpha": 1,
+ "version": 3,
+ "only": 1,
+ "ASCII": 1,
+ "supported": 1,
+ "Red/System": 1,
+ "#include": 1,
+ "../common/FPU": 1,
+ "configuration.reds": 1,
+ "C": 1,
+ "types": 1,
+ "#define": 2,
+ "time": 2,
+ "long": 2,
+ "clock": 1,
+ "date": 1,
+ "alias": 2,
+ "struct": 5,
+ "second": 1,
+ "minute": 1,
+ "hour": 1,
+ "day": 1,
+ "month": 1,
+ "year": 1,
+ "Since": 1,
+ "weekday": 1,
+ "since": 1,
+ "Sunday": 1,
+ "yearday": 1,
+ "daylight": 1,
+ "saving": 1,
+ "Negative": 1,
+ "unknown": 1,
+ "#import": 1,
+ "LIBC": 1,
+ "file": 1,
+ "Error": 1,
+ "handling": 1,
+ "form": 1,
+ "error": 5,
+ "Return": 1,
+ "description.": 1,
+ "Print": 1,
+ "standard": 1,
+ "output.": 1,
+ "Memory": 1,
+ "management": 1,
+ "make": 1,
+ "Allocate": 1,
+ "filled": 1,
+ "memory.": 1,
+ "chunks": 1,
+ "size": 5,
+ "binary": 4,
+ "resize": 1,
+ "Resize": 1,
+ "memory": 2,
+ "allocation.": 1,
+ "JVM": 6,
+ "reserved0": 1,
+ "int": 6,
+ "reserved1": 1,
+ "reserved2": 1,
+ "DestroyJavaVM": 1,
+ "JNICALL": 5,
+ "vm": 5,
+ "jint": 5,
+ "AttachCurrentThread": 1,
+ "penv": 3,
+ "p": 3,
+ "args": 2,
+ "DetachCurrentThread": 1,
+ "GetEnv": 1,
+ "AttachCurrentThreadAsDaemon": 1,
+ "just": 2,
+ "some": 2,
+ "datatypes": 1,
+ "for": 1,
+ "testing": 1,
+ "#some": 1,
+ "hash": 1,
+ "FF0000": 3,
+ "FF000000": 2,
+ "with": 4,
+ "instead": 1,
+ "of": 1,
+ "space": 2,
+ "/wAAAA": 1,
+ "/wAAA": 2,
+ "A": 2,
+ "inside": 2,
+ "char": 1,
+ "bla": 2,
+ "ff": 1,
+ "foo": 3,
+ "numbers": 1,
+ "which": 1,
+ "interpreter": 1,
+ "path": 1,
+ "h": 1,
+ "#if": 1,
+ "type": 1,
+ "exe": 1,
+ "push": 3,
+ "system/stack/frame": 2,
+ "save": 1,
+ "previous": 1,
+ "frame": 2,
+ "pointer": 2,
+ "system/stack/top": 1,
+ "@@": 1,
+ "reposition": 1,
+ "after": 1,
+ "catch": 1,
+ "flag": 1,
+ "CATCH_ALL": 1,
+ "exceptions": 1,
+ "root": 1,
+ "barrier": 1,
+ "keep": 1,
+ "stack": 1,
+ "aligned": 1,
+ "on": 1,
+ "bit": 1
+ },
+ "RMarkdown": {
+ "Some": 1,
+ "text.": 1,
+ "##": 1,
+ "A": 1,
+ "graphic": 1,
+ "in": 1,
+ "R": 1,
+ "{": 1,
+ "r": 1,
+ "}": 1,
+ "plot": 1,
+ "(": 3,
+ ")": 3,
+ "hist": 1,
+ "rnorm": 1
},
"RobotFramework": {
"***": 16,
@@ -39937,6 +60579,53 @@
"running_threads2": 2,
"port2.recv": 1
},
+ "SAS": {
+ "libname": 1,
+ "source": 1,
+ "data": 6,
+ "work.working_copy": 5,
+ ";": 22,
+ "set": 3,
+ "source.original_file.sas7bdat": 1,
+ "run": 6,
+ "if": 2,
+ "Purge": 1,
+ "then": 2,
+ "delete": 1,
+ "ImportantVariable": 1,
+ ".": 1,
+ "MissingFlag": 1,
+ "proc": 2,
+ "surveyselect": 1,
+ "work.data": 1,
+ "out": 2,
+ "work.boot": 2,
+ "method": 1,
+ "urs": 1,
+ "reps": 1,
+ "seed": 2,
+ "sampsize": 1,
+ "outhits": 1,
+ "samplingunit": 1,
+ "Site": 1,
+ "PROC": 1,
+ "MI": 1,
+ "work.bootmi": 2,
+ "nimpute": 1,
+ "round": 1,
+ "By": 2,
+ "Replicate": 2,
+ "VAR": 1,
+ "Variable1": 2,
+ "Variable2": 2,
+ "logistic": 1,
+ "descending": 1,
+ "_Imputation_": 1,
+ "model": 1,
+ "Outcome": 1,
+ "/": 1,
+ "risklimits": 1
+ },
"Sass": {
"blue": 7,
"#3bbfce": 2,
@@ -39965,29 +60654,29 @@
"exec": 2,
"scala": 2,
"#": 2,
- "object": 2,
+ "object": 3,
"Beers": 1,
"extends": 1,
"Application": 1,
- "{": 10,
- "def": 7,
+ "{": 21,
+ "def": 10,
"bottles": 3,
- "(": 34,
+ "(": 67,
"qty": 12,
- "Int": 3,
+ "Int": 11,
"f": 4,
"String": 5,
- ")": 34,
- "//": 4,
+ ")": 67,
+ "//": 29,
"higher": 1,
- "-": 4,
+ "-": 5,
"order": 1,
"functions": 2,
"match": 2,
- "case": 5,
- "+": 29,
+ "case": 8,
+ "+": 49,
"x": 3,
- "}": 11,
+ "}": 22,
"beers": 3,
"sing": 3,
"implicit": 3,
@@ -40001,9 +60690,9 @@
".capitalize": 1,
"tail": 1,
"recursion": 1,
- "val": 2,
+ "val": 6,
"headOfSong": 1,
- "println": 2,
+ "println": 8,
"parameter": 1,
"name": 4,
"version": 1,
@@ -40030,10 +60719,10 @@
"<+=>": 1,
"baseDirectory": 1,
"map": 1,
- "_": 1,
+ "_": 2,
"input": 1,
"add": 2,
- "a": 2,
+ "a": 4,
"maven": 2,
"style": 2,
"repository": 2,
@@ -40044,8 +60733,8 @@
"of": 1,
"repositories": 1,
"define": 1,
- "the": 4,
- "to": 4,
+ "the": 5,
+ "to": 7,
"publish": 1,
"publishTo": 1,
"set": 2,
@@ -40083,7 +60772,7 @@
"false": 7,
"showSuccess": 1,
"timingFormat": 1,
- "import": 1,
+ "import": 9,
"java.text.DateFormat": 1,
"DateFormat.getDateTimeInstance": 1,
"DateFormat.SHORT": 2,
@@ -40112,12 +60801,72 @@
"Credentials": 2,
"Path.userHome": 1,
"/": 2,
+ "math.random": 1,
+ "scala.language.postfixOps": 1,
+ "scala.util._": 1,
+ "scala.util.": 1,
+ "Try": 1,
+ "Success": 2,
+ "Failure": 2,
+ "scala.concurrent._": 1,
+ "duration._": 1,
+ "ExecutionContext.Implicits.global": 1,
+ "scala.concurrent.": 1,
+ "ExecutionContext": 1,
+ "CanAwait": 1,
+ "OnCompleteRunnable": 1,
+ "TimeoutException": 1,
+ "ExecutionException": 1,
+ "blocking": 3,
+ "node11": 1,
+ "Welcome": 1,
+ "Scala": 1,
+ "worksheet": 1,
+ "retry": 3,
+ "[": 11,
+ "T": 8,
+ "]": 11,
+ "n": 3,
+ "block": 8,
+ "Future": 5,
+ "ns": 1,
+ "Iterator": 2,
+ ".iterator": 1,
+ "attempts": 1,
+ "ns.map": 1,
+ "failed": 2,
+ "Future.failed": 1,
+ "new": 1,
+ "Exception": 2,
+ "attempts.foldLeft": 1,
+ "fallbackTo": 1,
+ "scala.concurrent.Future": 1,
+ "scala.concurrent.Fut": 1,
+ "|": 19,
+ "ure": 1,
+ "rb": 3,
+ "i": 9,
+ "Thread.sleep": 2,
+ "*random.toInt": 1,
+ "i.toString": 5,
+ "ri": 2,
+ "onComplete": 1,
+ "s": 1,
+ "s.toString": 1,
+ "t": 1,
+ "t.toString": 1,
+ "r": 1,
+ "r.toString": 1,
+ "Unit": 1,
+ "toList": 1,
+ ".foreach": 1,
+ "Iteration": 5,
+ "java.lang.Exception": 1,
+ "Hi": 10,
"HelloWorld": 1,
"main": 1,
"args": 1,
- "Array": 1,
- "[": 1,
- "]": 1
+ "Array": 1
},
"Scaml": {
"%": 1,
@@ -40126,26 +60875,26 @@
"World": 1
},
"Scheme": {
- "(": 359,
+ "(": 366,
"import": 1,
"rnrs": 1,
- ")": 373,
+ ")": 380,
"only": 1,
"surfage": 4,
"s1": 1,
"lists": 1,
"filter": 4,
- "-": 188,
+ "-": 192,
"map": 4,
"gl": 12,
"glut": 2,
"dharmalab": 2,
"records": 1,
- "define": 27,
+ "define": 30,
"record": 5,
"type": 5,
"math": 1,
- "basic": 1,
+ "basic": 2,
"agave": 4,
"glu": 1,
"compat": 1,
@@ -40165,7 +60914,7 @@
";": 1684,
"utilities": 1,
"say": 9,
- ".": 1,
+ ".": 2,
"args": 2,
"for": 7,
"each": 7,
@@ -40174,7 +60923,7 @@
"translate": 6,
"p": 6,
"glTranslated": 1,
- "x": 8,
+ "x": 10,
"y": 3,
"radians": 8,
"/": 7,
@@ -40287,7 +61036,7 @@
"when": 5,
"<=>": 3,
"distance": 3,
- "begin": 1,
+ "begin": 2,
"1": 2,
"f": 1,
"append": 4,
@@ -40312,7 +61061,16 @@
"s": 1,
"space": 1,
"cons": 1,
- "glutMainLoop": 1
+ "glutMainLoop": 1,
+ "library": 1,
+ "libs": 1,
+ "export": 1,
+ "list2": 2,
+ "objs": 2,
+ "should": 1,
+ "not": 1,
+ "be": 1,
+ "exported": 1
},
"Scilab": {
"function": 1,
@@ -40391,14 +61149,48 @@
"esac": 7,
"done": 8,
"exit": 10,
+ "/usr/bin/clear": 2,
"##": 28,
+ "if": 39,
+ "z": 12,
+ "then": 41,
+ "export": 25,
+ "SCREENDIR": 2,
+ "fi": 34,
+ "PATH": 14,
+ "/usr/local/bin": 6,
+ "/usr/local/sbin": 6,
+ "/usr/xpg4/bin": 4,
+ "/usr/sbin": 6,
+ "/usr/bin": 8,
+ "/usr/sfw/bin": 4,
+ "/usr/ccs/bin": 4,
+ "/usr/openwin/bin": 4,
+ "/opt/mysql/current/bin": 4,
+ "MANPATH": 2,
+ "/usr/local/man": 2,
+ "/usr/share/man": 2,
+ "Random": 2,
+ "ENV...": 2,
+ "TERM": 4,
+ "COLORTERM": 2,
+ "CLICOLOR": 2,
+ "#": 53,
+ "can": 3,
+ "be": 3,
+ "set": 21,
+ "to": 33,
+ "anything": 2,
+ "actually": 2,
+ "DISPLAY": 2,
+ "r": 17,
+ "&&": 65,
+ ".": 5,
"function": 6,
"ls": 6,
"command": 5,
"Fh": 2,
"l": 8,
- "#": 53,
- "to": 33,
"list": 3,
"long": 2,
"format...": 2,
@@ -40521,12 +61313,10 @@
"v": 11,
"readonly": 4,
"unset": 10,
- "export": 25,
"and": 5,
"shell": 4,
"variables": 2,
"setopt": 8,
- "set": 21,
"options": 8,
"helptopic": 2,
"help": 5,
@@ -40593,38 +61383,6 @@
"ping": 2,
"histappend": 2,
"PROMPT_COMMAND": 2,
- "PATH": 14,
- "/usr/local/bin": 6,
- "/usr/local/sbin": 6,
- "/usr/xpg4/bin": 4,
- "/usr/sbin": 6,
- "/usr/bin": 8,
- "/usr/sfw/bin": 4,
- "/usr/ccs/bin": 4,
- "/usr/openwin/bin": 4,
- "/opt/mysql/current/bin": 4,
- "/usr/bin/clear": 2,
- "if": 39,
- "z": 12,
- "then": 41,
- "SCREENDIR": 2,
- "fi": 34,
- "MANPATH": 2,
- "/usr/local/man": 2,
- "/usr/share/man": 2,
- "Random": 2,
- "ENV...": 2,
- "TERM": 4,
- "COLORTERM": 2,
- "CLICOLOR": 2,
- "can": 3,
- "be": 3,
- "anything": 2,
- "actually": 2,
- "DISPLAY": 2,
- "r": 17,
- "&&": 65,
- ".": 5,
"umask": 2,
"path": 13,
"/opt/local/bin": 2,
@@ -41104,6 +61862,585 @@
"foodforthought.jpg": 1,
"name##*fo": 1
},
+ "ShellSession": {
+ "echo": 2,
+ "FOOBAR": 2,
+ "Hello": 2,
+ "World": 2,
+ "gem": 4,
+ "install": 4,
+ "nokogiri": 6,
+ "...": 4,
+ "Building": 2,
+ "native": 2,
+ "extensions.": 2,
+ "This": 4,
+ "could": 2,
+ "take": 2,
+ "a": 4,
+ "while...": 2,
+ "checking": 1,
+ "for": 4,
+ "libxml/parser.h...": 1,
+ "***": 2,
+ "extconf.rb": 1,
+ "failed": 1,
+ "Could": 2,
+ "not": 2,
+ "create": 1,
+ "Makefile": 1,
+ "due": 1,
+ "to": 3,
+ "some": 1,
+ "reason": 2,
+ "probably": 1,
+ "lack": 1,
+ "of": 2,
+ "necessary": 1,
+ "libraries": 1,
+ "and/or": 1,
+ "headers.": 1,
+ "Check": 1,
+ "the": 2,
+ "mkmf.log": 1,
+ "file": 1,
+ "more": 1,
+ "details.": 1,
+ "You": 1,
+ "may": 1,
+ "need": 1,
+ "configuration": 1,
+ "options.": 1,
+ "brew": 2,
+ "tap": 2,
+ "homebrew/dupes": 1,
+ "Cloning": 1,
+ "into": 1,
+ "remote": 3,
+ "Counting": 1,
+ "objects": 3,
+ "done.": 4,
+ "Compressing": 1,
+ "%": 5,
+ "(": 6,
+ "/591": 1,
+ ")": 6,
+ "Total": 1,
+ "delta": 2,
+ "reused": 1,
+ "Receiving": 1,
+ "/1034": 1,
+ "KiB": 1,
+ "|": 1,
+ "bytes/s": 1,
+ "Resolving": 1,
+ "deltas": 1,
+ "/560": 1,
+ "Checking": 1,
+ "connectivity...": 1,
+ "done": 1,
+ "Warning": 1,
+ "homebrew/dupes/lsof": 1,
+ "over": 1,
+ "mxcl/master/lsof": 1,
+ "Tapped": 1,
+ "formula": 4,
+ "apple": 1,
+ "-": 12,
+ "gcc42": 1,
+ "Downloading": 1,
+ "http": 2,
+ "//r.research.att.com/tools/gcc": 1,
+ "darwin11.pkg": 1,
+ "########################################################################": 1,
+ "Caveats": 1,
+ "NOTE": 1,
+ "provides": 1,
+ "components": 1,
+ "that": 1,
+ "were": 1,
+ "removed": 1,
+ "from": 3,
+ "XCode": 2,
+ "in": 2,
+ "release.": 1,
+ "There": 1,
+ "is": 2,
+ "no": 1,
+ "this": 1,
+ "if": 1,
+ "you": 1,
+ "are": 1,
+ "using": 1,
+ "version": 1,
+ "prior": 1,
+ "contains": 1,
+ "compilers": 2,
+ "built": 2,
+ "Apple": 1,
+ "s": 1,
+ "GCC": 1,
+ "sources": 1,
+ "build": 1,
+ "available": 1,
+ "//opensource.apple.com/tarballs/gcc": 1,
+ "All": 1,
+ "have": 1,
+ "suffix.": 1,
+ "A": 1,
+ "GFortran": 1,
+ "compiler": 1,
+ "also": 1,
+ "included.": 1,
+ "Summary": 1,
+ "/usr/local/Cellar/apple": 1,
+ "gcc42/4.2.1": 1,
+ "files": 1,
+ "M": 1,
+ "seconds": 1,
+ "v": 1,
+ "Fetching": 1,
+ "Successfully": 1,
+ "installed": 2,
+ "Installing": 2,
+ "ri": 1,
+ "documentation": 2,
+ "RDoc": 1
+ },
+ "Shen": {
+ "*": 47,
+ "graph.shen": 1,
+ "-": 747,
+ "a": 30,
+ "library": 3,
+ "for": 12,
+ "graph": 52,
+ "definition": 1,
+ "and": 16,
+ "manipulation": 1,
+ "Copyright": 2,
+ "(": 267,
+ "C": 6,
+ ")": 250,
+ "Eric": 2,
+ "Schulte": 2,
+ "***": 5,
+ "License": 2,
+ "Redistribution": 2,
+ "use": 2,
+ "in": 13,
+ "source": 4,
+ "binary": 4,
+ "forms": 2,
+ "with": 8,
+ "or": 2,
+ "without": 2,
+ "modification": 2,
+ "are": 7,
+ "permitted": 2,
+ "provided": 4,
+ "that": 3,
+ "the": 29,
+ "following": 6,
+ "conditions": 6,
+ "met": 2,
+ "Redistributions": 4,
+ "of": 20,
+ "code": 2,
+ "must": 4,
+ "retain": 2,
+ "above": 4,
+ "copyright": 4,
+ "notice": 4,
+ "this": 4,
+ "list": 32,
+ "disclaimer.": 2,
+ "form": 2,
+ "reproduce": 2,
+ "disclaimer": 2,
+ "documentation": 2,
+ "and/or": 2,
+ "other": 2,
+ "materials": 2,
+ "distribution.": 2,
+ "THIS": 4,
+ "SOFTWARE": 4,
+ "IS": 2,
+ "PROVIDED": 2,
+ "BY": 2,
+ "THE": 10,
+ "COPYRIGHT": 4,
+ "HOLDERS": 2,
+ "AND": 8,
+ "CONTRIBUTORS": 4,
+ "ANY": 8,
+ "EXPRESS": 2,
+ "OR": 16,
+ "IMPLIED": 4,
+ "WARRANTIES": 4,
+ "INCLUDING": 6,
+ "BUT": 4,
+ "NOT": 4,
+ "LIMITED": 4,
+ "TO": 4,
+ "OF": 16,
+ "MERCHANTABILITY": 2,
+ "FITNESS": 2,
+ "FOR": 4,
+ "A": 32,
+ "PARTICULAR": 2,
+ "PURPOSE": 2,
+ "ARE": 2,
+ "DISCLAIMED.": 2,
+ "IN": 6,
+ "NO": 2,
+ "EVENT": 2,
+ "SHALL": 2,
+ "HOLDER": 2,
+ "BE": 2,
+ "LIABLE": 2,
+ "DIRECT": 2,
+ "INDIRECT": 2,
+ "INCIDENTAL": 2,
+ "SPECIAL": 2,
+ "EXEMPLARY": 2,
+ "CONSEQUENTIAL": 2,
+ "DAMAGES": 2,
+ "PROCUREMENT": 2,
+ "SUBSTITUTE": 2,
+ "GOODS": 2,
+ "SERVICES": 2,
+ ";": 12,
+ "LOSS": 2,
+ "USE": 4,
+ "DATA": 2,
+ "PROFITS": 2,
+ "BUSINESS": 2,
+ "INTERRUPTION": 2,
+ "HOWEVER": 2,
+ "CAUSED": 2,
+ "ON": 2,
+ "THEORY": 2,
+ "LIABILITY": 4,
+ "WHETHER": 2,
+ "CONTRACT": 2,
+ "STRICT": 2,
+ "TORT": 2,
+ "NEGLIGENCE": 2,
+ "OTHERWISE": 2,
+ "ARISING": 2,
+ "WAY": 2,
+ "OUT": 2,
+ "EVEN": 2,
+ "IF": 2,
+ "ADVISED": 2,
+ "POSSIBILITY": 2,
+ "SUCH": 2,
+ "DAMAGE.": 2,
+ "Commentary": 2,
+ "Graphs": 1,
+ "represented": 1,
+ "as": 2,
+ "two": 1,
+ "dictionaries": 1,
+ "one": 2,
+ "vertices": 17,
+ "edges.": 1,
+ "It": 1,
+ "is": 5,
+ "important": 1,
+ "to": 16,
+ "note": 1,
+ "dictionary": 3,
+ "implementation": 1,
+ "used": 2,
+ "able": 1,
+ "accept": 1,
+ "arbitrary": 1,
+ "data": 17,
+ "structures": 1,
+ "keys.": 1,
+ "This": 1,
+ "structure": 2,
+ "technically": 1,
+ "encodes": 1,
+ "hypergraphs": 1,
+ "generalization": 1,
+ "graphs": 1,
+ "which": 1,
+ "each": 1,
+ "edge": 32,
+ "may": 1,
+ "contain": 2,
+ "any": 1,
+ "number": 12,
+ ".": 1,
+ "Examples": 1,
+ "regular": 1,
+ "G": 25,
+ "hypergraph": 1,
+ "H": 3,
+ "corresponding": 1,
+ "given": 4,
+ "below.": 1,
+ "": 3,
+ "Vertices": 11,
+ "Edges": 9,
+ "+": 33,
+ "Graph": 65,
+ "hash": 8,
+ "|": 103,
+ "key": 9,
+ "value": 17,
+ "b": 13,
+ "c": 11,
+ "g": 19,
+ "[": 93,
+ "]": 91,
+ "d": 12,
+ "e": 14,
+ "f": 10,
+ "Hypergraph": 1,
+ "h": 3,
+ "i": 3,
+ "j": 2,
+ "associated": 1,
+ "edge/vertex": 1,
+ "@p": 17,
+ "V": 48,
+ "#": 4,
+ "E": 20,
+ "edges": 17,
+ "M": 4,
+ "vertex": 29,
+ "associations": 1,
+ "size": 2,
+ "all": 3,
+ "stored": 1,
+ "dict": 39,
+ "sizeof": 4,
+ "int": 1,
+ "indices": 1,
+ "into": 1,
+ "&": 1,
+ "Edge": 11,
+ "dicts": 3,
+ "entry": 2,
+ "storage": 2,
+ "Vertex": 3,
+ "Code": 1,
+ "require": 2,
+ "sequence": 2,
+ "datatype": 1,
+ "dictoinary": 1,
+ "vector": 4,
+ "symbol": 1,
+ "package": 2,
+ "add": 25,
+ "has": 5,
+ "neighbors": 8,
+ "connected": 21,
+ "components": 8,
+ "partition": 7,
+ "bipartite": 3,
+ "included": 2,
+ "from": 3,
+ "take": 2,
+ "drop": 2,
+ "while": 2,
+ "range": 1,
+ "flatten": 1,
+ "filter": 2,
+ "complement": 1,
+ "seperate": 1,
+ "zip": 1,
+ "indexed": 1,
+ "reduce": 3,
+ "mapcon": 3,
+ "unique": 3,
+ "frequencies": 1,
+ "shuffle": 1,
+ "pick": 1,
+ "remove": 2,
+ "first": 2,
+ "interpose": 1,
+ "subset": 3,
+ "cartesian": 1,
+ "product": 1,
+ "<-dict>": 5,
+ "contents": 1,
+ "keys": 3,
+ "vals": 1,
+ "make": 10,
+ "define": 34,
+ "X": 4,
+ "<-address>": 5,
+ "0": 1,
+ "create": 1,
+ "specified": 1,
+ "sizes": 2,
+ "}": 22,
+ "Vertsize": 2,
+ "Edgesize": 2,
+ "let": 9,
+ "absvector": 1,
+ "do": 8,
+ "address": 5,
+ "defmacro": 3,
+ "macro": 3,
+ "return": 4,
+ "taking": 1,
+ "optional": 1,
+ "N": 7,
+ "vert": 12,
+ "1": 1,
+ "2": 3,
+ "{": 15,
+ "get": 3,
+ "Value": 3,
+ "if": 8,
+ "tuple": 3,
+ "fst": 3,
+ "error": 7,
+ "string": 3,
+ "resolve": 6,
+ "Vector": 2,
+ "Index": 2,
+ "Place": 6,
+ "nth": 1,
+ "<-vector>": 2,
+ "Vert": 5,
+ "Val": 5,
+ "trap": 4,
+ "snd": 2,
+ "map": 5,
+ "lambda": 1,
+ "w": 4,
+ "B": 2,
+ "Data": 2,
+ "w/o": 5,
+ "D": 4,
+ "update": 5,
+ "an": 3,
+ "s": 1,
+ "Vs": 4,
+ "Store": 6,
+ "<": 4,
+ "limit": 2,
+ "VertLst": 2,
+ "/.": 4,
+ "Contents": 5,
+ "adjoin": 2,
+ "length": 5,
+ "EdgeID": 3,
+ "EdgeLst": 2,
+ "p": 1,
+ "boolean": 4,
+ "Return": 1,
+ "Already": 5,
+ "New": 5,
+ "Reachable": 2,
+ "difference": 3,
+ "append": 1,
+ "including": 1,
+ "itself": 1,
+ "fully": 1,
+ "Acc": 2,
+ "true": 1,
+ "_": 1,
+ "VS": 4,
+ "Component": 6,
+ "ES": 3,
+ "Con": 8,
+ "verts": 4,
+ "cons": 1,
+ "place": 3,
+ "partitions": 1,
+ "element": 2,
+ "simple": 3,
+ "CS": 3,
+ "Neighbors": 3,
+ "empty": 1,
+ "intersection": 1,
+ "check": 1,
+ "tests": 1,
+ "set": 1,
+ "chris": 6,
+ "patton": 2,
+ "eric": 1,
+ "nobody": 2,
+ "fail": 1,
+ "when": 1,
+ "wrapper": 1,
+ "function": 1,
+ "html.shen": 1,
+ "html": 2,
+ "generation": 1,
+ "functions": 1,
+ "shen": 1,
+ "The": 1,
+ "standard": 1,
+ "lisp": 1,
+ "conversion": 1,
+ "tool": 1,
+ "suite.": 1,
+ "Follows": 1,
+ "some": 1,
+ "convertions": 1,
+ "Clojure": 1,
+ "tasks": 1,
+ "stuff": 1,
+ "todo1": 1,
+ "today": 1,
+ "attributes": 1,
+ "AS": 1,
+ "load": 1,
+ "JSON": 1,
+ "Lexer": 1,
+ "Read": 1,
+ "stream": 1,
+ "characters": 4,
+ "Whitespace": 4,
+ "not": 1,
+ "strings": 2,
+ "should": 2,
+ "be": 2,
+ "discarded.": 1,
+ "preserved": 1,
+ "Strings": 1,
+ "can": 1,
+ "escaped": 1,
+ "double": 1,
+ "quotes.": 1,
+ "e.g.": 2,
+ "whitespacep": 2,
+ "ASCII": 2,
+ "Space.": 1,
+ "All": 1,
+ "others": 1,
+ "whitespace": 7,
+ "table.": 1,
+ "Char": 4,
+ "member": 1,
+ "replace": 3,
+ "@s": 4,
+ "Suffix": 4,
+ "where": 2,
+ "Prefix": 2,
+ "fetch": 1,
+ "until": 1,
+ "unescaped": 1,
+ "doublequote": 1,
+ "c#34": 5,
+ "WhitespaceChar": 2,
+ "Chars": 4,
+ "strip": 2,
+ "chars": 2,
+ "tokenise": 1,
+ "JSONString": 2,
+ "CharList": 2,
+ "explode": 1
+ },
"Slash": {
"<%>": 1,
"class": 11,
@@ -41178,6 +62515,695 @@
"ast.eval": 1,
"Env.new": 1
},
+ "Slim": {
+ "doctype": 1,
+ "html": 2,
+ "head": 1,
+ "title": 1,
+ "Slim": 2,
+ "Examples": 1,
+ "meta": 2,
+ "name": 2,
+ "content": 2,
+ "author": 2,
+ "javascript": 1,
+ "alert": 1,
+ "(": 1,
+ ")": 1,
+ "body": 1,
+ "h1": 1,
+ "Markup": 1,
+ "examples": 1,
+ "#content": 1,
+ "p": 2,
+ "This": 1,
+ "example": 1,
+ "shows": 1,
+ "you": 2,
+ "how": 1,
+ "a": 1,
+ "basic": 1,
+ "file": 1,
+ "looks": 1,
+ "like.": 1,
+ "yield": 1,
+ "-": 3,
+ "unless": 1,
+ "items.empty": 1,
+ "table": 1,
+ "for": 1,
+ "item": 1,
+ "in": 1,
+ "items": 2,
+ "do": 1,
+ "tr": 1,
+ "td.name": 1,
+ "item.name": 1,
+ "td.price": 1,
+ "item.price": 1,
+ "else": 1,
+ "|": 2,
+ "No": 1,
+ "found.": 1,
+ "Please": 1,
+ "add": 1,
+ "some": 1,
+ "inventory.": 1,
+ "Thank": 1,
+ "div": 1,
+ "id": 1,
+ "render": 1,
+ "Copyright": 1,
+ "#": 2,
+ "{": 2,
+ "year": 1,
+ "}": 2
+ },
+ "Smalltalk": {
+ "Object": 1,
+ "subclass": 2,
+ "#Philosophers": 1,
+ "instanceVariableNames": 1,
+ "classVariableNames": 1,
+ "poolDictionaries": 1,
+ "category": 1,
+ "Philosophers": 3,
+ "class": 1,
+ "methodsFor": 2,
+ "new": 4,
+ "self": 25,
+ "shouldNotImplement": 1,
+ "quantity": 2,
+ "super": 1,
+ "initialize": 3,
+ "dine": 4,
+ "seconds": 2,
+ "(": 19,
+ "Delay": 3,
+ "forSeconds": 1,
+ ")": 19,
+ "wait.": 5,
+ "philosophers": 2,
+ "do": 1,
+ "[": 18,
+ "each": 5,
+ "|": 18,
+ "terminate": 1,
+ "]": 18,
+ ".": 16,
+ "size": 4,
+ "leftFork": 6,
+ "n": 11,
+ "forks": 5,
+ "at": 3,
+ "rightFork": 6,
+ "ifTrue": 1,
+ "ifFalse": 1,
+ "+": 1,
+ "eating": 3,
+ "Semaphore": 2,
+ "new.": 2,
+ "-": 1,
+ "timesRepeat": 1,
+ "signal": 1,
+ "randy": 3,
+ "Random": 1,
+ "to": 2,
+ "collect": 2,
+ "forMutualExclusion": 1,
+ "philosopher": 2,
+ "philosopherCode": 3,
+ "status": 8,
+ "n.": 2,
+ "printString": 1,
+ "true": 2,
+ "whileTrue": 1,
+ "Transcript": 5,
+ "nextPutAll": 5,
+ ";": 8,
+ "nl.": 5,
+ "forMilliseconds": 2,
+ "next": 2,
+ "*": 2,
+ "critical": 1,
+ "signal.": 2,
+ "newProcess": 1,
+ "priority": 1,
+ "Processor": 1,
+ "userBackgroundPriority": 1,
+ "name": 1,
+ "resume": 1,
+ "yourself": 1,
+ "Koan": 1,
+ "TestBasic": 1,
+ "": 1,
+ "A": 1,
+ "collection": 1,
+ "of": 1,
+ "introductory": 1,
+ "tests": 2,
+ "testDeclarationAndAssignment": 1,
+ "declaration": 2,
+ "anotherDeclaration": 2,
+ "_": 1,
+ "expect": 10,
+ "fillMeIn": 10,
+ "toEqual": 10,
+ "declaration.": 1,
+ "anotherDeclaration.": 1,
+ "testEqualSignIsNotAnAssignmentOperator": 1,
+ "variableA": 6,
+ "variableB": 5,
+ "value": 2,
+ "variableB.": 2,
+ "testMultipleStatementsInASingleLine": 1,
+ "variableC": 2,
+ "variableA.": 1,
+ "variableC.": 1,
+ "testInequality": 1,
+ "testLogicalOr": 1,
+ "expression": 4,
+ "<": 2,
+ "expression.": 2,
+ "testLogicalAnd": 1,
+ "&": 1,
+ "testNot": 1,
+ "not.": 1,
+ "testSimpleChainMatches": 1,
+ "e": 11,
+ "eCtrl": 3,
+ "eventKey": 3,
+ "e.": 1,
+ "ctrl": 5,
+ "true.": 1,
+ "assert": 2,
+ "matches": 4,
+ "{": 4,
+ "}": 4,
+ "eCtrl.": 2,
+ "deny": 2,
+ "a": 1
+ },
+ "SourcePawn": {
+ "//#define": 1,
+ "DEBUG": 2,
+ "#if": 1,
+ "defined": 1,
+ "#define": 7,
+ "assert": 2,
+ "(": 233,
+ "%": 18,
+ ")": 234,
+ "if": 44,
+ "ThrowError": 2,
+ ";": 213,
+ "assert_msg": 2,
+ "#else": 1,
+ "#endif": 1,
+ "#pragma": 1,
+ "semicolon": 1,
+ "#include": 3,
+ "": 1,
+ "": 1,
+ "": 1,
+ "public": 21,
+ "Plugin": 1,
+ "myinfo": 1,
+ "{": 73,
+ "name": 7,
+ "author": 1,
+ "description": 1,
+ "version": 1,
+ "SOURCEMOD_VERSION": 1,
+ "url": 1,
+ "}": 71,
+ "new": 62,
+ "Handle": 51,
+ "g_Cvar_Winlimit": 5,
+ "INVALID_HANDLE": 56,
+ "g_Cvar_Maxrounds": 5,
+ "g_Cvar_Fraglimit": 6,
+ "g_Cvar_Bonusroundtime": 6,
+ "g_Cvar_StartTime": 3,
+ "g_Cvar_StartRounds": 5,
+ "g_Cvar_StartFrags": 3,
+ "g_Cvar_ExtendTimeStep": 2,
+ "g_Cvar_ExtendRoundStep": 2,
+ "g_Cvar_ExtendFragStep": 2,
+ "g_Cvar_ExcludeMaps": 3,
+ "g_Cvar_IncludeMaps": 2,
+ "g_Cvar_NoVoteMode": 2,
+ "g_Cvar_Extend": 2,
+ "g_Cvar_DontChange": 2,
+ "g_Cvar_EndOfMapVote": 8,
+ "g_Cvar_VoteDuration": 3,
+ "g_Cvar_RunOff": 2,
+ "g_Cvar_RunOffPercent": 2,
+ "g_VoteTimer": 7,
+ "g_RetryTimer": 4,
+ "g_MapList": 8,
+ "g_NominateList": 7,
+ "g_NominateOwners": 7,
+ "g_OldMapList": 7,
+ "g_NextMapList": 2,
+ "g_VoteMenu": 1,
+ "g_Extends": 2,
+ "g_TotalRounds": 7,
+ "bool": 10,
+ "g_HasVoteStarted": 7,
+ "g_WaitingForVote": 4,
+ "g_MapVoteCompleted": 9,
+ "g_ChangeMapAtRoundEnd": 6,
+ "g_ChangeMapInProgress": 4,
+ "g_mapFileSerial": 3,
+ "-": 12,
+ "g_NominateCount": 3,
+ "MapChange": 4,
+ "g_ChangeTime": 1,
+ "g_NominationsResetForward": 3,
+ "g_MapVoteStartedForward": 2,
+ "MAXTEAMS": 4,
+ "g_winCount": 4,
+ "[": 19,
+ "]": 19,
+ "VOTE_EXTEND": 1,
+ "VOTE_DONTCHANGE": 1,
+ "OnPluginStart": 1,
+ "LoadTranslations": 2,
+ "arraySize": 5,
+ "ByteCountToCells": 1,
+ "PLATFORM_MAX_PATH": 6,
+ "CreateArray": 5,
+ "CreateConVar": 15,
+ "_": 18,
+ "true": 26,
+ "RegAdminCmd": 2,
+ "Command_Mapvote": 2,
+ "ADMFLAG_CHANGEMAP": 2,
+ "Command_SetNextmap": 2,
+ "FindConVar": 4,
+ "||": 15,
+ "decl": 5,
+ "String": 11,
+ "folder": 5,
+ "GetGameFolderName": 1,
+ "sizeof": 6,
+ "strcmp": 3,
+ "HookEvent": 6,
+ "Event_TeamPlayWinPanel": 3,
+ "Event_TFRestartRound": 2,
+ "else": 5,
+ "Event_RoundEnd": 3,
+ "Event_PlayerDeath": 2,
+ "AutoExecConfig": 1,
+ "//Change": 1,
+ "the": 5,
+ "mp_bonusroundtime": 1,
+ "max": 1,
+ "so": 1,
+ "that": 2,
+ "we": 2,
+ "have": 2,
+ "time": 9,
+ "to": 4,
+ "display": 2,
+ "vote": 6,
+ "//If": 1,
+ "you": 1,
+ "a": 1,
+ "during": 2,
+ "bonus": 2,
+ "good": 1,
+ "defaults": 1,
+ "are": 1,
+ "duration": 1,
+ "and": 1,
+ "mp_bonustime": 1,
+ "SetConVarBounds": 1,
+ "ConVarBound_Upper": 1,
+ "CreateGlobalForward": 2,
+ "ET_Ignore": 2,
+ "Param_String": 1,
+ "Param_Cell": 1,
+ "APLRes": 1,
+ "AskPluginLoad2": 1,
+ "myself": 1,
+ "late": 1,
+ "error": 1,
+ "err_max": 1,
+ "RegPluginLibrary": 1,
+ "CreateNative": 9,
+ "Native_NominateMap": 1,
+ "Native_RemoveNominationByMap": 1,
+ "Native_RemoveNominationByOwner": 1,
+ "Native_InitiateVote": 1,
+ "Native_CanVoteStart": 2,
+ "Native_CheckVoteDone": 2,
+ "Native_GetExcludeMapList": 2,
+ "Native_GetNominatedMapList": 2,
+ "Native_EndOfMapVoteEnabled": 2,
+ "return": 23,
+ "APLRes_Success": 1,
+ "OnConfigsExecuted": 1,
+ "ReadMapList": 1,
+ "MAPLIST_FLAG_CLEARARRAY": 1,
+ "|": 1,
+ "MAPLIST_FLAG_MAPSFOLDER": 1,
+ "LogError": 2,
+ "CreateNextVote": 1,
+ "SetupTimeleftTimer": 3,
+ "false": 8,
+ "ClearArray": 2,
+ "for": 9,
+ "i": 13,
+ "<": 5,
+ "+": 12,
+ "&&": 5,
+ "GetConVarInt": 10,
+ "GetConVarFloat": 2,
+ "<=>": 1,
+ "Warning": 1,
+ "Bonus": 1,
+ "Round": 1,
+ "Time": 2,
+ "shorter": 1,
+ "than": 1,
+ "Vote": 4,
+ "Votes": 1,
+ "round": 1,
+ "may": 1,
+ "not": 1,
+ "complete": 1,
+ "OnMapEnd": 1,
+ "map": 27,
+ "GetCurrentMap": 1,
+ "PushArrayString": 3,
+ "GetArraySize": 8,
+ "RemoveFromArray": 3,
+ "OnClientDisconnect": 1,
+ "client": 9,
+ "index": 8,
+ "FindValueInArray": 1,
+ "oldmap": 4,
+ "GetArrayString": 3,
+ "Call_StartForward": 1,
+ "Call_PushString": 1,
+ "Call_PushCell": 1,
+ "GetArrayCell": 2,
+ "Call_Finish": 1,
+ "Action": 3,
+ "args": 3,
+ "ReplyToCommand": 2,
+ "Plugin_Handled": 4,
+ "GetCmdArg": 1,
+ "IsMapValid": 1,
+ "ShowActivity": 1,
+ "LogAction": 1,
+ "SetNextMap": 1,
+ "OnMapTimeLeftChanged": 1,
+ "GetMapTimeLeft": 1,
+ "startTime": 4,
+ "*": 1,
+ "GetConVarBool": 6,
+ "InitiateVote": 8,
+ "MapChange_MapEnd": 6,
+ "KillTimer": 1,
+ "//g_VoteTimer": 1,
+ "CreateTimer": 3,
+ "float": 2,
+ "Timer_StartMapVote": 3,
+ "TIMER_FLAG_NO_MAPCHANGE": 4,
+ "data": 8,
+ "CreateDataTimer": 1,
+ "WritePackCell": 2,
+ "ResetPack": 1,
+ "timer": 2,
+ "Plugin_Stop": 2,
+ "mapChange": 2,
+ "ReadPackCell": 2,
+ "hndl": 2,
+ "event": 11,
+ "const": 4,
+ "dontBroadcast": 4,
+ "Timer_ChangeMap": 2,
+ "bluescore": 2,
+ "GetEventInt": 7,
+ "redscore": 2,
+ "StrEqual": 1,
+ "CheckMaxRounds": 3,
+ "switch": 1,
+ "case": 2,
+ "CheckWinLimit": 4,
+ "//We": 1,
+ "need": 2,
+ "do": 1,
+ "nothing": 1,
+ "on": 1,
+ "winning_team": 1,
+ "this": 1,
+ "indicates": 1,
+ "stalemate.": 1,
+ "default": 1,
+ "winner": 9,
+ "//": 3,
+ "Nuclear": 1,
+ "Dawn": 1,
+ "SetFailState": 1,
+ "winner_score": 2,
+ "winlimit": 3,
+ "roundcount": 2,
+ "maxrounds": 3,
+ "fragger": 3,
+ "GetClientOfUserId": 1,
+ "GetClientFrags": 1,
+ "when": 2,
+ "inputlist": 1,
+ "IsVoteInProgress": 1,
+ "Can": 1,
+ "t": 7,
+ "be": 1,
+ "excluded": 1,
+ "from": 1,
+ "as": 2,
+ "they": 1,
+ "weren": 1,
+ "nominationsToAdd": 1,
+ "Change": 2,
+ "Extend": 2,
+ "Map": 5,
+ "Voting": 7,
+ "next": 5,
+ "has": 5,
+ "started.": 1,
+ "SM": 5,
+ "Nextmap": 5,
+ "Started": 1,
+ "Current": 2,
+ "Extended": 1,
+ "finished.": 3,
+ "The": 1,
+ "current": 1,
+ "been": 1,
+ "extended.": 1,
+ "Stays": 1,
+ "was": 3,
+ "Finished": 1,
+ "s.": 1,
+ "Runoff": 2,
+ "Starting": 2,
+ "indecisive": 1,
+ "beginning": 1,
+ "runoff": 1,
+ "T": 3,
+ "Dont": 1,
+ "because": 1,
+ "outside": 1,
+ "request": 1,
+ "inputarray": 1,
+ "plugin": 5,
+ "numParams": 5,
+ "CanVoteStart": 1,
+ "array": 3,
+ "GetNativeCell": 3,
+ "size": 2,
+ "maparray": 3,
+ "ownerarray": 3,
+ "If": 1,
+ "optional": 1,
+ "parameter": 1,
+ "an": 1,
+ "owner": 1,
+ "list": 1,
+ "passed": 1,
+ "then": 1,
+ "fill": 1,
+ "out": 1,
+ "well": 1,
+ "PushArrayCell": 1
+ },
+ "SQL": {
+ "IF": 13,
+ "EXISTS": 12,
+ "(": 131,
+ "SELECT": 4,
+ "*": 3,
+ "FROM": 1,
+ "DBO.SYSOBJECTS": 1,
+ "WHERE": 1,
+ "ID": 2,
+ "OBJECT_ID": 1,
+ "N": 7,
+ ")": 131,
+ "AND": 1,
+ "OBJECTPROPERTY": 1,
+ "id": 22,
+ "DROP": 3,
+ "PROCEDURE": 1,
+ "dbo.AvailableInSearchSel": 2,
+ "GO": 4,
+ "CREATE": 10,
+ "Procedure": 1,
+ "AvailableInSearchSel": 1,
+ "AS": 1,
+ "UNION": 2,
+ "ALL": 2,
+ "DB_NAME": 1,
+ "BEGIN": 1,
+ "GRANT": 1,
+ "EXECUTE": 1,
+ "ON": 1,
+ "TO": 1,
+ "[": 1,
+ "rv": 1,
+ "]": 1,
+ "END": 1,
+ "SHOW": 2,
+ "WARNINGS": 2,
+ ";": 31,
+ "-": 496,
+ "Table": 9,
+ "structure": 9,
+ "for": 15,
+ "table": 17,
+ "articles": 4,
+ "TABLE": 10,
+ "NOT": 46,
+ "int": 28,
+ "NULL": 91,
+ "AUTO_INCREMENT": 9,
+ "title": 4,
+ "varchar": 22,
+ "DEFAULT": 22,
+ "content": 2,
+ "longtext": 1,
+ "date_posted": 4,
+ "datetime": 10,
+ "created_by": 2,
+ "last_modified": 2,
+ "last_modified_by": 2,
+ "ordering": 2,
+ "is_published": 2,
+ "PRIMARY": 9,
+ "KEY": 13,
+ "Dumping": 6,
+ "data": 6,
+ "INSERT": 6,
+ "INTO": 6,
+ "VALUES": 6,
+ "challenges": 4,
+ "pkg_name": 2,
+ "description": 2,
+ "text": 1,
+ "author": 2,
+ "category": 2,
+ "visibility": 2,
+ "publish": 2,
+ "abstract": 2,
+ "level": 2,
+ "duration": 2,
+ "goal": 2,
+ "solution": 2,
+ "availability": 2,
+ "default_points": 2,
+ "default_duration": 2,
+ "challenge_attempts": 2,
+ "user_id": 8,
+ "challenge_id": 7,
+ "time": 1,
+ "status": 1,
+ "challenge_attempt_count": 2,
+ "tries": 1,
+ "UNIQUE": 4,
+ "classes": 4,
+ "name": 3,
+ "date_created": 6,
+ "archive": 2,
+ "class_challenges": 4,
+ "class_id": 5,
+ "class_memberships": 4,
+ "users": 4,
+ "username": 3,
+ "full_name": 2,
+ "email": 2,
+ "password": 2,
+ "joined": 2,
+ "last_visit": 2,
+ "is_activated": 2,
+ "type": 3,
+ "token": 3,
+ "user_has_challenge_token": 3,
+ "create": 2,
+ "FILIAL": 10,
+ "NUMBER": 1,
+ "not": 5,
+ "null": 4,
+ "title_ua": 1,
+ "VARCHAR2": 4,
+ "title_ru": 1,
+ "title_eng": 1,
+ "remove_date": 1,
+ "DATE": 2,
+ "modify_date": 1,
+ "modify_user": 1,
+ "alter": 1,
+ "add": 1,
+ "constraint": 1,
+ "PK_ID": 1,
+ "primary": 1,
+ "key": 1,
+ "grant": 8,
+ "select": 10,
+ "on": 8,
+ "to": 8,
+ "ATOLL": 1,
+ "CRAMER2GIS": 1,
+ "DMS": 1,
+ "HPSM2GIS": 1,
+ "PLANMONITOR": 1,
+ "SIEBEL": 1,
+ "VBIS": 1,
+ "VPORTAL": 1,
+ "if": 1,
+ "exists": 1,
+ "from": 2,
+ "sysobjects": 1,
+ "where": 2,
+ "and": 1,
+ "in": 1,
+ "exec": 1,
+ "%": 2,
+ "object_ddl": 1,
+ "go": 1,
+ "use": 1,
+ "translog": 1,
+ "VIEW": 1,
+ "suspendedtoday": 2,
+ "view": 1,
+ "as": 1,
+ "suspended": 1,
+ "datediff": 1,
+ "now": 1
+ },
"Squirrel": {
"//example": 1,
"from": 1,
@@ -41230,127 +63256,1257 @@
"newplayer.MoveTo": 1
},
"Standard ML": {
+ "structure": 15,
+ "LazyBase": 4,
+ "LAZY_BASE": 5,
+ "struct": 13,
+ "type": 6,
+ "a": 78,
+ "exception": 2,
+ "Undefined": 6,
+ "fun": 60,
+ "delay": 6,
+ "f": 46,
+ "force": 18,
+ "(": 840,
+ ")": 845,
+ "val": 147,
+ "undefined": 2,
+ "fn": 127,
+ "raise": 6,
+ "end": 55,
+ "LazyMemoBase": 4,
+ "datatype": 29,
+ "|": 226,
+ "Done": 2,
+ "of": 91,
+ "lazy": 13,
+ "unit": 7,
+ "-": 20,
+ "let": 44,
+ "open": 9,
+ "B": 2,
+ "inject": 5,
+ "x": 74,
+ "isUndefined": 4,
+ "ignore": 3,
+ ";": 21,
+ "false": 32,
+ "handle": 4,
+ "true": 36,
+ "toString": 4,
+ "if": 51,
+ "then": 51,
+ "else": 51,
+ "eqBy": 5,
+ "p": 10,
+ "y": 50,
+ "eq": 3,
+ "op": 2,
+ "compare": 8,
+ "Ops": 3,
+ "map": 3,
+ "Lazy": 2,
+ "LazyFn": 4,
+ "LazyMemo": 2,
"signature": 2,
- "LAZY_BASE": 3,
"sig": 2,
- "type": 2,
- "a": 18,
- "lazy": 12,
- "-": 13,
- ")": 23,
- "end": 6,
"LAZY": 1,
- "bool": 4,
- "val": 12,
- "inject": 3,
- "toString": 2,
- "(": 22,
- "string": 1,
- "eq": 2,
- "*": 1,
- "eqBy": 3,
- "compare": 2,
+ "bool": 9,
+ "string": 14,
+ "*": 9,
"order": 2,
- "map": 2,
- "b": 2,
- "structure": 6,
- "Ops": 2,
- "LazyBase": 2,
- "struct": 4,
- "exception": 1,
- "Undefined": 3,
- "fun": 9,
- "delay": 3,
- "f": 9,
- "force": 9,
- "undefined": 1,
- "fn": 3,
- "raise": 1,
- "LazyMemoBase": 2,
- "datatype": 1,
- "|": 1,
- "Done": 1,
- "of": 1,
- "unit": 1,
- "let": 1,
- "open": 1,
- "B": 1,
- "x": 15,
- "isUndefined": 2,
+ "b": 58,
+ "functor": 2,
+ "Main": 1,
+ "S": 2,
+ "MAIN_STRUCTS": 1,
+ "MAIN": 1,
+ "Compile": 3,
+ "Place": 1,
+ "t": 23,
+ "Files": 3,
+ "Generated": 4,
+ "MLB": 4,
+ "O": 4,
+ "OUT": 3,
+ "SML": 6,
+ "TypeCheck": 3,
+ "toInt": 1,
+ "int": 1,
+ "OptPred": 1,
+ "Target": 1,
+ "Yes": 1,
+ "Show": 1,
+ "Anns": 1,
+ "PathMap": 1,
+ "gcc": 5,
+ "ref": 45,
+ "arScript": 3,
+ "asOpts": 6,
+ "{": 79,
+ "opt": 34,
+ "pred": 15,
+ "OptPred.t": 3,
+ "}": 79,
+ "list": 10,
+ "[": 104,
+ "]": 108,
+ "ccOpts": 6,
+ "linkOpts": 6,
+ "buildConstants": 2,
+ "debugRuntime": 3,
+ "debugFormat": 5,
+ "Dwarf": 3,
+ "DwarfPlus": 3,
+ "Dwarf2": 3,
+ "Stabs": 3,
+ "StabsPlus": 3,
+ "option": 6,
+ "NONE": 47,
+ "expert": 3,
+ "explicitAlign": 3,
+ "Control.align": 1,
+ "explicitChunk": 2,
+ "Control.chunk": 1,
+ "explicitCodegen": 5,
+ "Native": 5,
+ "Explicit": 5,
+ "Control.codegen": 3,
+ "keepGenerated": 3,
+ "keepO": 3,
+ "output": 16,
+ "profileSet": 3,
+ "profileTimeSet": 3,
+ "runtimeArgs": 3,
+ "show": 2,
+ "Show.t": 1,
+ "stop": 10,
+ "Place.OUT": 1,
+ "parseMlbPathVar": 3,
+ "line": 9,
+ "String.t": 1,
+ "case": 83,
+ "String.tokens": 7,
+ "Char.isSpace": 8,
+ "var": 3,
+ "path": 7,
+ "SOME": 68,
+ "_": 83,
+ "readMlbPathMap": 2,
+ "file": 14,
+ "File.t": 12,
+ "not": 1,
+ "File.canRead": 1,
+ "Error.bug": 14,
+ "concat": 52,
+ "List.keepAllMap": 4,
+ "File.lines": 2,
+ "String.forall": 4,
+ "v": 4,
+ "targetMap": 5,
+ "arch": 11,
+ "MLton.Platform.Arch.t": 3,
+ "os": 13,
+ "MLton.Platform.OS.t": 3,
+ "target": 28,
+ "Promise.lazy": 1,
+ "targetsDir": 5,
+ "OS.Path.mkAbsolute": 4,
+ "relativeTo": 4,
+ "Control.libDir": 1,
+ "potentialTargets": 2,
+ "Dir.lsDirs": 1,
+ "targetDir": 5,
+ "osFile": 2,
+ "OS.Path.joinDirFile": 3,
+ "dir": 4,
+ "archFile": 2,
+ "File.contents": 2,
+ "List.first": 2,
+ "MLton.Platform.OS.fromString": 1,
+ "MLton.Platform.Arch.fromString": 1,
+ "in": 40,
+ "setTargetType": 3,
+ "usage": 48,
+ "List.peek": 7,
+ "...": 23,
+ "Control": 3,
+ "Target.arch": 2,
+ "Target.os": 2,
+ "hasCodegen": 8,
+ "cg": 21,
+ "z": 73,
+ "Control.Target.arch": 4,
+ "Control.Target.os": 2,
+ "Control.Format.t": 1,
+ "AMD64": 2,
+ "x86Codegen": 9,
+ "X86": 3,
+ "amd64Codegen": 8,
+ "<": 3,
+ "Darwin": 6,
+ "orelse": 7,
+ "Control.format": 3,
+ "Executable": 5,
+ "Archive": 4,
+ "hasNativeCodegen": 2,
+ "defaultAlignIs8": 3,
+ "Alpha": 1,
+ "ARM": 1,
+ "HPPA": 1,
+ "IA64": 1,
+ "MIPS": 1,
+ "Sparc": 1,
+ "S390": 1,
+ "makeOptions": 3,
+ "s": 168,
+ "Fail": 2,
+ "reportAnnotation": 4,
+ "flag": 12,
+ "e": 18,
+ "Control.Elaborate.Bad": 1,
+ "Control.Elaborate.Deprecated": 1,
+ "ids": 2,
+ "Control.warnDeprecated": 1,
+ "Out.output": 2,
+ "Out.error": 3,
+ "List.toString": 1,
+ "Control.Elaborate.Id.name": 1,
+ "Control.Elaborate.Good": 1,
+ "Control.Elaborate.Other": 1,
+ "Popt": 1,
+ "tokenizeOpt": 4,
+ "opts": 4,
+ "List.foreach": 5,
+ "tokenizeTargetOpt": 4,
+ "List.map": 3,
+ "Normal": 29,
+ "SpaceString": 48,
+ "Align4": 2,
+ "Align8": 2,
+ "Expert": 72,
+ "o": 8,
+ "List.push": 22,
+ "OptPred.Yes": 6,
+ "boolRef": 20,
+ "ChunkPerFunc": 1,
+ "OneChunk": 1,
+ "String.hasPrefix": 2,
+ "prefix": 3,
+ "String.dropPrefix": 1,
+ "Char.isDigit": 3,
+ "Int.fromString": 4,
+ "n": 4,
+ "Coalesce": 1,
+ "limit": 1,
+ "Bool": 10,
+ "closureConvertGlobalize": 1,
+ "closureConvertShrink": 1,
+ "String.concatWith": 2,
+ "Control.Codegen.all": 2,
+ "Control.Codegen.toString": 2,
+ "name": 7,
+ "value": 4,
+ "Compile.setCommandLineConstant": 2,
+ "contifyIntoMain": 1,
+ "debug": 4,
+ "Control.Elaborate.processDefault": 1,
+ "Control.defaultChar": 1,
+ "Control.defaultInt": 5,
+ "Control.defaultReal": 2,
+ "Control.defaultWideChar": 2,
+ "Control.defaultWord": 4,
+ "Regexp.fromString": 7,
+ "re": 34,
+ "Regexp.compileDFA": 4,
+ "diagPasses": 1,
+ "Control.Elaborate.processEnabled": 2,
+ "dropPasses": 1,
+ "intRef": 8,
+ "errorThreshhold": 1,
+ "emitMain": 1,
+ "exportHeader": 3,
+ "Control.Format.all": 2,
+ "Control.Format.toString": 2,
+ "gcCheck": 1,
+ "Limit": 1,
+ "First": 1,
+ "Every": 1,
+ "Native.IEEEFP": 1,
+ "indentation": 1,
+ "Int": 8,
+ "i": 8,
+ "inlineNonRec": 6,
+ "small": 19,
+ "product": 19,
+ "#product": 1,
+ "inlineIntoMain": 1,
+ "loops": 18,
+ "inlineLeafA": 6,
+ "repeat": 18,
+ "size": 19,
+ "inlineLeafB": 6,
+ "keepCoreML": 1,
+ "keepDot": 1,
+ "keepMachine": 1,
+ "keepRSSA": 1,
+ "keepSSA": 1,
+ "keepSSA2": 1,
+ "keepSXML": 1,
+ "keepXML": 1,
+ "keepPasses": 1,
+ "libname": 9,
+ "loopPasses": 1,
+ "Int.toString": 3,
+ "markCards": 1,
+ "maxFunctionSize": 1,
+ "mlbPathVars": 4,
+ "@": 3,
+ "Native.commented": 1,
+ "Native.copyProp": 1,
+ "Native.cutoff": 1,
+ "Native.liveTransfer": 1,
+ "Native.liveStack": 1,
+ "Native.moveHoist": 1,
+ "Native.optimize": 1,
+ "Native.split": 1,
+ "Native.shuffle": 1,
+ "err": 1,
+ "optimizationPasses": 1,
+ "il": 10,
+ "set": 10,
+ "Result.Yes": 6,
+ "Result.No": 5,
+ "polyvariance": 9,
+ "hofo": 12,
+ "rounds": 12,
+ "preferAbsPaths": 1,
+ "profPasses": 1,
+ "profile": 6,
+ "ProfileNone": 2,
+ "ProfileAlloc": 1,
+ "ProfileCallStack": 3,
+ "ProfileCount": 1,
+ "ProfileDrop": 1,
+ "ProfileLabel": 1,
+ "ProfileTimeLabel": 4,
+ "ProfileTimeField": 2,
+ "profileBranch": 1,
+ "Regexp": 3,
+ "seq": 3,
+ "anys": 6,
+ "compileDFA": 3,
+ "profileC": 1,
+ "profileInclExcl": 2,
+ "profileIL": 3,
+ "ProfileSource": 1,
+ "ProfileSSA": 1,
+ "ProfileSSA2": 1,
+ "profileRaise": 2,
+ "profileStack": 1,
+ "profileVal": 1,
+ "Show.Anns": 1,
+ "Show.PathMap": 1,
+ "showBasis": 1,
+ "showDefUse": 1,
+ "showTypes": 1,
+ "Control.optimizationPasses": 4,
+ "String.equals": 4,
+ "Place.Files": 2,
+ "Place.Generated": 2,
+ "Place.O": 3,
+ "Place.TypeCheck": 1,
+ "#target": 2,
+ "Self": 2,
+ "Cross": 2,
+ "SpaceString2": 6,
+ "OptPred.Target": 6,
+ "#1": 1,
+ "trace": 4,
+ "#2": 2,
+ "typeCheck": 1,
+ "verbosity": 4,
+ "Silent": 3,
+ "Top": 5,
+ "Pass": 1,
+ "Detail": 1,
+ "warnAnn": 1,
+ "warnDeprecated": 1,
+ "zoneCutDepth": 1,
+ "style": 6,
+ "arg": 3,
+ "desc": 3,
+ "mainUsage": 3,
+ "parse": 2,
+ "Popt.makeUsage": 1,
+ "showExpert": 1,
+ "commandLine": 5,
+ "args": 8,
+ "lib": 2,
+ "libDir": 2,
+ "OS.Path.mkCanonical": 1,
+ "result": 1,
+ "targetStr": 3,
+ "libTargetDir": 1,
+ "targetArch": 4,
+ "archStr": 1,
+ "String.toLower": 2,
+ "MLton.Platform.Arch.toString": 2,
+ "targetOS": 5,
+ "OSStr": 2,
+ "MLton.Platform.OS.toString": 1,
+ "positionIndependent": 3,
+ "format": 7,
+ "MinGW": 4,
+ "Cygwin": 4,
+ "Library": 6,
+ "LibArchive": 3,
+ "Control.positionIndependent": 1,
+ "align": 1,
+ "codegen": 4,
+ "CCodegen": 1,
+ "MLton.Rusage.measureGC": 1,
+ "exnHistory": 1,
+ "Bool.toString": 1,
+ "Control.profile": 1,
+ "Control.ProfileCallStack": 1,
+ "sizeMap": 1,
+ "Control.libTargetDir": 1,
+ "ty": 4,
+ "Bytes.toBits": 1,
+ "Bytes.fromInt": 1,
+ "lookup": 4,
+ "use": 2,
+ "on": 1,
+ "must": 1,
+ "x86": 1,
+ "with": 1,
+ "ieee": 1,
+ "fp": 1,
+ "can": 1,
+ "No": 1,
+ "Out.standard": 1,
+ "input": 22,
+ "rest": 3,
+ "inputFile": 1,
+ "File.base": 5,
+ "File.fileOf": 1,
+ "start": 6,
+ "base": 3,
+ "rec": 1,
+ "loop": 3,
+ "suf": 14,
+ "hasNum": 2,
+ "sufs": 2,
+ "String.hasSuffix": 2,
+ "suffix": 8,
+ "Place.t": 1,
+ "List.exists": 1,
+ "File.withIn": 1,
+ "csoFiles": 1,
+ "Place.compare": 1,
+ "GREATER": 5,
+ "Place.toString": 2,
+ "EQUAL": 5,
+ "LESS": 5,
+ "printVersion": 1,
+ "tempFiles": 3,
+ "tmpDir": 2,
+ "tmpVar": 2,
+ "default": 2,
+ "MLton.Platform.OS.host": 2,
+ "Process.getEnv": 1,
+ "d": 32,
+ "temp": 3,
+ "out": 9,
+ "File.temp": 1,
+ "OS.Path.concat": 1,
+ "Out.close": 2,
+ "maybeOut": 10,
+ "maybeOutBase": 4,
+ "File.extension": 3,
+ "outputBase": 2,
+ "ext": 1,
+ "OS.Path.splitBaseExt": 1,
+ "defLibname": 6,
+ "OS.Path.splitDirFile": 1,
+ "String.extract": 1,
+ "toAlNum": 2,
+ "c": 42,
+ "Char.isAlphaNum": 1,
+ "#": 3,
+ "CharVector.map": 1,
+ "atMLtons": 1,
+ "Vector.fromList": 1,
+ "tokenize": 1,
+ "rev": 2,
+ "gccDebug": 3,
+ "asDebug": 2,
+ "compileO": 3,
+ "inputs": 7,
+ "libOpts": 2,
+ "System.system": 4,
+ "List.concat": 4,
+ "linkArchives": 1,
+ "String.contains": 1,
+ "File.move": 1,
+ "from": 1,
+ "to": 1,
+ "mkOutputO": 3,
+ "Counter.t": 3,
+ "File.dirOf": 2,
+ "Counter.next": 1,
+ "compileC": 2,
+ "debugSwitches": 2,
+ "compileS": 2,
+ "compileCSO": 1,
+ "List.forall": 1,
+ "Counter.new": 1,
+ "oFiles": 2,
+ "List.fold": 1,
+ "ac": 4,
+ "extension": 6,
+ "Option.toString": 1,
+ "mkCompileSrc": 1,
+ "listFiles": 2,
+ "elaborate": 1,
+ "compile": 2,
+ "outputs": 2,
+ "r": 3,
+ "make": 1,
+ "Int.inc": 1,
+ "Out.openOut": 1,
+ "print": 4,
+ "outputHeader": 2,
+ "done": 3,
+ "Control.No": 1,
+ "l": 2,
+ "Layout.output": 1,
+ "Out.newline": 1,
+ "Vector.foreach": 1,
+ "String.translate": 1,
+ "/": 1,
+ "Type": 1,
+ "Check": 1,
+ ".c": 1,
+ ".s": 1,
+ "invalid": 1,
+ "MLton": 1,
+ "Exn.finally": 1,
+ "File.remove": 1,
+ "doit": 1,
+ "Process.makeCommandLine": 1,
+ "main": 1,
+ "mainWrapped": 1,
+ "OS.Process.exit": 1,
+ "CommandLine.arguments": 1,
+ "RedBlackTree": 1,
+ "key": 16,
+ "entry": 12,
+ "dict": 17,
+ "Empty": 15,
+ "Red": 41,
+ "local": 1,
+ "lk": 4,
+ "tree": 4,
+ "and": 2,
+ "zipper": 3,
+ "TOP": 5,
+ "LEFTB": 10,
+ "RIGHTB": 10,
+ "delete": 3,
+ "zip": 19,
+ "Black": 40,
+ "LEFTR": 8,
+ "RIGHTR": 9,
+ "bbZip": 28,
+ "w": 17,
+ "delMin": 8,
+ "Match": 1,
+ "joinRed": 3,
+ "needB": 2,
+ "del": 8,
+ "NotFound": 2,
+ "entry1": 16,
+ "as": 7,
+ "key1": 8,
+ "datum1": 4,
+ "joinBlack": 1,
+ "insertShadow": 3,
+ "datum": 1,
+ "oldEntry": 7,
+ "ins": 8,
+ "left": 10,
+ "right": 10,
+ "restore_left": 1,
+ "restore_right": 1,
+ "app": 3,
+ "ap": 7,
+ "new": 1,
+ "insert": 2,
+ "table": 14,
+ "clear": 1
+ },
+ "Stata": {
+ "local": 6,
+ "inname": 1,
+ "outname": 1,
+ "program": 2,
+ "hello": 1,
+ "vers": 1,
+ "display": 1,
+ "end": 4,
+ "{": 441,
+ "*": 25,
+ "version": 2,
+ "mar2014": 1,
+ "}": 440,
+ "...": 30,
+ "Hello": 1,
+ "world": 1,
+ "p_end": 47,
+ "MAXDIM": 1,
+ "smcl": 1,
+ "Matthew": 2,
+ "White": 2,
+ "jan2014": 1,
+ "title": 7,
+ "Title": 1,
+ "phang": 4,
+ "cmd": 111,
+ "odkmeta": 17,
+ "hline": 1,
+ "Create": 4,
+ "a": 30,
+ "do": 22,
+ "-": 42,
+ "file": 18,
+ "to": 23,
+ "import": 9,
+ "ODK": 6,
+ "data": 4,
+ "marker": 10,
+ "syntax": 1,
+ "Syntax": 1,
+ "p": 2,
+ "using": 10,
+ "it": 61,
+ "help": 27,
+ "filename": 3,
+ "opt": 25,
+ "csv": 9,
+ "(": 60,
+ "csvfile": 3,
+ ")": 61,
+ "Using": 7,
+ "histogram": 2,
+ "as": 29,
+ "template.": 8,
+ "notwithstanding": 1,
+ "is": 31,
+ "rarely": 1,
+ "preceded": 3,
+ "by": 7,
+ "an": 6,
+ "underscore.": 1,
+ "cmdab": 5,
+ "s": 10,
+ "urvey": 2,
+ "surveyfile": 5,
+ "odkmeta##surveyopts": 2,
+ "surveyopts": 4,
+ "cho": 2,
+ "ices": 2,
+ "choicesfile": 4,
+ "odkmeta##choicesopts": 2,
+ "choicesopts": 5,
+ "[": 6,
+ "options": 1,
+ "]": 6,
+ "odbc": 2,
+ "the": 67,
+ "position": 1,
+ "of": 36,
+ "last": 1,
+ "character": 1,
+ "in": 24,
+ "first": 2,
+ "column": 18,
+ "+": 2,
+ "synoptset": 5,
+ "tabbed": 4,
+ "synopthdr": 4,
+ "synoptline": 8,
+ "syntab": 6,
+ "Main": 3,
+ "heckman": 2,
+ "p2coldent": 3,
+ "name": 20,
+ ".csv": 2,
+ "that": 21,
+ "contains": 3,
+ "metadata": 5,
+ "from": 6,
+ "survey": 14,
+ "worksheet": 5,
+ "choices": 10,
+ "Fields": 2,
+ "synopt": 16,
+ "drop": 1,
+ "attrib": 2,
+ "headers": 8,
+ "not": 8,
+ "field": 25,
+ "attributes": 10,
+ "with": 10,
+ "keep": 1,
+ "only": 3,
+ "rel": 1,
+ "ax": 1,
"ignore": 1,
- ";": 1,
+ "fields": 7,
+ "exist": 1,
+ "Lists": 1,
+ "ca": 1,
+ "oth": 1,
+ "er": 1,
+ "odkmeta##other": 1,
+ "other": 14,
+ "Stata": 5,
+ "value": 14,
+ "values": 3,
+ "select": 6,
+ "or_other": 5,
+ ";": 15,
+ "default": 8,
+ "max": 2,
+ "one": 5,
+ "line": 4,
+ "write": 1,
+ "each": 7,
+ "list": 13,
+ "on": 7,
+ "single": 1,
+ "Options": 1,
+ "replace": 7,
+ "overwrite": 1,
+ "existing": 1,
+ "p2colreset": 4,
+ "and": 18,
+ "are": 13,
+ "required.": 1,
+ "Change": 1,
+ "t": 2,
+ "ype": 1,
+ "header": 15,
+ "type": 7,
+ "attribute": 10,
+ "la": 2,
+ "bel": 2,
+ "label": 9,
+ "d": 1,
+ "isabled": 1,
+ "disabled": 4,
+ "li": 1,
+ "stname": 1,
+ "list_name": 6,
+ "maximum": 3,
+ "plus": 2,
+ "min": 2,
+ "minimum": 2,
+ "minus": 1,
+ "#": 6,
+ "constant": 2,
+ "for": 13,
+ "all": 3,
+ "labels": 8,
+ "description": 1,
+ "Description": 1,
+ "pstd": 20,
+ "creates": 1,
+ "worksheets": 1,
+ "XLSForm.": 1,
+ "The": 9,
+ "saved": 1,
+ "completes": 2,
+ "following": 1,
+ "tasks": 3,
+ "order": 1,
+ "anova": 1,
+ "phang2": 23,
+ "o": 12,
+ "Import": 2,
+ "lists": 2,
+ "Add": 1,
+ "char": 4,
+ "characteristics": 4,
+ "Split": 1,
+ "select_multiple": 6,
+ "variables": 8,
+ "Drop": 1,
+ "note": 1,
+ "format": 1,
+ "Format": 1,
+ "date": 1,
+ "time": 1,
+ "datetime": 1,
+ "Attach": 2,
+ "variable": 14,
+ "notes": 1,
+ "merge": 3,
+ "Merge": 1,
+ "repeat": 6,
+ "groups": 4,
+ "After": 1,
+ "have": 2,
+ "been": 1,
+ "split": 4,
+ "can": 1,
+ "be": 12,
+ "removed": 1,
+ "without": 2,
+ "affecting": 1,
+ "tasks.": 1,
+ "User": 1,
+ "written": 2,
+ "supplements": 1,
+ "may": 2,
+ "make": 1,
+ "use": 3,
+ "any": 3,
+ "which": 6,
+ "imported": 4,
+ "characteristics.": 1,
+ "remarks": 1,
+ "Remarks": 1,
+ "uses": 3,
+ "helpb": 7,
+ "insheet": 4,
+ "data.": 1,
+ "long": 7,
+ "strings": 1,
+ "digits": 1,
+ "such": 2,
+ "simserial": 1,
+ "will": 9,
+ "numeric": 4,
+ "even": 1,
+ "if": 10,
+ "they": 2,
+ "more": 1,
+ "than": 3,
+ "digits.": 1,
+ "As": 1,
+ "result": 6,
+ "lose": 1,
+ "precision": 1,
+ ".": 22,
+ "makes": 1,
+ "limited": 1,
+ "mata": 1,
+ "Mata": 1,
+ "manage": 1,
+ "contain": 1,
+ "difficult": 1,
+ "characters.": 2,
+ "starts": 1,
+ "definitions": 1,
+ "several": 1,
+ "macros": 1,
+ "these": 4,
+ "constants": 1,
+ "uses.": 1,
+ "For": 4,
+ "instance": 1,
+ "macro": 1,
+ "datemask": 1,
+ "varname": 1,
+ "constraints": 1,
+ "names": 16,
+ "Further": 1,
+ "files": 1,
+ "often": 1,
+ "much": 1,
+ "longer": 1,
+ "length": 3,
+ "limit": 1,
+ "These": 2,
+ "differences": 1,
+ "convention": 1,
+ "lead": 1,
+ "three": 1,
+ "kinds": 1,
+ "problematic": 1,
+ "Long": 3,
+ "involve": 1,
+ "invalid": 1,
+ "combination": 1,
+ "characters": 3,
+ "example": 2,
+ "begins": 1,
+ "colon": 1,
+ "followed": 1,
+ "number.": 1,
+ "convert": 2,
+ "instead": 1,
+ "naming": 1,
+ "v": 6,
+ "concatenated": 1,
+ "positive": 1,
+ "integer": 1,
+ "v1": 1,
+ "unique": 1,
+ "but": 4,
+ "when": 1,
+ "converted": 3,
+ "truncated": 1,
+ "become": 3,
+ "duplicates.": 1,
+ "again": 1,
+ "names.": 6,
+ "form": 1,
+ "duplicates": 1,
+ "cannot": 2,
+ "chooses": 1,
+ "different": 1,
+ "Because": 1,
+ "problem": 2,
+ "recommended": 1,
+ "you": 1,
+ "If": 2,
+ "its": 3,
+ "characteristic": 2,
+ "odkmeta##Odk_bad_name": 1,
+ "Odk_bad_name": 3,
+ "otherwise": 1,
+ "Most": 1,
+ "depend": 1,
+ "There": 1,
+ "two": 2,
+ "exceptions": 1,
+ "variables.": 1,
+ "error": 4,
+ "has": 6,
+ "or": 7,
+ "splitting": 2,
+ "would": 1,
+ "duplicate": 4,
+ "reshape": 2,
+ "groups.": 1,
+ "there": 2,
+ "merging": 2,
+ "code": 1,
+ "datasets.": 1,
+ "Where": 1,
+ "renaming": 2,
+ "left": 1,
+ "user.": 1,
+ "section": 2,
+ "designated": 2,
+ "area": 2,
+ "renaming.": 3,
+ "In": 3,
+ "reshaping": 1,
+ "group": 4,
+ "own": 2,
+ "Many": 1,
+ "forms": 2,
+ "require": 1,
+ "others": 1,
+ "few": 1,
+ "need": 1,
+ "renamed": 1,
+ "should": 1,
+ "go": 1,
+ "areas.": 1,
+ "However": 1,
+ "some": 1,
+ "usually": 1,
+ "because": 1,
+ "many": 2,
+ "nested": 2,
+ "above": 1,
+ "this": 1,
+ "case": 1,
+ "work": 1,
+ "best": 1,
+ "Odk_group": 1,
+ "Odk_name": 1,
+ "Odk_is_other": 2,
+ "Odk_geopoint": 2,
+ "r": 2,
+ "varlist": 2,
+ "Odk_list_name": 2,
+ "foreach": 1,
+ "var": 5,
+ "*search": 1,
+ "n/a": 1,
+ "know": 1,
+ "don": 1,
+ "worksheet.": 1,
+ "requires": 1,
+ "comma": 1,
+ "separated": 2,
+ "text": 1,
+ "file.": 1,
+ "Strings": 1,
+ "embedded": 2,
+ "commas": 1,
+ "double": 3,
+ "quotes": 3,
+ "must": 2,
+ "enclosed": 1,
+ "another": 1,
+ "quote.": 1,
+ "pmore": 5,
+ "Each": 1,
+ "header.": 1,
+ "Use": 1,
+ "suboptions": 1,
+ "specify": 1,
+ "alternative": 1,
+ "respectively.": 1,
+ "All": 1,
+ "used.": 1,
+ "standardized": 1,
+ "follows": 1,
+ "replaced": 9,
+ "select_one": 3,
+ "begin_group": 1,
+ "begin": 2,
+ "end_group": 1,
+ "begin_repeat": 1,
+ "end_repeat": 1,
+ "addition": 1,
+ "specified": 1,
+ "attaches": 1,
+ "pmore2": 3,
+ "formed": 1,
+ "concatenating": 1,
+ "elements": 1,
+ "Odk_repeat": 1,
+ "nested.": 1,
+ "geopoint": 2,
+ "component": 1,
+ "Latitude": 1,
+ "Longitude": 1,
+ "Altitude": 1,
+ "Accuracy": 1,
+ "blank.": 1,
+ "imports": 4,
+ "XLSForm": 1,
+ "list.": 1,
+ "one.": 1,
+ "specifies": 4,
+ "vary": 1,
+ "definition": 1,
+ "rather": 1,
+ "multiple": 1,
+ "delimit": 1,
+ "#delimit": 1,
+ "dlgtab": 1,
+ "Other": 1,
+ "already": 2,
+ "exists.": 1,
+ "examples": 1,
+ "Examples": 1,
+ "named": 1,
+ "import.do": 7,
+ "including": 1,
+ "survey.csv": 1,
+ "choices.csv": 1,
+ "txt": 6,
+ "Same": 3,
+ "previous": 3,
+ "command": 3,
+ "appears": 2,
+ "fieldname": 3,
+ "survey_fieldname.csv": 1,
+ "valuename": 2,
+ "choices_valuename.csv": 1,
+ "except": 1,
+ "hint": 2,
+ "dropattrib": 2,
+ "does": 1,
+ "_all": 1,
+ "acknowledgements": 1,
+ "Acknowledgements": 1,
+ "Lindsey": 1,
+ "Shaughnessy": 1,
+ "Innovations": 2,
+ "Poverty": 2,
+ "Action": 2,
+ "assisted": 1,
+ "almost": 1,
+ "aspects": 1,
+ "development.": 1,
+ "She": 1,
+ "collaborated": 1,
+ "structure": 1,
+ "was": 1,
+ "very": 1,
+ "helpful": 1,
+ "tester": 1,
+ "contributed": 1,
+ "information": 1,
+ "about": 1,
+ "ODK.": 1,
+ "author": 1,
+ "Author": 1,
+ "mwhite@poverty": 1,
+ "action.org": 1,
+ "Setup": 1,
+ "sysuse": 1,
+ "auto": 1,
+ "Fit": 2,
+ "linear": 2,
+ "regression": 2,
+ "regress": 5,
+ "mpg": 1,
+ "weight": 4,
+ "foreign": 2,
+ "better": 1,
+ "physics": 1,
+ "standpoint": 1,
+ "gen": 1,
+ "gp100m": 2,
+ "/mpg": 1,
+ "Obtain": 1,
+ "beta": 2,
+ "coefficients": 1,
+ "refitting": 1,
+ "model": 1,
+ "Suppress": 1,
+ "intercept": 1,
+ "term": 1,
+ "noconstant": 1,
+ "Model": 1,
+ "bn.foreign": 1,
+ "hascons": 1,
+ "matrix": 3,
+ "tanh": 1,
+ "u": 3,
+ "eu": 4,
+ "emu": 4,
+ "exp": 2,
+ "return": 1,
+ "/": 1
+ },
+ "STON": {
+ "[": 11,
+ "]": 11,
+ "{": 15,
+ "#a": 1,
+ "#b": 1,
+ "}": 15,
+ "Rectangle": 1,
+ "#origin": 1,
+ "Point": 2,
+ "-": 2,
+ "#corner": 1,
+ "TestDomainObject": 1,
+ "#created": 1,
+ "DateAndTime": 2,
+ "#modified": 1,
+ "#integer": 1,
+ "#float": 1,
+ "#description": 1,
+ "#color": 1,
+ "#green": 1,
+ "#tags": 1,
+ "#two": 1,
+ "#beta": 1,
+ "#medium": 1,
+ "#bytes": 1,
+ "ByteArray": 1,
+ "#boolean": 1,
"false": 1,
- "handle": 1,
- "true": 1,
- "if": 1,
- "then": 1,
- "else": 1,
- "p": 4,
- "y": 6,
- "op": 1,
- "Lazy": 1,
- "LazyFn": 2,
- "LazyMemo": 1
+ "ZnResponse": 1,
+ "#headers": 2,
+ "ZnHeaders": 1,
+ "ZnMultiValueDictionary": 1,
+ "#entity": 1,
+ "ZnStringEntity": 1,
+ "#contentType": 1,
+ "ZnMimeType": 1,
+ "#main": 1,
+ "#sub": 1,
+ "#parameters": 1,
+ "#contentLength": 1,
+ "#string": 1,
+ "#encoder": 1,
+ "ZnUTF8Encoder": 1,
+ "#statusLine": 1,
+ "ZnStatusLine": 1,
+ "#version": 1,
+ "#code": 1,
+ "#reason": 1
+ },
+ "Stylus": {
+ "border": 6,
+ "-": 10,
+ "radius": 5,
+ "(": 1,
+ ")": 1,
+ "webkit": 1,
+ "arguments": 3,
+ "moz": 1,
+ "a.button": 1,
+ "px": 5,
+ "fonts": 2,
+ "helvetica": 1,
+ "arial": 1,
+ "sans": 1,
+ "serif": 1,
+ "body": 1,
+ "{": 1,
+ "padding": 3,
+ ";": 2,
+ "font": 1,
+ "px/1.4": 1,
+ "}": 1,
+ "form": 2,
+ "input": 2,
+ "[": 2,
+ "type": 2,
+ "text": 2,
+ "]": 2,
+ "solid": 1,
+ "#eee": 1,
+ "color": 2,
+ "#ddd": 1,
+ "textarea": 1,
+ "@extends": 2,
+ "foo": 2,
+ "#FFF": 1,
+ ".bar": 1,
+ "background": 1,
+ "#000": 1
},
"SuperCollider": {
- "BCR2000": 1,
- "{": 14,
- "var": 2,
- "controls": 2,
- "controlBuses": 2,
- "rangedControlBuses": 2,
- "responders": 2,
- ";": 32,
- "*new": 1,
- "super.new.init": 1,
- "}": 14,
- "init": 1,
- "Dictionary.new": 3,
- "(": 34,
- ")": 34,
- "this.createCCResponders": 1,
- "createCCResponders": 1,
- "Array.fill": 1,
- "|": 4,
- "i": 5,
- "CCResponder": 1,
- "src": 3,
- "chan": 3,
- "num": 3,
- "val": 4,
- "[": 3,
- "]": 3,
- ".postln": 1,
- "controls.put": 1,
- "+": 4,
- "controlBuses.put": 1,
- "Bus.control": 1,
- "Server.default": 1,
- "controlBuses.at": 2,
- ".value": 1,
- "/": 2,
- "nil": 4,
- "//": 4,
- "value": 1,
- "at": 1,
- "arg": 4,
- "controlNum": 6,
- "controls.at": 2,
- "scalarAt": 1,
- "busAt": 1,
"//boot": 1,
"server": 1,
"s.boot": 1,
+ ";": 18,
+ "(": 22,
"SynthDef": 1,
+ "{": 5,
+ "var": 1,
"sig": 7,
"resfreq": 3,
"Saw.ar": 1,
+ ")": 22,
"SinOsc.kr": 1,
"*": 3,
+ "+": 1,
"RLPF.ar": 1,
"Out.ar": 1,
+ "}": 5,
".play": 2,
"do": 2,
+ "arg": 1,
+ "i": 1,
"Pan2.ar": 1,
"SinOsc.ar": 1,
"exprand": 1,
@@ -41367,6 +64523,8 @@
"a.test.plot": 1,
"b.test.plot": 1,
"Env": 1,
+ "[": 2,
+ "]": 2,
".plot": 2,
"e": 1,
"Env.sine.asStream": 1,
@@ -41374,48 +64532,919 @@
"wait": 1,
".fork": 1
},
+ "Swift": {
+ "let": 43,
+ "apples": 1,
+ "oranges": 1,
+ "appleSummary": 1,
+ "fruitSummary": 1,
+ "var": 42,
+ "shoppingList": 3,
+ "[": 18,
+ "]": 18,
+ "occupations": 2,
+ "emptyArray": 1,
+ "String": 27,
+ "(": 89,
+ ")": 89,
+ "emptyDictionary": 1,
+ "Dictionary": 1,
+ "": 1,
+ "Float": 1,
+ "//": 1,
+ "Went": 1,
+ "shopping": 1,
+ "and": 1,
+ "bought": 1,
+ "everything.": 1,
+ "individualScores": 2,
+ "teamScore": 4,
+ "for": 10,
+ "score": 2,
+ "in": 11,
+ "{": 77,
+ "if": 6,
+ "+": 15,
+ "}": 77,
+ "else": 1,
+ "optionalString": 2,
+ "nil": 1,
+ "optionalName": 2,
+ "greeting": 2,
+ "name": 21,
+ "vegetable": 2,
+ "switch": 4,
+ "case": 21,
+ "vegetableComment": 4,
+ "x": 1,
+ "where": 2,
+ "x.hasSuffix": 1,
+ "default": 2,
+ "interestingNumbers": 2,
+ "largest": 4,
+ "kind": 1,
+ "numbers": 6,
+ "number": 13,
+ "n": 5,
+ "while": 2,
+ "<": 4,
+ "*": 7,
+ "m": 5,
+ "do": 1,
+ "firstForLoop": 3,
+ "i": 6,
+ "secondForLoop": 3,
+ ";": 2,
+ "println": 1,
+ "func": 24,
+ "greet": 2,
+ "day": 1,
+ "-": 21,
+ "return": 30,
+ "getGasPrices": 2,
+ "Double": 11,
+ "sumOf": 3,
+ "Int...": 1,
+ "Int": 19,
+ "sum": 3,
+ "returnFifteen": 2,
+ "y": 3,
+ "add": 2,
+ "makeIncrementer": 2,
+ "addOne": 2,
+ "increment": 2,
+ "hasAnyMatches": 2,
+ "list": 2,
+ "condition": 2,
+ "Bool": 4,
+ "item": 4,
+ "true": 2,
+ "false": 2,
+ "lessThanTen": 2,
+ "numbers.map": 2,
+ "result": 5,
+ "sort": 1,
+ "class": 7,
+ "Shape": 2,
+ "numberOfSides": 4,
+ "simpleDescription": 14,
+ "myVariable": 2,
+ "myConstant": 1,
+ "shape": 1,
+ "shape.numberOfSides": 1,
+ "shapeDescription": 1,
+ "shape.simpleDescription": 1,
+ "NamedShape": 3,
+ "init": 4,
+ "self.name": 1,
+ "Square": 7,
+ "sideLength": 17,
+ "self.sideLength": 2,
+ "super.init": 2,
+ "area": 1,
+ "override": 2,
+ "test": 1,
+ "test.area": 1,
+ "test.simpleDescription": 1,
+ "EquilateralTriangle": 4,
+ "perimeter": 1,
+ "get": 2,
+ "set": 1,
+ "newValue": 1,
+ "/": 1,
+ "triangle": 3,
+ "triangle.perimeter": 2,
+ "triangle.sideLength": 2,
+ "TriangleAndSquare": 2,
+ "willSet": 2,
+ "square.sideLength": 1,
+ "newValue.sideLength": 2,
+ "square": 2,
+ "size": 4,
+ "triangleAndSquare": 1,
+ "triangleAndSquare.square.sideLength": 1,
+ "triangleAndSquare.triangle.sideLength": 2,
+ "triangleAndSquare.square": 1,
+ "Counter": 2,
+ "count": 2,
+ "incrementBy": 1,
+ "amount": 2,
+ "numberOfTimes": 2,
+ "times": 4,
+ "counter": 1,
+ "counter.incrementBy": 1,
+ "optionalSquare": 2,
+ ".sideLength": 1,
+ "enum": 4,
+ "Rank": 2,
+ "Ace": 1,
+ "Two": 1,
+ "Three": 1,
+ "Four": 1,
+ "Five": 1,
+ "Six": 1,
+ "Seven": 1,
+ "Eight": 1,
+ "Nine": 1,
+ "Ten": 1,
+ "Jack": 1,
+ "Queen": 1,
+ "King": 1,
+ "self": 3,
+ ".Ace": 1,
+ ".Jack": 1,
+ ".Queen": 1,
+ ".King": 1,
+ "self.toRaw": 1,
+ "ace": 1,
+ "Rank.Ace": 1,
+ "aceRawValue": 1,
+ "ace.toRaw": 1,
+ "convertedRank": 1,
+ "Rank.fromRaw": 1,
+ "threeDescription": 1,
+ "convertedRank.simpleDescription": 1,
+ "Suit": 2,
+ "Spades": 1,
+ "Hearts": 1,
+ "Diamonds": 1,
+ "Clubs": 1,
+ ".Spades": 2,
+ ".Hearts": 1,
+ ".Diamonds": 1,
+ ".Clubs": 1,
+ "hearts": 1,
+ "Suit.Hearts": 1,
+ "heartsDescription": 1,
+ "hearts.simpleDescription": 1,
+ "implicitInteger": 1,
+ "implicitDouble": 1,
+ "explicitDouble": 1,
+ "struct": 2,
+ "Card": 2,
+ "rank": 2,
+ "suit": 2,
+ "threeOfSpades": 1,
+ ".Three": 1,
+ "threeOfSpadesDescription": 1,
+ "threeOfSpades.simpleDescription": 1,
+ "ServerResponse": 1,
+ "Result": 1,
+ "Error": 1,
+ "success": 2,
+ "ServerResponse.Result": 1,
+ "failure": 1,
+ "ServerResponse.Error": 1,
+ ".Result": 1,
+ "sunrise": 1,
+ "sunset": 1,
+ "serverResponse": 2,
+ ".Error": 1,
+ "error": 1,
+ "protocol": 1,
+ "ExampleProtocol": 5,
+ "mutating": 3,
+ "adjust": 4,
+ "SimpleClass": 2,
+ "anotherProperty": 1,
+ "a": 2,
+ "a.adjust": 1,
+ "aDescription": 1,
+ "a.simpleDescription": 1,
+ "SimpleStructure": 2,
+ "b": 1,
+ "b.adjust": 1,
+ "bDescription": 1,
+ "b.simpleDescription": 1,
+ "extension": 1,
+ "protocolValue": 1,
+ "protocolValue.simpleDescription": 1,
+ "repeat": 2,
+ "": 1,
+ "ItemType": 3,
+ "OptionalValue": 2,
+ "": 1,
+ "None": 1,
+ "Some": 1,
+ "T": 5,
+ "possibleInteger": 2,
+ "": 1,
+ ".None": 1,
+ ".Some": 1,
+ "anyCommonElements": 2,
+ "": 1,
+ "U": 4,
+ "Sequence": 2,
+ "GeneratorType": 3,
+ "Element": 3,
+ "Equatable": 1,
+ "lhs": 2,
+ "rhs": 2,
+ "lhsItem": 2,
+ "rhsItem": 2,
+ "label": 2,
+ "width": 2,
+ "widthLabel": 1
+ },
+ "SystemVerilog": {
+ "module": 3,
+ "endpoint_phy_wrapper": 2,
+ "(": 92,
+ "input": 12,
+ "clk_sys_i": 2,
+ "clk_ref_i": 6,
+ "clk_rx_i": 3,
+ "rst_n_i": 3,
+ "IWishboneMaster.master": 2,
+ "src": 1,
+ "IWishboneSlave.slave": 1,
+ "snk": 1,
+ "sys": 1,
+ "output": 6,
+ "[": 17,
+ "]": 17,
+ "td_o": 2,
+ "rd_i": 2,
+ "txn_o": 2,
+ "txp_o": 2,
+ "rxn_i": 2,
+ "rxp_i": 2,
+ ")": 92,
+ ";": 32,
+ "wire": 12,
+ "rx_clock": 3,
+ "parameter": 2,
+ "g_phy_type": 6,
+ "gtx_data": 3,
+ "gtx_k": 3,
+ "gtx_disparity": 3,
+ "gtx_enc_error": 3,
+ "grx_data": 3,
+ "grx_clk": 1,
+ "grx_k": 3,
+ "grx_enc_error": 3,
+ "grx_bitslide": 2,
+ "gtp_rst": 2,
+ "tx_clock": 3,
+ "generate": 1,
+ "if": 5,
+ "begin": 4,
+ "assign": 2,
+ "wr_tbi_phy": 1,
+ "U_Phy": 1,
+ ".serdes_rst_i": 1,
+ ".serdes_loopen_i": 1,
+ "b0": 5,
+ ".serdes_enable_i": 1,
+ "b1": 2,
+ ".serdes_tx_data_i": 1,
+ ".serdes_tx_k_i": 1,
+ ".serdes_tx_disparity_o": 1,
+ ".serdes_tx_enc_err_o": 1,
+ ".serdes_rx_data_o": 1,
+ ".serdes_rx_k_o": 1,
+ ".serdes_rx_enc_err_o": 1,
+ ".serdes_rx_bitslide_o": 1,
+ ".tbi_refclk_i": 1,
+ ".tbi_rbclk_i": 1,
+ ".tbi_td_o": 1,
+ ".tbi_rd_i": 1,
+ ".tbi_syncen_o": 1,
+ ".tbi_loopen_o": 1,
+ ".tbi_prbsen_o": 1,
+ ".tbi_enable_o": 1,
+ "end": 4,
+ "else": 2,
+ "//": 3,
+ "wr_gtx_phy_virtex6": 1,
+ "#": 3,
+ ".g_simulation": 2,
+ "U_PHY": 1,
+ ".clk_ref_i": 2,
+ ".tx_clk_o": 1,
+ ".tx_data_i": 1,
+ ".tx_k_i": 1,
+ ".tx_disparity_o": 1,
+ ".tx_enc_err_o": 1,
+ ".rx_rbclk_o": 1,
+ ".rx_data_o": 1,
+ ".rx_k_o": 1,
+ ".rx_enc_err_o": 1,
+ ".rx_bitslide_o": 1,
+ ".rst_i": 1,
+ ".loopen_i": 1,
+ ".pad_txn0_o": 1,
+ ".pad_txp0_o": 1,
+ ".pad_rxn0_i": 1,
+ ".pad_rxp0_i": 1,
+ "endgenerate": 1,
+ "wr_endpoint": 1,
+ ".g_pcs_16bit": 1,
+ ".g_rx_buffer_size": 1,
+ ".g_with_rx_buffer": 1,
+ ".g_with_timestamper": 1,
+ ".g_with_dmtd": 1,
+ ".g_with_dpi_classifier": 1,
+ ".g_with_vlans": 1,
+ ".g_with_rtu": 1,
+ "DUT": 1,
+ ".clk_sys_i": 1,
+ ".clk_dmtd_i": 1,
+ ".rst_n_i": 1,
+ ".pps_csync_p1_i": 1,
+ ".src_dat_o": 1,
+ "snk.dat_i": 1,
+ ".src_adr_o": 1,
+ "snk.adr": 1,
+ ".src_sel_o": 1,
+ "snk.sel": 1,
+ ".src_cyc_o": 1,
+ "snk.cyc": 1,
+ ".src_stb_o": 1,
+ "snk.stb": 1,
+ ".src_we_o": 1,
+ "snk.we": 1,
+ ".src_stall_i": 1,
+ "snk.stall": 1,
+ ".src_ack_i": 1,
+ "snk.ack": 1,
+ ".src_err_i": 1,
+ ".rtu_full_i": 1,
+ ".rtu_rq_strobe_p1_o": 1,
+ ".rtu_rq_smac_o": 1,
+ ".rtu_rq_dmac_o": 1,
+ ".rtu_rq_vid_o": 1,
+ ".rtu_rq_has_vid_o": 1,
+ ".rtu_rq_prio_o": 1,
+ ".rtu_rq_has_prio_o": 1,
+ ".wb_cyc_i": 1,
+ "sys.cyc": 1,
+ ".wb_stb_i": 1,
+ "sys.stb": 1,
+ ".wb_we_i": 1,
+ "sys.we": 1,
+ ".wb_sel_i": 1,
+ "sys.sel": 1,
+ ".wb_adr_i": 1,
+ "sys.adr": 1,
+ ".wb_dat_i": 1,
+ "sys.dat_o": 1,
+ ".wb_dat_o": 1,
+ "sys.dat_i": 1,
+ ".wb_ack_o": 1,
+ "sys.ack": 1,
+ "endmodule": 2,
+ "fifo": 1,
+ "clk_50": 1,
+ "clk_2": 1,
+ "reset_n": 1,
+ "data_out": 1,
+ "empty": 1,
+ "priority_encoder": 1,
+ "INPUT_WIDTH": 3,
+ "OUTPUT_WIDTH": 3,
+ "logic": 2,
+ "-": 4,
+ "input_data": 2,
+ "output_data": 3,
+ "int": 1,
+ "ii": 6,
+ "always_comb": 1,
+ "for": 2,
+ "<": 1,
+ "+": 3,
+ "function": 1,
+ "integer": 2,
+ "log2": 4,
+ "x": 6,
+ "endfunction": 1
+ },
+ "Tcl": {
+ "#": 7,
+ "package": 2,
+ "require": 2,
+ "Tcl": 2,
+ "namespace": 6,
+ "eval": 2,
+ "stream": 61,
+ "{": 148,
+ "export": 3,
+ "[": 76,
+ "a": 1,
+ "-": 5,
+ "z": 1,
+ "]": 76,
+ "*": 19,
+ "}": 148,
+ "ensemble": 1,
+ "create": 7,
+ "proc": 28,
+ "first": 24,
+ "restCmdPrefix": 2,
+ "return": 22,
+ "list": 18,
+ "lassign": 11,
+ "foldl": 1,
+ "cmdPrefix": 19,
+ "initialValue": 7,
+ "args": 13,
+ "set": 34,
+ "numStreams": 3,
+ "llength": 5,
+ "if": 14,
+ "FoldlSingleStream": 2,
+ "lindex": 5,
+ "elseif": 3,
+ "FoldlMultiStream": 2,
+ "else": 5,
+ "Usage": 4,
+ "foreach": 5,
+ "numArgs": 7,
+ "varName": 7,
+ "body": 8,
+ "ForeachSingleStream": 2,
+ "(": 11,
+ ")": 11,
+ "&&": 2,
+ "%": 1,
+ "end": 2,
+ "items": 5,
+ "lrange": 1,
+ "ForeachMultiStream": 2,
+ "fromList": 2,
+ "_list": 4,
+ "index": 4,
+ "expr": 4,
+ "+": 1,
+ "isEmpty": 10,
+ "map": 1,
+ "MapSingleStream": 3,
+ "MapMultiStream": 3,
+ "rest": 22,
+ "select": 2,
+ "while": 6,
+ "take": 2,
+ "num": 3,
+ "||": 1,
+ "<": 1,
+ "toList": 1,
+ "res": 10,
+ "lappend": 8,
+ "#################################": 2,
+ "acc": 9,
+ "streams": 5,
+ "firsts": 6,
+ "restStreams": 6,
+ "uplevel": 4,
+ "nextItems": 4,
+ "msg": 1,
+ "code": 1,
+ "error": 1,
+ "level": 1,
+ "XDG": 11,
+ "variable": 4,
+ "DEFAULTS": 8,
+ "DATA_HOME": 4,
+ "CONFIG_HOME": 4,
+ "CACHE_HOME": 4,
+ "RUNTIME_DIR": 3,
+ "DATA_DIRS": 4,
+ "CONFIG_DIRS": 4,
+ "SetDefaults": 3,
+ "ne": 2,
+ "file": 9,
+ "join": 9,
+ "env": 8,
+ "HOME": 3,
+ ".local": 1,
+ "share": 3,
+ ".config": 1,
+ ".cache": 1,
+ "/usr": 2,
+ "local": 1,
+ "/etc": 1,
+ "xdg": 1,
+ "XDGVarSet": 4,
+ "var": 11,
+ "info": 1,
+ "exists": 1,
+ "XDG_": 4,
+ "Dir": 4,
+ "subdir": 16,
+ "dir": 5,
+ "dict": 2,
+ "get": 2,
+ "Dirs": 3,
+ "rawDirs": 3,
+ "split": 1,
+ "outDirs": 3,
+ "XDG_RUNTIME_DIR": 1
+ },
"Tea": {
"<%>": 1,
"template": 1,
"foo": 1
},
"TeX": {
- "%": 59,
+ "%": 135,
+ "ProvidesClass": 2,
+ "{": 463,
+ "problemset": 1,
+ "}": 469,
+ "DeclareOption*": 2,
+ "PassOptionsToClass": 2,
+ "final": 2,
+ "article": 2,
+ "DeclareOption": 2,
+ "worksheet": 1,
+ "providecommand": 45,
+ "@solutionvis": 3,
+ "expand": 1,
+ "@expand": 3,
+ "ProcessOptions": 2,
+ "relax": 3,
+ "LoadClass": 2,
+ "[": 81,
+ "pt": 5,
+ "letterpaper": 1,
+ "]": 80,
+ "RequirePackage": 20,
+ "top": 1,
+ "in": 20,
+ "bottom": 1,
+ "left": 15,
+ "right": 16,
+ "geometry": 1,
+ "pgfkeys": 1,
+ "For": 13,
+ "mathtable": 2,
+ "environment.": 3,
+ "tabularx": 1,
+ "pset": 1,
+ "heading": 2,
+ "float": 1,
+ "Used": 6,
+ "for": 21,
+ "floats": 1,
+ "(": 12,
+ "tables": 1,
+ "figures": 1,
+ "etc.": 1,
+ ")": 12,
+ "graphicx": 1,
+ "inserting": 3,
+ "images.": 1,
+ "enumerate": 2,
+ "the": 19,
+ "mathtools": 2,
+ "Required.": 7,
+ "Loads": 1,
+ "amsmath.": 1,
+ "amsthm": 1,
+ "theorem": 1,
+ "environments.": 1,
+ "amssymb": 1,
+ "booktabs": 1,
+ "esdiff": 1,
+ "derivatives": 4,
+ "and": 5,
+ "partial": 2,
+ "Optional.": 1,
+ "shortintertext.": 1,
+ "fancyhdr": 2,
+ "customizing": 1,
+ "headers/footers.": 1,
+ "lastpage": 1,
+ "page": 4,
+ "count": 1,
+ "header/footer.": 1,
+ "xcolor": 1,
+ "setting": 3,
+ "color": 3,
+ "of": 14,
+ "hyperlinks": 2,
+ "obeyFinal": 1,
+ "Disable": 1,
+ "todos": 1,
+ "by": 1,
+ "option": 1,
+ "class": 1,
+ "@todoclr": 2,
+ "linecolor": 1,
+ "red": 1,
+ "todonotes": 1,
+ "keeping": 1,
+ "track": 1,
+ "to": 16,
+ "-": 9,
+ "dos.": 1,
+ "colorlinks": 1,
+ "true": 1,
+ "linkcolor": 1,
+ "navy": 2,
+ "urlcolor": 1,
+ "black": 2,
+ "hyperref": 1,
+ "following": 2,
+ "urls": 2,
+ "references": 1,
+ "a": 2,
+ "document.": 1,
+ "url": 2,
+ "Enables": 1,
+ "with": 5,
+ "tag": 1,
+ "all": 2,
+ "hypcap": 1,
+ "definecolor": 2,
+ "gray": 1,
+ "To": 1,
+ "Dos.": 1,
+ "brightness": 1,
+ "RGB": 1,
+ "coloring": 1,
+ "setlength": 12,
+ "parskip": 1,
+ "ex": 2,
+ "Sets": 1,
+ "space": 8,
+ "between": 1,
+ "paragraphs.": 2,
+ "parindent": 2,
+ "Indent": 1,
+ "first": 1,
+ "line": 2,
+ "new": 1,
+ "let": 11,
+ "VERBATIM": 2,
+ "verbatim": 2,
+ "def": 18,
+ "verbatim@font": 1,
+ "small": 8,
+ "ttfamily": 1,
+ "usepackage": 2,
+ "caption": 1,
+ "footnotesize": 2,
+ "subcaption": 1,
+ "captionsetup": 4,
+ "table": 2,
+ "labelformat": 4,
+ "simple": 3,
+ "labelsep": 4,
+ "period": 3,
+ "labelfont": 4,
+ "bf": 4,
+ "figure": 2,
+ "subtable": 1,
+ "parens": 1,
+ "subfigure": 1,
+ "TRUE": 1,
+ "FALSE": 1,
+ "SHOW": 3,
+ "HIDE": 2,
+ "thispagestyle": 5,
+ "empty": 6,
+ "listoftodos": 1,
+ "clearpage": 4,
+ "pagenumbering": 1,
+ "arabic": 2,
+ "shortname": 2,
+ "#1": 40,
+ "authorname": 2,
+ "#2": 17,
+ "coursename": 3,
+ "#3": 8,
+ "assignment": 3,
+ "#4": 4,
+ "duedate": 2,
+ "#5": 2,
+ "begin": 11,
+ "minipage": 4,
+ "textwidth": 4,
+ "flushleft": 2,
+ "hypertarget": 1,
+ "@assignment": 2,
+ "textbf": 5,
+ "end": 12,
+ "flushright": 2,
+ "renewcommand": 10,
+ "headrulewidth": 1,
+ "footrulewidth": 1,
+ "pagestyle": 3,
+ "fancyplain": 4,
+ "fancyhf": 2,
+ "lfoot": 1,
+ "hyperlink": 1,
+ "cfoot": 1,
+ "rfoot": 1,
+ "thepage": 2,
+ "pageref": 1,
+ "LastPage": 1,
+ "newcounter": 1,
+ "theproblem": 3,
+ "Problem": 2,
+ "counter": 1,
+ "environment": 1,
+ "problem": 1,
+ "addtocounter": 2,
+ "setcounter": 5,
+ "equation": 1,
+ "noindent": 2,
+ ".": 3,
+ "textit": 1,
+ "Default": 2,
+ "is": 2,
+ "omit": 1,
+ "pagebreaks": 1,
+ "after": 1,
+ "solution": 2,
+ "qqed": 2,
+ "hfill": 3,
+ "rule": 1,
+ "mm": 2,
+ "ifnum": 3,
+ "pagebreak": 2,
+ "fi": 15,
+ "show": 1,
+ "solutions.": 1,
+ "vspace": 2,
+ "em": 8,
+ "Solution.": 1,
+ "ifnum#1": 2,
+ "else": 9,
+ "chap": 1,
+ "section": 2,
+ "Sum": 3,
+ "n": 4,
+ "ensuremath": 15,
+ "sum_": 2,
+ "from": 5,
+ "infsum": 2,
+ "infty": 2,
+ "Infinite": 1,
+ "sum": 1,
+ "Int": 1,
+ "x": 4,
+ "int_": 1,
+ "mathrm": 1,
+ "d": 1,
+ "Integrate": 1,
+ "respect": 1,
+ "Lim": 2,
+ "displaystyle": 2,
+ "lim_": 1,
+ "Take": 1,
+ "limit": 1,
+ "infinity": 1,
+ "f": 1,
+ "Frac": 1,
+ "/": 1,
+ "_": 1,
+ "Slanted": 1,
+ "fraction": 1,
+ "proper": 1,
+ "spacing.": 1,
+ "Usefule": 1,
+ "display": 2,
+ "fractions.": 1,
+ "eval": 1,
+ "vert_": 1,
+ "L": 1,
+ "hand": 2,
+ "sizing": 2,
+ "R": 1,
+ "D": 1,
+ "diff": 1,
+ "writing": 2,
+ "PD": 1,
+ "diffp": 1,
+ "full": 1,
+ "Forces": 1,
+ "style": 1,
+ "math": 4,
+ "mode": 4,
+ "Deg": 1,
+ "circ": 1,
+ "adding": 1,
+ "degree": 1,
+ "symbol": 4,
+ "even": 1,
+ "if": 1,
+ "not": 2,
+ "abs": 1,
+ "vert": 3,
+ "Absolute": 1,
+ "Value": 1,
+ "norm": 1,
+ "Vert": 2,
+ "Norm": 1,
+ "vector": 1,
+ "magnitude": 1,
+ "e": 1,
+ "times": 3,
+ "Scientific": 2,
+ "Notation": 2,
+ "E": 2,
+ "u": 1,
+ "text": 7,
+ "units": 1,
+ "Roman": 1,
+ "mc": 1,
+ "hspace": 3,
+ "comma": 1,
+ "into": 2,
+ "mtxt": 1,
+ "insterting": 1,
+ "on": 2,
+ "either": 1,
+ "side.": 1,
+ "Option": 1,
+ "preceding": 1,
+ "punctuation.": 1,
+ "prob": 1,
+ "P": 2,
+ "cndprb": 1,
+ "right.": 1,
+ "cov": 1,
+ "Cov": 1,
+ "twovector": 1,
+ "r": 3,
+ "array": 6,
+ "threevector": 1,
+ "fourvector": 1,
+ "vecs": 4,
+ "vec": 2,
+ "bm": 2,
+ "bolded": 2,
+ "arrow": 2,
+ "vect": 3,
+ "unitvecs": 1,
+ "hat": 2,
+ "unitvect": 1,
+ "Div": 1,
+ "del": 3,
+ "cdot": 1,
+ "Curl": 1,
+ "Grad": 1,
"NeedsTeXFormat": 1,
- "{": 180,
"LaTeX2e": 1,
- "}": 185,
- "ProvidesClass": 1,
"reedthesis": 1,
- "[": 22,
"/01/27": 1,
"The": 4,
"Reed": 5,
"College": 5,
"Thesis": 5,
"Class": 4,
- "]": 22,
- "DeclareOption*": 1,
- "PassOptionsToClass": 1,
"CurrentOption": 1,
"book": 2,
- "ProcessOptions": 1,
- "relax": 2,
- "LoadClass": 1,
- "RequirePackage": 1,
- "fancyhdr": 1,
"AtBeginDocument": 1,
- "fancyhf": 1,
"fancyhead": 5,
"LE": 1,
"RO": 1,
- "thepage": 1,
"above": 1,
"makes": 2,
"your": 1,
"headers": 6,
- "in": 10,
- "all": 1,
"caps.": 2,
"If": 1,
"you": 1,
@@ -41424,28 +65453,16 @@
"different": 1,
"choose": 1,
"one": 1,
- "of": 8,
- "the": 14,
- "following": 1,
"options": 1,
- "(": 3,
"be": 3,
"sure": 1,
- "to": 8,
"remove": 1,
- "symbol": 1,
- "from": 1,
"both": 1,
- "right": 1,
- "and": 2,
- "left": 1,
- ")": 3,
"RE": 2,
"slshape": 2,
"nouppercase": 2,
"leftmark": 2,
"This": 2,
- "on": 1,
"RIGHT": 2,
"side": 2,
"pages": 2,
@@ -41465,25 +65482,19 @@
"or": 1,
"scshape": 2,
"will": 2,
- "small": 2,
"And": 1,
"so": 1,
- "pagestyle": 2,
"fancy": 1,
- "let": 10,
"oldthebibliography": 2,
"thebibliography": 2,
"endoldthebibliography": 2,
"endthebibliography": 1,
"renewenvironment": 2,
- "#1": 12,
"addcontentsline": 5,
"toc": 5,
"chapter": 9,
"bibname": 2,
- "end": 5,
"things": 1,
- "for": 5,
"psych": 1,
"majors": 1,
"comment": 1,
@@ -41494,14 +65505,8 @@
"endtheindex": 1,
"indexname": 1,
"RToldchapter": 1,
- "renewcommand": 6,
"if@openright": 1,
"RTcleardoublepage": 3,
- "else": 7,
- "clearpage": 3,
- "fi": 13,
- "thispagestyle": 3,
- "empty": 4,
"global": 2,
"@topnum": 1,
"z@": 2,
@@ -41509,16 +65514,12 @@
"secdef": 1,
"@chapter": 2,
"@schapter": 1,
- "def": 12,
- "#2": 4,
- "ifnum": 2,
"c@secnumdepth": 1,
"m@ne": 2,
"if@mainmatter": 1,
"refstepcounter": 1,
"typeout": 1,
"@chapapp": 2,
- "space": 4,
"thechapter.": 1,
"thechapter": 1,
"space#1": 1,
@@ -41541,18 +65542,15 @@
"newpage": 3,
"RToldcleardoublepage": 1,
"cleardoublepage": 4,
- "setlength": 10,
"oddsidemargin": 2,
".5in": 3,
"evensidemargin": 2,
- "textwidth": 2,
"textheight": 4,
"topmargin": 6,
"addtolength": 8,
"headheight": 4,
"headsep": 3,
".6in": 1,
- "pt": 1,
"division#1": 1,
"gdef": 6,
"@division": 3,
@@ -41588,15 +65586,12 @@
"addpenalty": 1,
"@highpenalty": 2,
"vskip": 4,
- "em": 3,
"@plus": 1,
"@tempdima": 2,
"begingroup": 1,
- "parindent": 1,
"rightskip": 1,
"@pnumwidth": 3,
"parfillskip": 1,
- "-": 2,
"leavevmode": 1,
"bfseries": 3,
"advance": 1,
@@ -41609,8 +65604,6 @@
"mkern": 2,
"@dotsep": 2,
"mu": 2,
- ".": 1,
- "hfill": 1,
"hb@xt@": 1,
"hss": 1,
"par": 6,
@@ -41622,7 +65615,6 @@
"onecolumn": 1,
"@restonecolfalse": 1,
"Abstract": 2,
- "begin": 4,
"center": 7,
"fontsize": 7,
"selectfont": 6,
@@ -41644,7 +65636,6 @@
"/Creator": 1,
"maketitle": 1,
"titlepage": 2,
- "footnotesize": 1,
"footnoterule": 1,
"footnote": 1,
"thanks": 1,
@@ -41652,8 +65643,6 @@
"setbox0": 2,
"Requirements": 2,
"Degree": 2,
- "setcounter": 1,
- "page": 3,
"null": 3,
"vfil": 8,
"@title": 1,
@@ -41679,7 +65668,6 @@
"just": 1,
"below": 2,
"cm": 2,
- "not": 1,
"copy0": 1,
"approved": 1,
"major": 1,
@@ -42200,6 +66188,87 @@
"log": 1,
"defaultproperties": 1
},
+ "VCL": {
+ "sub": 23,
+ "vcl_recv": 2,
+ "{": 50,
+ "if": 14,
+ "(": 50,
+ "req.request": 18,
+ "&&": 14,
+ ")": 50,
+ "return": 33,
+ "pipe": 4,
+ ";": 48,
+ "}": 50,
+ "pass": 9,
+ "req.http.Authorization": 2,
+ "||": 4,
+ "req.http.Cookie": 2,
+ "lookup": 2,
+ "vcl_pipe": 2,
+ "vcl_pass": 2,
+ "vcl_hash": 2,
+ "set": 10,
+ "req.hash": 3,
+ "+": 17,
+ "req.url": 2,
+ "req.http.host": 4,
+ "else": 3,
+ "server.ip": 2,
+ "hash": 2,
+ "vcl_hit": 2,
+ "obj.cacheable": 2,
+ "deliver": 8,
+ "vcl_miss": 2,
+ "fetch": 3,
+ "vcl_fetch": 2,
+ "obj.http.Set": 1,
+ "-": 21,
+ "Cookie": 2,
+ "obj.prefetch": 1,
+ "s": 3,
+ "vcl_deliver": 2,
+ "vcl_discard": 1,
+ "discard": 2,
+ "vcl_prefetch": 1,
+ "vcl_timeout": 1,
+ "vcl_error": 2,
+ "obj.http.Content": 2,
+ "Type": 2,
+ "synthetic": 2,
+ "utf": 2,
+ "//W3C//DTD": 2,
+ "XHTML": 2,
+ "Strict//EN": 2,
+ "http": 3,
+ "//www.w3.org/TR/xhtml1/DTD/xhtml1": 2,
+ "strict.dtd": 2,
+ "obj.status": 4,
+ "obj.response": 6,
+ "req.xid": 2,
+ "//www.varnish": 1,
+ "cache.org/": 1,
+ "req.restarts": 1,
+ "req.http.x": 1,
+ "forwarded": 1,
+ "for": 1,
+ "req.http.X": 3,
+ "Forwarded": 3,
+ "For": 3,
+ "client.ip": 2,
+ "hash_data": 3,
+ "beresp.ttl": 2,
+ "<": 1,
+ "beresp.http.Set": 1,
+ "beresp.http.Vary": 1,
+ "hit_for_pass": 1,
+ "obj.http.Retry": 1,
+ "After": 1,
+ "vcl_init": 1,
+ "ok": 2,
+ "vcl_fini": 1
+ },
"Verilog": {
"////////////////////////////////////////////////////////////////////////////////": 14,
"//": 117,
@@ -42732,16 +66801,16 @@
"CLASS": 1,
"BEGIN": 1,
"MultiUse": 1,
- "-": 6,
+ "-": 9,
"NotPersistable": 1,
"DataBindingBehavior": 1,
"vbNone": 1,
"MTSTransactionMode": 1,
"*************************************************************************************************************************************************************************************************************************************************": 2,
"Copyright": 1,
- "(": 14,
+ "(": 20,
"c": 1,
- ")": 14,
+ ")": 20,
"David": 1,
"Briant": 1,
"All": 1,
@@ -42802,8 +66871,8 @@
"Release": 1,
"hide": 1,
"us": 1,
- "from": 1,
- "the": 3,
+ "from": 2,
+ "the": 7,
"Applications": 1,
"list": 1,
"in": 1,
@@ -42820,11 +66889,11 @@
"myMouseEventsForm.icon": 1,
"make": 1,
"myself": 1,
- "easily": 1,
+ "easily": 2,
"found": 1,
"myMouseEventsForm.hwnd": 3,
- "End": 7,
- "Sub": 7,
+ "End": 11,
+ "Sub": 9,
"shutdown": 1,
"myAST.destroy": 1,
"Nothing": 2,
@@ -42840,17 +66909,17 @@
"MF_SEPARATOR": 1,
"MF_CHECKED": 1,
"route": 2,
- "to": 1,
- "a": 1,
+ "to": 4,
+ "a": 4,
"remote": 1,
"machine": 1,
"Else": 1,
- "for": 1,
+ "for": 4,
"moment": 1,
"just": 1,
"between": 1,
"MMFileTransports": 1,
- "If": 3,
+ "If": 4,
"myMMTransportIDsByRouterID.Exists": 1,
"message.toAddress.RouterID": 2,
"Then": 1,
@@ -42870,7 +66939,141 @@
"id": 1,
"oReceived": 2,
"Boolean": 1,
- "True": 1
+ "True": 1,
+ "@Code": 1,
+ "ViewData": 1,
+ "Code": 1,
+ "@section": 1,
+ "featured": 1,
+ "": 1,
+ "class=": 7,
+ "": 1,
+ "": 1,
+ "": 1,
+ "@ViewData": 2,
+ ".": 3,
+ "
": 1,
+ "": 1,
+ "
": 1,
+ "": 1,
+ "": 1,
+ "To": 1,
+ "learn": 1,
+ "more": 4,
+ "about": 2,
+ "ASP.NET": 5,
+ "MVC": 4,
+ "visit": 2,
+ "": 5,
+ "href=": 5,
+ "title=": 2,
+ "http": 1,
+ "//asp.net/mvc": 1,
+ "": 5,
+ "The": 1,
+ "page": 1,
+ "features": 3,
+ "": 1,
+ "videos": 1,
+ "tutorials": 1,
+ "and": 6,
+ "samples": 1,
+ "": 1,
+ "help": 1,
+ "you": 4,
+ "get": 1,
+ "most": 1,
+ "MVC.": 1,
+ "have": 1,
+ "any": 1,
+ "questions": 1,
+ "our": 1,
+ "forums": 1,
+ "
": 1,
+ "": 1,
+ " ": 1,
+ "Section": 1,
+ "": 1,
+ "We": 1,
+ "suggest": 1,
+ "following": 1,
+ "
": 1,
+ "": 1,
+ "- ": 3,
+ "
": 3,
+ "Getting": 1,
+ "Started": 1,
+ "
": 3,
+ "gives": 2,
+ "powerful": 1,
+ "patterns": 1,
+ "based": 1,
+ "way": 1,
+ "build": 1,
+ "dynamic": 1,
+ "websites": 1,
+ "that": 5,
+ "enables": 1,
+ "clean": 1,
+ "separation": 1,
+ "of": 2,
+ "concerns": 1,
+ "full": 1,
+ "control": 1,
+ "over": 1,
+ "markup": 1,
+ "enjoyable": 1,
+ "agile": 1,
+ "development.": 1,
+ "includes": 1,
+ "many": 1,
+ "enable": 1,
+ "fast": 1,
+ "TDD": 1,
+ "friendly": 1,
+ "development": 1,
+ "creating": 1,
+ "sophisticated": 1,
+ "applications": 1,
+ "use": 1,
+ "latest": 1,
+ "web": 2,
+ "standards.": 1,
+ "Learn": 3,
+ " ": 3,
+ "Add": 1,
+ "NuGet": 2,
+ "packages": 1,
+ "jump": 1,
+ "start": 1,
+ "your": 2,
+ "coding": 1,
+ "makes": 1,
+ "it": 1,
+ "easy": 1,
+ "install": 1,
+ "update": 1,
+ "free": 1,
+ "libraries": 1,
+ "tools.": 1,
+ "Find": 1,
+ "Web": 1,
+ "Hosting": 1,
+ "You": 1,
+ "can": 1,
+ "find": 1,
+ "hosting": 1,
+ "company": 1,
+ "offers": 1,
+ "right": 1,
+ "mix": 1,
+ "price": 1,
+ "applications.": 1,
+ "
": 1,
+ "Module": 2,
+ "Module1": 1,
+ "Main": 1,
+ "Console.Out.WriteLine": 2
},
"Volt": {
"module": 1,
@@ -43399,17 +67602,140 @@
"return": 1
},
"XML": {
- "": 3,
- "version=": 4,
+ "": 11,
+ "version=": 17,
+ "encoding=": 7,
+ "": 7,
+ "ToolsVersion=": 6,
+ "DefaultTargets=": 5,
+ "xmlns=": 8,
+ "": 21,
+ "Project=": 12,
+ "Condition=": 37,
+ "": 26,
+ "": 6,
+ "Debug": 10,
+ " ": 6,
+ "": 6,
+ "AnyCPU": 10,
+ " ": 6,
+ "": 5,
+ "{": 6,
+ "D9BF15": 1,
+ "-": 90,
+ "D10": 1,
+ "ABAD688E8B": 1,
+ "}": 6,
+ " ": 5,
+ "": 4,
+ "Exe": 4,
+ " ": 4,
+ "": 2,
+ "Properties": 3,
+ " ": 2,
+ "": 5,
+ "csproj_sample": 1,
+ " ": 5,
+ "": 4,
+ "csproj": 1,
+ "sample": 6,
+ " ": 4,
+ "": 5,
+ "v4.5.1": 5,
+ " ": 5,
+ "": 3,
+ " ": 3,
+ "": 3,
+ "true": 24,
+ " ": 3,
+ " ": 25,
+ "": 6,
+ " ": 6,
+ "": 5,
+ " ": 5,
+ "": 6,
+ "full": 4,
+ " ": 6,
+ "": 7,
+ "false": 11,
+ " ": 7,
+ "": 8,
+ "bin": 11,
+ " ": 8,
+ "": 6,
+ "DEBUG": 3,
+ ";": 52,
+ "TRACE": 6,
+ " ": 6,
+ "": 4,
+ "prompt": 4,
+ " ": 4,
+ "": 8,
+ " ": 8,
+ "pdbonly": 3,
+ "Release": 6,
+ "": 26,
+ "": 30,
+ "Include=": 78,
+ " ": 26,
+ "": 10,
+ "": 5,
+ " ": 7,
+ "": 2,
+ " ": 2,
+ "cfa7a11": 1,
+ "a5cd": 1,
+ "bd7b": 1,
+ "b210d4d51a29": 1,
+ "fsproj_sample": 2,
+ "": 1,
+ " ": 1,
+ "": 3,
+ "fsproj": 1,
+ " ": 3,
+ "": 2,
+ " ": 2,
+ "": 5,
+ "fsproj_sample.XML": 2,
+ " ": 5,
+ "": 2,
+ " ": 2,
+ "": 2,
+ "True": 13,
+ " ": 2,
+ "": 5,
+ "": 1,
+ " ": 1,
+ "": 1,
+ "": 1,
+ "": 2,
+ "(": 65,
+ "MSBuildExtensionsPath32": 2,
+ ")": 58,
+ "..": 1,
+ "Microsoft": 2,
+ "SDKs": 1,
+ "F#": 1,
+ "Framework": 1,
+ "v4.0": 1,
+ "Microsoft.FSharp.Targets": 2,
+ " ": 2,
+ " ": 1,
+ "": 1,
+ "VisualStudio": 1,
+ "v": 1,
+ "VisualStudioVersion": 1,
+ "FSharp": 1,
+ " ": 1,
+ " ": 1,
"": 1,
- "name=": 223,
+ "name=": 227,
"xmlns": 2,
"ea=": 2,
- "": 2,
+ "": 4,
"This": 21,
"easyant": 3,
"module.ant": 1,
- "sample": 2,
"file": 3,
"is": 123,
"optionnal": 1,
@@ -43423,7 +67749,7 @@
"own": 2,
"specific": 8,
"target.": 1,
- " ": 2,
+ " ": 4,
"": 2,
"": 2,
"my": 2,
@@ -43450,9 +67776,9 @@
"revision=": 3,
"status=": 1,
"this": 77,
- "a": 127,
+ "a": 128,
"module.ivy": 1,
- "for": 59,
+ "for": 60,
"java": 1,
"standard": 1,
"application": 2,
@@ -43468,32 +67794,31 @@
"description=": 2,
"": 1,
"": 1,
- "": 1,
+ "": 4,
"org=": 1,
"rev=": 1,
"conf=": 1,
"default": 9,
"junit": 2,
"test": 7,
- "-": 49,
"/": 6,
" ": 1,
"": 1,
"": 1,
"": 1,
- "": 1,
+ "": 2,
"ReactiveUI": 2,
- " ": 1,
+ " ": 2,
" ": 1,
"": 1,
"": 120,
- "": 120,
+ "": 121,
"IObservedChange": 5,
"generic": 3,
"interface": 4,
"that": 94,
"replaces": 1,
- "the": 260,
+ "the": 261,
"non": 1,
"PropertyChangedEventArgs.": 1,
"Note": 7,
@@ -43501,9 +67826,7 @@
"used": 19,
"both": 2,
"Changing": 5,
- "(": 52,
"i.e.": 23,
- ")": 45,
"Changed": 4,
"Observables.": 2,
"In": 6,
@@ -43517,15 +67840,15 @@
"casting": 1,
"between": 15,
"changes.": 2,
- " ": 121,
+ " ": 122,
" ": 120,
- "The": 74,
+ "The": 75,
"object": 42,
"has": 16,
"raised": 1,
"change.": 12,
"name": 7,
- "of": 75,
+ "of": 76,
"property": 74,
"changed": 18,
"on": 35,
@@ -43621,7 +67944,7 @@
"itself": 2,
"changes": 13,
".": 20,
- "It": 1,
+ "It": 2,
"important": 6,
"implement": 5,
"Changing/Changed": 1,
@@ -43663,7 +67986,6 @@
"ItemChanging": 2,
"ItemChanged": 2,
"properties": 29,
- ";": 10,
"implementing": 2,
"rebroadcast": 2,
"through": 3,
@@ -43699,7 +68021,7 @@
"string": 13,
"distinguish": 12,
"arbitrarily": 2,
- "by": 13,
+ "by": 14,
"client.": 2,
"Listen": 4,
"provides": 6,
@@ -43711,7 +68033,7 @@
"to.": 7,
"": 12,
"": 84,
- "A": 19,
+ "A": 21,
"identical": 11,
"types": 10,
"one": 27,
@@ -43723,7 +68045,6 @@
"particular": 2,
"registered.": 2,
"message.": 1,
- "True": 6,
"posted": 3,
"Type.": 2,
"Registers": 3,
@@ -43757,7 +68078,7 @@
"allows": 15,
"log": 2,
"attached.": 1,
- "data": 1,
+ "data": 2,
"structure": 1,
"representation": 1,
"memoizing": 2,
@@ -43799,7 +68120,6 @@
"evicted": 2,
"because": 2,
"Invalidate": 2,
- "full": 1,
"Evaluates": 1,
"returning": 1,
"cached": 2,
@@ -43828,7 +68148,7 @@
"object.": 3,
"ViewModel": 8,
"another": 3,
- "s": 1,
+ "s": 3,
"Return": 1,
"instance": 2,
"type.": 3,
@@ -43951,7 +68271,7 @@
"manage": 1,
"disk": 1,
"download": 1,
- "save": 1,
+ "save": 2,
"temporary": 1,
"folder": 1,
"onRelease": 1,
@@ -44017,7 +68337,6 @@
"notification": 6,
"Attempts": 1,
"expression": 3,
- "false": 2,
"expression.": 1,
"entire": 1,
"able": 1,
@@ -44107,7 +68426,7 @@
"private": 1,
"field.": 1,
"Reference": 1,
- "Use": 13,
+ "Use": 15,
"custom": 4,
"raiseAndSetIfChanged": 1,
"doesn": 1,
@@ -44182,7 +68501,518 @@
"need": 12,
"setup.": 12,
" ": 1,
- " ": 1
+ "": 1,
+ "": 1,
+ " ": 1,
+ "c67af951": 1,
+ "d8d6376993e7": 1,
+ "nproj_sample": 2,
+ "": 1,
+ " ": 1,
+ "": 1,
+ "Net": 1,
+ " ": 1,
+ "": 1,
+ "ProgramFiles": 1,
+ "Nemerle": 3,
+ " ": 1,
+ "": 1,
+ "NemerleBinPathRoot": 1,
+ "NemerleVersion": 1,
+ " ": 1,
+ "nproj": 1,
+ "OutputPath": 1,
+ "AssemblyName": 1,
+ ".xml": 1,
+ "": 3,
+ " ": 3,
+ "": 1,
+ "False": 1,
+ " ": 1,
+ "": 2,
+ "Nemerle.dll": 1,
+ " ": 2,
+ "": 1,
+ "Nemerle.Linq.dll": 1,
+ " ": 1,
+ "": 1,
+ "": 1,
+ "TS": 1,
+ "": 1,
+ "language=": 1,
+ "": 1,
+ "MainWindow": 1,
+ "": 8,
+ "": 8,
+ "filename=": 8,
+ "line=": 8,
+ "": 8,
+ "United": 1,
+ "Kingdom": 1,
+ " ": 8,
+ "": 8,
+ "Reino": 1,
+ "Unido": 1,
+ " ": 8,
+ " ": 8,
+ "God": 1,
+ "Queen": 1,
+ "Deus": 1,
+ "salve": 1,
+ "Rainha": 1,
+ "England": 1,
+ "Inglaterra": 1,
+ "Wales": 1,
+ "Gales": 1,
+ "Scotland": 1,
+ "Esc": 1,
+ "cia": 1,
+ "Northern": 1,
+ "Ireland": 1,
+ "Irlanda": 1,
+ "Norte": 1,
+ "Portuguese": 1,
+ "Portugu": 1,
+ "English": 1,
+ "Ingl": 1,
+ " ": 1,
+ " ": 1,
+ "": 1,
+ "": 1,
+ "": 1,
+ "Sample": 2,
+ " ": 1,
+ "": 1,
+ " ": 1,
+ "": 1,
+ " ": 1,
+ "": 1,
+ "Hugh": 2,
+ "Bot": 2,
+ " ": 1,
+ "": 1,
+ " ": 1,
+ "package": 1,
+ "nuget": 1,
+ "just": 1,
+ "works": 1,
+ "": 1,
+ "http": 2,
+ "//hubot.github.com": 1,
+ " ": 1,
+ " ": 1,
+ "": 1,
+ "https": 1,
+ "//github.com/github/hubot/LICENSEmd": 1,
+ " ": 1,
+ "": 1,
+ " ": 1,
+ " ": 1,
+ "": 1,
+ "": 1,
+ "src=": 1,
+ "target=": 1,
+ " ": 1,
+ " ": 1,
+ "MyCommon": 1,
+ "": 1,
+ "Name=": 1,
+ "": 1,
+ "Text=": 1,
+ " ": 1,
+ "D377F": 1,
+ "A798": 1,
+ "B3FD04C": 1,
+ "": 1,
+ "vbproj_sample.Module1": 1,
+ " ": 1,
+ "vbproj_sample": 1,
+ "vbproj": 3,
+ "": 1,
+ "Console": 3,
+ " ": 1,
+ "": 2,
+ " ": 2,
+ "": 2,
+ " ": 2,
+ "sample.xml": 2,
+ "": 2,
+ " ": 2,
+ "": 1,
+ "On": 2,
+ " ": 1,
+ "": 1,
+ "Binary": 1,
+ " ": 1,
+ "": 1,
+ "Off": 1,
+ " ": 1,
+ "": 1,
+ " ": 1,
+ "": 3,
+ " ": 3,
+ "": 3,
+ "Application.myapp": 1,
+ " ": 3,
+ "": 3,
+ "": 1,
+ " ": 1,
+ "Resources.resx": 1,
+ "Settings.settings": 1,
+ "": 1,
+ " ": 1,
+ "": 1,
+ "": 3,
+ "VbMyResourcesResXFileCodeGenerator": 1,
+ " ": 3,
+ "": 3,
+ "Resources.Designer.vb": 1,
+ " ": 3,
+ "": 2,
+ "My.Resources": 1,
+ " ": 2,
+ "": 1,
+ "Designer": 1,
+ " ": 1,
+ " ": 1,
+ "MyApplicationCodeGenerator": 1,
+ "Application.Designer.vb": 1,
+ "": 2,
+ "SettingsSingleFileGenerator": 1,
+ "My": 1,
+ "Settings.Designer.vb": 1,
+ "Label=": 11,
+ "": 2,
+ "Win32": 2,
+ " ": 2,
+ "BF6EED48": 1,
+ "BF18": 1,
+ "C54": 1,
+ "F": 1,
+ "BBF19EEDC7C": 1,
+ "": 1,
+ "ManagedCProj": 1,
+ " ": 1,
+ "vcxprojsample": 1,
+ "": 2,
+ "Application": 2,
+ " ": 2,
+ "": 2,
+ " ": 2,
+ "": 2,
+ "v120": 2,
+ " ": 2,
+ "": 2,
+ " ": 2,
+ "": 2,
+ "Unicode": 2,
+ " ": 2,
+ "": 4,
+ " ": 4,
+ "": 2,
+ " ": 2,
+ "": 2,
+ "": 8,
+ "Level3": 2,
+ "": 1,
+ "Disabled": 1,
+ " ": 1,
+ "": 2,
+ "WIN32": 2,
+ "_DEBUG": 1,
+ "%": 2,
+ "PreprocessorDefinitions": 2,
+ " ": 2,
+ "": 4,
+ " ": 4,
+ " ": 6,
+ "": 2,
+ "": 2,
+ " ": 2,
+ "": 2,
+ "": 2,
+ " ": 2,
+ "": 2,
+ " ": 2,
+ "NDEBUG": 1,
+ "": 2,
+ "": 4,
+ "": 2,
+ "Create": 2,
+ "": 2,
+ "": 10,
+ "": 3,
+ "FC737F1": 1,
+ "C7A5": 1,
+ "A066": 1,
+ "A32D752A2FF": 1,
+ " ": 3,
+ "": 3,
+ "cpp": 1,
+ "c": 1,
+ "cc": 1,
+ "cxx": 1,
+ "def": 1,
+ "odl": 1,
+ "idl": 1,
+ "hpj": 1,
+ "bat": 1,
+ "asm": 1,
+ "asmx": 1,
+ " ": 3,
+ " ": 10,
+ "BD": 1,
+ "b04": 1,
+ "EB": 1,
+ "FBE52EBFB": 1,
+ "h": 1,
+ "hh": 1,
+ "hpp": 1,
+ "hxx": 1,
+ "hm": 1,
+ "inl": 1,
+ "inc": 1,
+ "xsd": 1,
+ "DA6AB6": 1,
+ "F800": 1,
+ "c08": 1,
+ "B7A": 1,
+ "BB121AAD01": 1,
+ "rc": 1,
+ "ico": 1,
+ "cur": 1,
+ "bmp": 1,
+ "dlg": 1,
+ "rc2": 1,
+ "rct": 1,
+ "rgs": 1,
+ "gif": 1,
+ "jpg": 1,
+ "jpeg": 1,
+ "jpe": 1,
+ "resx": 1,
+ "tiff": 1,
+ "tif": 1,
+ "png": 1,
+ "wav": 1,
+ "mfcribbon": 1,
+ "ms": 1,
+ "Header": 2,
+ "Files": 7,
+ " ": 2,
+ "Resource": 2,
+ "": 1,
+ "Source": 3,
+ "": 1,
+ "": 1,
+ "compatVersion=": 1,
+ "": 1,
+ "FreeMedForms": 1,
+ " ": 1,
+ "": 1,
+ "C": 1,
+ "Eric": 1,
+ "MAEKER": 1,
+ "MD": 1,
+ " ": 1,
+ "": 1,
+ "GPLv3": 1,
+ " ": 1,
+ "": 1,
+ "Patient": 1,
+ " ": 1,
+ "XML": 1,
+ "form": 1,
+ "loader/saver": 1,
+ "FreeMedForms.": 1,
+ "": 1,
+ "//www.freemedforms.com/": 1,
+ " ": 1,
+ "": 1,
+ " ": 1,
+ " ": 1
+ },
+ "Xojo": {
+ "#tag": 88,
+ "Class": 3,
+ "Protected": 1,
+ "App": 1,
+ "Inherits": 1,
+ "Application": 1,
+ "Constant": 3,
+ "Name": 31,
+ "kEditClear": 1,
+ "Type": 34,
+ "String": 3,
+ "Dynamic": 3,
+ "False": 14,
+ "Default": 9,
+ "Scope": 4,
+ "Public": 3,
+ "#Tag": 5,
+ "Instance": 5,
+ "Platform": 5,
+ "Windows": 2,
+ "Language": 5,
+ "Definition": 5,
+ "Linux": 2,
+ "EndConstant": 3,
+ "kFileQuit": 1,
+ "kFileQuitShortcut": 1,
+ "Mac": 1,
+ "OS": 1,
+ "ViewBehavior": 2,
+ "EndViewBehavior": 2,
+ "End": 27,
+ "EndClass": 1,
+ "Report": 2,
+ "Begin": 23,
+ "BillingReport": 1,
+ "Compatibility": 2,
+ "Units": 1,
+ "Width": 3,
+ "PageHeader": 1,
+ "Height": 5,
+ "Body": 1,
+ "PageFooter": 1,
+ "EndReport": 1,
+ "ReportCode": 1,
+ "EndReportCode": 1,
+ "Dim": 3,
+ "dbFile": 3,
+ "As": 4,
+ "FolderItem": 1,
+ "db": 1,
+ "New": 1,
+ "SQLiteDatabase": 1,
+ "GetFolderItem": 1,
+ "(": 7,
+ ")": 7,
+ "db.DatabaseFile": 1,
+ "If": 4,
+ "db.Connect": 1,
+ "Then": 1,
+ "db.SQLExecute": 2,
+ "_": 1,
+ "+": 5,
+ "db.Error": 1,
+ "then": 1,
+ "MsgBox": 3,
+ "db.ErrorMessage": 2,
+ "db.Rollback": 1,
+ "Else": 2,
+ "db.Commit": 1,
+ "Menu": 2,
+ "MainMenuBar": 1,
+ "MenuItem": 11,
+ "FileMenu": 1,
+ "SpecialMenu": 13,
+ "Text": 13,
+ "Index": 14,
+ "-": 14,
+ "AutoEnable": 13,
+ "True": 46,
+ "Visible": 41,
+ "QuitMenuItem": 1,
+ "FileQuit": 1,
+ "ShortcutKey": 6,
+ "Shortcut": 6,
+ "EditMenu": 1,
+ "EditUndo": 1,
+ "MenuModifier": 5,
+ "EditSeparator1": 1,
+ "EditCut": 1,
+ "EditCopy": 1,
+ "EditPaste": 1,
+ "EditClear": 1,
+ "EditSeparator2": 1,
+ "EditSelectAll": 1,
+ "UntitledSeparator": 1,
+ "AppleMenuItem": 1,
+ "AboutItem": 1,
+ "EndMenu": 1,
+ "Toolbar": 2,
+ "MyToolbar": 1,
+ "ToolButton": 2,
+ "FirstItem": 1,
+ "Caption": 3,
+ "HelpTag": 3,
+ "Style": 2,
+ "SecondItem": 1,
+ "EndToolbar": 1,
+ "Window": 2,
+ "Window1": 1,
+ "BackColor": 1,
+ "&": 1,
+ "cFFFFFF00": 1,
+ "Backdrop": 1,
+ "CloseButton": 1,
+ "Composite": 1,
+ "Frame": 1,
+ "FullScreen": 1,
+ "FullScreenButton": 1,
+ "HasBackColor": 1,
+ "ImplicitInstance": 1,
+ "LiveResize": 1,
+ "MacProcID": 1,
+ "MaxHeight": 1,
+ "MaximizeButton": 1,
+ "MaxWidth": 1,
+ "MenuBar": 1,
+ "MenuBarVisible": 1,
+ "MinHeight": 1,
+ "MinimizeButton": 1,
+ "MinWidth": 1,
+ "Placement": 1,
+ "Resizeable": 1,
+ "Title": 1,
+ "PushButton": 1,
+ "HelloWorldButton": 2,
+ "AutoDeactivate": 1,
+ "Bold": 1,
+ "ButtonStyle": 1,
+ "Cancel": 1,
+ "Enabled": 1,
+ "InitialParent": 1,
+ "Italic": 1,
+ "Left": 1,
+ "LockBottom": 1,
+ "LockedInPosition": 1,
+ "LockLeft": 1,
+ "LockRight": 1,
+ "LockTop": 1,
+ "TabIndex": 1,
+ "TabPanelIndex": 1,
+ "TabStop": 1,
+ "TextFont": 1,
+ "TextSize": 1,
+ "TextUnit": 1,
+ "Top": 1,
+ "Underline": 1,
+ "EndWindow": 1,
+ "WindowCode": 1,
+ "EndWindowCode": 1,
+ "Events": 1,
+ "Event": 1,
+ "Sub": 2,
+ "Action": 1,
+ "total": 4,
+ "Integer": 2,
+ "For": 1,
+ "i": 2,
+ "To": 1,
+ "Next": 1,
+ "Str": 1,
+ "EndEvent": 1,
+ "EndEvents": 1,
+ "ViewProperty": 28,
+ "true": 26,
+ "Group": 28,
+ "InitialValue": 23,
+ "EndViewProperty": 28,
+ "EditorType": 14,
+ "EnumValues": 2,
+ "EndEnumValues": 2
},
"XProc": {
"": 1,
@@ -44491,7 +69321,7 @@
},
"YAML": {
"gem": 1,
- "-": 16,
+ "-": 25,
"local": 1,
"gen": 1,
"rdoc": 2,
@@ -44503,274 +69333,648 @@
"numbers": 1,
"gempath": 1,
"/usr/local/rubygems": 1,
- "/home/gavin/.rubygems": 1
+ "/home/gavin/.rubygems": 1,
+ "http_interactions": 1,
+ "request": 1,
+ "method": 1,
+ "get": 1,
+ "uri": 1,
+ "http": 1,
+ "//example.com/": 1,
+ "body": 3,
+ "headers": 2,
+ "{": 1,
+ "}": 1,
+ "response": 2,
+ "status": 1,
+ "code": 1,
+ "message": 1,
+ "OK": 1,
+ "Content": 2,
+ "Type": 1,
+ "text/html": 1,
+ ";": 1,
+ "charset": 1,
+ "utf": 1,
+ "Length": 1,
+ "This": 1,
+ "is": 1,
+ "the": 1,
+ "http_version": 1,
+ "recorded_at": 1,
+ "Tue": 1,
+ "Nov": 1,
+ "GMT": 1,
+ "recorded_with": 1,
+ "VCR": 1
+ },
+ "Zephir": {
+ "%": 10,
+ "{": 58,
+ "#define": 1,
+ "MAX_FACTOR": 3,
+ "}": 52,
+ "namespace": 4,
+ "Test": 4,
+ ";": 91,
+ "#include": 9,
+ "static": 1,
+ "long": 3,
+ "fibonacci": 4,
+ "(": 59,
+ "n": 5,
+ ")": 57,
+ "if": 39,
+ "<": 2,
+ "return": 26,
+ "else": 11,
+ "-": 25,
+ "+": 5,
+ "class": 3,
+ "Cblock": 1,
+ "public": 22,
+ "function": 22,
+ "testCblock1": 1,
+ "int": 3,
+ "a": 6,
+ "testCblock2": 1,
+ "#ifdef": 1,
+ "HAVE_CONFIG_H": 1,
+ "#endif": 1,
+ "": 1,
+ "": 1,
+ "": 1,
+ "": 1,
+ "ZEPHIR_INIT_CLASS": 2,
+ "Test_Router_Exception": 2,
+ "ZEPHIR_REGISTER_CLASS_EX": 1,
+ "Router": 3,
+ "Exception": 4,
+ "test": 1,
+ "router_exception": 1,
+ "zend_exception_get_default": 1,
+ "TSRMLS_C": 1,
+ "NULL": 1,
+ "SUCCESS": 1,
+ "extern": 1,
+ "zend_class_entry": 1,
+ "*test_router_exception_ce": 1,
+ "php": 1,
+ "extends": 1,
+ "Route": 1,
+ "protected": 9,
+ "_pattern": 3,
+ "_compiledPattern": 3,
+ "_paths": 3,
+ "_methods": 5,
+ "_hostname": 3,
+ "_converters": 3,
+ "_id": 2,
+ "_name": 3,
+ "_beforeMatch": 3,
+ "__construct": 1,
+ "pattern": 37,
+ "paths": 7,
+ "null": 11,
+ "httpMethods": 6,
+ "this": 28,
+ "reConfigure": 2,
+ "let": 51,
+ "compilePattern": 2,
+ "var": 4,
+ "idPattern": 6,
+ "memstr": 10,
+ "str_replace": 6,
+ ".": 5,
+ "via": 1,
+ "extractNamedParams": 2,
+ "string": 6,
+ "char": 1,
+ "ch": 27,
+ "tmp": 4,
+ "matches": 5,
+ "boolean": 1,
+ "notValid": 5,
+ "false": 3,
+ "cursor": 4,
+ "cursorVar": 5,
+ "marker": 4,
+ "bracketCount": 7,
+ "parenthesesCount": 5,
+ "foundPattern": 6,
+ "intermediate": 4,
+ "numberMatches": 4,
+ "route": 12,
+ "item": 7,
+ "variable": 5,
+ "regexp": 7,
+ "strlen": 1,
+ "<=>": 5,
+ "0": 9,
+ "for": 4,
+ "in": 4,
+ "1": 3,
+ "substr": 3,
+ "break": 9,
+ "&&": 6,
+ "z": 2,
+ "Z": 2,
+ "true": 2,
+ "<='9')>": 1,
+ "_": 1,
+ "2": 2,
+ "continue": 1,
+ "[": 14,
+ "]": 14,
+ "moduleName": 5,
+ "controllerName": 7,
+ "actionName": 4,
+ "parts": 9,
+ "routePaths": 5,
+ "realClassName": 1,
+ "namespaceName": 1,
+ "pcrePattern": 4,
+ "compiledPattern": 4,
+ "extracted": 4,
+ "typeof": 2,
+ "throw": 1,
+ "new": 1,
+ "explode": 1,
+ "switch": 1,
+ "count": 1,
+ "case": 3,
+ "controller": 1,
+ "action": 1,
+ "array": 1,
+ "The": 1,
+ "contains": 1,
+ "invalid": 1,
+ "#": 1,
+ "array_merge": 1,
+ "//Update": 1,
+ "the": 1,
+ "s": 1,
+ "name": 5,
+ "*": 2,
+ "@return": 1,
+ "*/": 1,
+ "getName": 1,
+ "setName": 1,
+ "beforeMatch": 1,
+ "callback": 2,
+ "getBeforeMatch": 1,
+ "getRouteId": 1,
+ "getPattern": 1,
+ "getCompiledPattern": 1,
+ "getPaths": 1,
+ "getReversedPaths": 1,
+ "reversed": 4,
+ "path": 3,
+ "position": 3,
+ "setHttpMethods": 1,
+ "getHttpMethods": 1,
+ "setHostname": 1,
+ "hostname": 2,
+ "getHostname": 1,
+ "convert": 1,
+ "converter": 2,
+ "getConverters": 1
+ },
+ "Zimpl": {
+ "#": 2,
+ "param": 1,
+ "columns": 2,
+ ";": 7,
+ "set": 3,
+ "I": 3,
+ "{": 2,
+ "..": 1,
+ "}": 2,
+ "IxI": 6,
+ "*": 2,
+ "TABU": 4,
+ "[": 8,
+ "": 3,
+ "in": 5,
+ "]": 8,
+ "": 2,
+ "with": 1,
+ "(": 6,
+ "m": 4,
+ "i": 8,
+ "or": 3,
+ "n": 4,
+ "j": 8,
+ ")": 6,
+ "and": 1,
+ "abs": 2,
+ "-": 3,
+ "var": 1,
+ "x": 4,
+ "binary": 1,
+ "maximize": 1,
+ "queens": 1,
+ "sum": 2,
+ "subto": 1,
+ "c1": 1,
+ "forall": 1,
+ "do": 1,
+ "card": 2
}
},
"language_tokens": {
"ABAP": 1500,
"Agda": 376,
+ "Alloy": 1143,
"ApacheConf": 1449,
"Apex": 4408,
"AppleScript": 1862,
"Arduino": 20,
"AsciiDoc": 103,
+ "AspectJ": 324,
+ "Assembly": 21750,
+ "ATS": 4558,
"AutoHotkey": 3,
"Awk": 544,
"BlitzBasic": 2065,
"Bluespec": 1298,
"Brightscript": 579,
- "C": 58858,
+ "C": 59053,
+ "C#": 278,
+ "C++": 34739,
"Ceylon": 50,
+ "Cirru": 244,
"Clojure": 510,
"COBOL": 90,
"CoffeeScript": 2951,
- "Common Lisp": 103,
+ "Common Lisp": 2186,
+ "Component Pascal": 825,
"Coq": 18259,
"Creole": 134,
+ "Crystal": 1506,
"CSS": 43867,
"Cuda": 290,
- "Dart": 68,
+ "Dart": 74,
"Diff": 16,
"DM": 169,
+ "Dogescript": 30,
+ "E": 601,
+ "Eagle": 30089,
"ECL": 281,
"edn": 227,
"Elm": 628,
"Emacs Lisp": 1756,
"Erlang": 2928,
"fish": 636,
+ "Forth": 1516,
+ "Frege": 5564,
+ "Game Maker Language": 13310,
+ "GAMS": 363,
+ "GAP": 9944,
"GAS": 133,
- "GLSL": 3766,
- "Gosu": 413,
- "Groovy": 69,
+ "GLSL": 4033,
+ "Gnuplot": 1023,
+ "Gosu": 410,
+ "Grammatical Framework": 10607,
+ "Groovy": 93,
"Groovy Server Pages": 91,
"Haml": 4,
"Handlebars": 69,
+ "Haskell": 302,
+ "HTML": 413,
+ "Hy": 155,
+ "IDL": 418,
"Idris": 148,
+ "Inform 7": 75,
"INI": 27,
"Ioke": 2,
+ "Isabelle": 136,
"Jade": 3,
"Java": 8987,
- "JavaScript": 76934,
+ "JavaScript": 76970,
"JSON": 183,
+ "JSON5": 57,
+ "JSONiq": 151,
+ "JSONLD": 18,
"Julia": 247,
+ "Kit": 6,
"Kotlin": 155,
"KRL": 25,
+ "Lasso": 9849,
+ "Latte": 759,
"Less": 39,
"LFE": 1711,
+ "Liquid": 633,
"Literate Agda": 478,
"Literate CoffeeScript": 275,
"LiveScript": 123,
"Logos": 93,
"Logtalk": 36,
"Lua": 724,
- "M": 23373,
+ "M": 23615,
"Makefile": 50,
"Markdown": 1,
+ "Mask": 74,
+ "Mathematica": 1857,
"Matlab": 11942,
"Max": 714,
"MediaWiki": 766,
+ "Mercury": 31096,
"Monkey": 207,
+ "Moocode": 5234,
+ "MoonScript": 1718,
+ "MTML": 93,
"Nemerle": 17,
"NetLogo": 243,
"Nginx": 179,
"Nimrod": 1,
+ "Nix": 188,
"NSIS": 725,
"Nu": 116,
"Objective-C": 26518,
+ "Objective-C++": 6021,
"OCaml": 382,
"Omgrofl": 57,
"Opa": 28,
"OpenCL": 144,
"OpenEdge ABL": 762,
"Org": 358,
- "Oxygene": 555,
+ "Ox": 1006,
+ "Oxygene": 157,
+ "Pan": 130,
"Parrot Assembly": 6,
"Parrot Internal Representation": 5,
"Pascal": 30,
- "Perl": 17497,
+ "PAWN": 3263,
+ "Perl": 17979,
+ "Perl6": 372,
"PHP": 20724,
+ "Pike": 1835,
+ "Pod": 658,
"PogoScript": 250,
+ "PostScript": 107,
"PowerShell": 12,
"Processing": 74,
- "Prolog": 4040,
+ "Prolog": 2420,
+ "Propeller Spin": 13519,
"Protocol Buffer": 63,
- "Python": 5715,
+ "PureScript": 1652,
+ "Python": 6587,
"QMake": 119,
- "R": 175,
+ "R": 1790,
"Racket": 331,
"Ragel in Ruby Host": 593,
"RDoc": 279,
- "C++": 21308,
- "Forth": 1516,
- "Lasso": 9849,
- "MoonScript": 1718,
- "Rebol": 11,
+ "Rebol": 533,
+ "Red": 816,
+ "RMarkdown": 19,
"RobotFramework": 483,
"Ruby": 3862,
"Rust": 3566,
+ "SAS": 93,
"Sass": 56,
- "Scala": 420,
+ "Scala": 750,
"Scaml": 4,
- "Scheme": 3478,
+ "Scheme": 3515,
"Scilab": 69,
"SCSS": 39,
"Shell": 3744,
+ "ShellSession": 233,
+ "Shen": 3472,
"Slash": 187,
+ "Slim": 77,
+ "Smalltalk": 423,
+ "SourcePawn": 2080,
+ "SQL": 1485,
"Squirrel": 130,
- "Standard ML": 243,
- "SuperCollider": 268,
+ "Standard ML": 6567,
+ "Stata": 3133,
+ "STON": 100,
+ "Stylus": 76,
+ "SuperCollider": 133,
+ "Swift": 1128,
+ "SystemVerilog": 541,
+ "Tcl": 1133,
"Tea": 3,
- "TeX": 1155,
+ "TeX": 2701,
"Turing": 44,
"TXL": 213,
"TypeScript": 109,
"UnrealScript": 2873,
+ "VCL": 545,
"Verilog": 3778,
"VHDL": 42,
"VimL": 20,
- "Visual Basic": 345,
+ "Visual Basic": 581,
"Volt": 388,
"wisp": 1363,
"XC": 24,
- "XML": 5622,
+ "XML": 7057,
+ "Xojo": 807,
"XProc": 22,
"XQuery": 801,
"XSLT": 44,
"Xtend": 399,
- "YAML": 30
+ "YAML": 77,
+ "Zephir": 1085,
+ "Zimpl": 123
},
"languages": {
"ABAP": 1,
"Agda": 1,
+ "Alloy": 3,
"ApacheConf": 3,
"Apex": 6,
"AppleScript": 7,
"Arduino": 1,
"AsciiDoc": 3,
+ "AspectJ": 2,
+ "Assembly": 4,
+ "ATS": 10,
"AutoHotkey": 1,
"Awk": 1,
"BlitzBasic": 3,
"Bluespec": 2,
"Brightscript": 1,
- "C": 26,
+ "C": 29,
+ "C#": 2,
+ "C++": 29,
"Ceylon": 1,
+ "Cirru": 9,
"Clojure": 7,
"COBOL": 4,
"CoffeeScript": 9,
- "Common Lisp": 1,
+ "Common Lisp": 3,
+ "Component Pascal": 2,
"Coq": 12,
"Creole": 1,
+ "Crystal": 3,
"CSS": 2,
"Cuda": 2,
"Dart": 1,
"Diff": 1,
"DM": 1,
+ "Dogescript": 1,
+ "E": 6,
+ "Eagle": 2,
"ECL": 1,
"edn": 1,
"Elm": 3,
"Emacs Lisp": 2,
"Erlang": 5,
"fish": 3,
+ "Forth": 7,
+ "Frege": 4,
+ "Game Maker Language": 13,
+ "GAMS": 1,
+ "GAP": 7,
"GAS": 1,
- "GLSL": 3,
- "Gosu": 5,
- "Groovy": 2,
+ "GLSL": 5,
+ "Gnuplot": 6,
+ "Gosu": 4,
+ "Grammatical Framework": 41,
+ "Groovy": 5,
"Groovy Server Pages": 4,
"Haml": 1,
"Handlebars": 2,
+ "Haskell": 3,
+ "HTML": 2,
+ "Hy": 2,
+ "IDL": 4,
"Idris": 1,
+ "Inform 7": 2,
"INI": 2,
"Ioke": 1,
+ "Isabelle": 1,
"Jade": 1,
"Java": 6,
- "JavaScript": 20,
+ "JavaScript": 22,
"JSON": 4,
+ "JSON5": 2,
+ "JSONiq": 2,
+ "JSONLD": 1,
"Julia": 1,
+ "Kit": 1,
"Kotlin": 1,
"KRL": 1,
+ "Lasso": 4,
+ "Latte": 2,
"Less": 1,
"LFE": 4,
+ "Liquid": 2,
"Literate Agda": 1,
"Literate CoffeeScript": 1,
"LiveScript": 1,
"Logos": 1,
"Logtalk": 1,
"Lua": 3,
- "M": 28,
+ "M": 29,
"Makefile": 2,
"Markdown": 1,
+ "Mask": 1,
+ "Mathematica": 6,
"Matlab": 39,
"Max": 3,
"MediaWiki": 1,
+ "Mercury": 9,
"Monkey": 1,
+ "Moocode": 3,
+ "MoonScript": 1,
+ "MTML": 1,
"Nemerle": 1,
"NetLogo": 1,
"Nginx": 1,
"Nimrod": 1,
+ "Nix": 1,
"NSIS": 2,
"Nu": 2,
"Objective-C": 19,
+ "Objective-C++": 2,
"OCaml": 2,
"Omgrofl": 1,
"Opa": 2,
"OpenCL": 2,
"OpenEdge ABL": 5,
"Org": 1,
- "Oxygene": 2,
+ "Ox": 3,
+ "Oxygene": 1,
+ "Pan": 1,
"Parrot Assembly": 1,
"Parrot Internal Representation": 1,
"Pascal": 1,
- "Perl": 14,
+ "PAWN": 1,
+ "Perl": 15,
+ "Perl6": 3,
"PHP": 9,
+ "Pike": 2,
+ "Pod": 1,
"PogoScript": 1,
+ "PostScript": 1,
"PowerShell": 2,
"Processing": 1,
- "Prolog": 6,
+ "Prolog": 5,
+ "Propeller Spin": 10,
"Protocol Buffer": 1,
- "Python": 7,
+ "PureScript": 4,
+ "Python": 10,
"QMake": 4,
- "R": 2,
+ "R": 7,
"Racket": 2,
"Ragel in Ruby Host": 3,
"RDoc": 1,
- "C++": 19,
- "Forth": 7,
- "Lasso": 4,
- "MoonScript": 1,
- "Rebol": 1,
+ "Rebol": 6,
+ "Red": 2,
+ "RMarkdown": 1,
"RobotFramework": 3,
"Ruby": 17,
"Rust": 1,
+ "SAS": 2,
"Sass": 2,
- "Scala": 3,
+ "Scala": 4,
"Scaml": 1,
- "Scheme": 1,
+ "Scheme": 2,
"Scilab": 3,
"SCSS": 1,
"Shell": 37,
+ "ShellSession": 3,
+ "Shen": 3,
"Slash": 1,
+ "Slim": 1,
+ "Smalltalk": 3,
+ "SourcePawn": 1,
+ "SQL": 5,
"Squirrel": 1,
- "Standard ML": 2,
- "SuperCollider": 2,
+ "Standard ML": 5,
+ "Stata": 7,
+ "STON": 7,
+ "Stylus": 1,
+ "SuperCollider": 1,
+ "Swift": 43,
+ "SystemVerilog": 4,
+ "Tcl": 2,
"Tea": 1,
- "TeX": 1,
+ "TeX": 2,
"Turing": 1,
"TXL": 1,
"TypeScript": 3,
"UnrealScript": 2,
+ "VCL": 2,
"Verilog": 13,
"VHDL": 1,
"VimL": 2,
- "Visual Basic": 1,
+ "Visual Basic": 3,
"Volt": 1,
"wisp": 1,
"XC": 1,
- "XML": 3,
+ "XML": 13,
+ "Xojo": 6,
"XProc": 1,
"XQuery": 1,
"XSLT": 1,
"Xtend": 2,
- "YAML": 1
+ "YAML": 2,
+ "Zephir": 5,
+ "Zimpl": 1
},
- "md5": "3b94c2e2a38e812cdf16b2e91e51695b"
+ "md5": "72caade4a1a1dc14e10dd5478a6a5978"
}
\ No newline at end of file
diff --git a/lib/linguist/vendor.yml b/lib/linguist/vendor.yml
index 2bc71b72..4d8481e5 100644
--- a/lib/linguist/vendor.yml
+++ b/lib/linguist/vendor.yml
@@ -10,7 +10,7 @@
## Vendor Conventions ##
# Caches
-- cache/
+- (^|/)cache/
# Dependencies
- ^[Dd]ependencies/
@@ -27,11 +27,18 @@
# Node dependencies
- node_modules/
+# Bower Components
+- bower_components/
+
# Erlang bundles
- ^rebar$
# Bootstrap minified css and js
-- (^|/)bootstrap([^.]*)(\.min)\.(js|css)$
+- (^|/)bootstrap([^.]*)(\.min)?\.(js|css)$
+
+# Foundation css
+- foundation.min.css
+- foundation.css
# Vendored dependencies
- thirdparty/
@@ -40,6 +47,9 @@
# Debian packaging
- ^debian/
+# Haxelib projects often contain a neko bytecode file named run.n
+- run.n$
+
## Commonly Bundled JavaScript frameworks ##
# jQuery
@@ -56,6 +66,9 @@
- (^|/)controls\.js$
- (^|/)dragdrop\.js$
+# Typescript definition files
+- (.*?)\.d\.ts$
+
# MooTools
- (^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$
@@ -82,6 +95,19 @@
- (^|/)shCore\.js$
- (^|/)shLegacy\.js$
+# AngularJS
+- (^|/)angular([^.]*)(\.min)?\.js$
+
+# D3.js
+- (^|\/)d3(\.v\d+)?([^.]*)(\.min)?\.js$
+
+# React
+- (^|/)react(-[^.]*)?(\.min)?\.js$
+
+# Modernizr
+- (^|/)modernizr\-\d\.\d+(\.\d+)?(\.min)?\.js$
+- (^|/)modernizr\.custom\.\d+\.js$
+
## Python ##
# django
@@ -101,10 +127,18 @@
# Sparkle
- (^|/)Sparkle/
+## Groovy ##
+
+# Gradle
+- (^|/)gradlew$
+- (^|/)gradlew\.bat$
+- (^|/)gradle/wrapper/
+
## .NET ##
# Visual Studio IntelliSense
- -vsdoc\.js$
+- \.intellisense\.js$
# jQuery validation plugin (MS bundles this with asp.net mvc)
- (^|/)jquery([^.]*)\.validate(\.unobtrusive)?(\.min)?\.js$
@@ -114,7 +148,7 @@
- (^|/)[Mm]icrosoft([Mm]vc)?([Aa]jax|[Vv]alidation)(\.debug)?\.js$
# NuGet
-- ^[Pp]ackages/
+- ^[Pp]ackages\/.+\.\d+\/
# ExtJS
- (^|/)extjs/.*?\.js$
@@ -134,12 +168,16 @@
- (^|/)extjs/src/
- (^|/)extjs/welcome/
+# Html5shiv
+- (^|/)html5shiv(\.min)?\.js$
+
# Samples folders
- ^[Ss]amples/
# LICENSE, README, git config files
- ^COPYING$
- LICENSE$
+- License$
- gitattributes$
- gitignore$
- gitmodules$
@@ -158,3 +196,15 @@
# .DS_Store's
- .[Dd][Ss]_[Ss]tore$
+
+# Mercury --use-subdirs
+- Mercury/
+
+# R packages
+- ^vignettes/
+- ^inst/extdata/
+
+# Octicons
+- octicons.css
+- octicons.min.css
+- sprockets-octicons.scss
diff --git a/lib/linguist/version.rb b/lib/linguist/version.rb
new file mode 100644
index 00000000..6704b3fb
--- /dev/null
+++ b/lib/linguist/version.rb
@@ -0,0 +1,3 @@
+module Linguist
+ VERSION = "2.12.0"
+end
diff --git a/samples/ATS/CoYonedaLemma.dats b/samples/ATS/CoYonedaLemma.dats
new file mode 100644
index 00000000..aeac8bb1
--- /dev/null
+++ b/samples/ATS/CoYonedaLemma.dats
@@ -0,0 +1,110 @@
+(* ****** ****** *)
+//
+// HX-2014-01
+// CoYoneda Lemma:
+//
+(* ****** ****** *)
+//
+#include
+"share/atspre_staload.hats"
+//
+(* ****** ****** *)
+
+staload
+"libats/ML/SATS/basis.sats"
+staload
+"libats/ML/SATS/list0.sats"
+
+(* ****** ****** *)
+
+staload _ = "libats/ML/DATS/list0.dats"
+
+(* ****** ****** *)
+
+sortdef ftype = type -> type
+
+(* ****** ****** *)
+
+infixr (->) ->>
+typedef ->> (a:type, b:type) = a - b
+
+(* ****** ****** *)
+
+typedef
+functor(F:ftype) =
+ {a,b:type} (a ->> b) ->> F(a) ->> F(b)
+
+(* ****** ****** *)
+
+typedef
+list0 (a:type) = list0 (a)
+extern
+val functor_list0 : functor (list0)
+
+(* ****** ****** *)
+
+implement
+functor_list0{a,b}
+ (f) = lam xs => list0_map (xs, f)
+
+(* ****** ****** *)
+
+datatype
+CoYoneda
+ (F:ftype, r:type) = {a:type} CoYoneda of (a ->> r, F(a))
+// end of [CoYoneda]
+
+(* ****** ****** *)
+//
+extern
+fun CoYoneda_phi
+ : {F:ftype}functor(F) -> {r:type} (F (r) ->> CoYoneda (F, r))
+extern
+fun CoYoneda_psi
+ : {F:ftype}functor(F) -> {r:type} (CoYoneda (F, r) ->> F (r))
+//
+(* ****** ****** *)
+
+implement
+CoYoneda_phi(ftor) = lam (fx) => CoYoneda (lam x => x, fx)
+implement
+CoYoneda_psi(ftor) = lam (CoYoneda(f, fx)) => ftor (f) (fx)
+
+(* ****** ****** *)
+
+datatype int0 = I of (int)
+datatype bool = True | False // boxed boolean
+
+(* ****** ****** *)
+//
+fun bool2string
+ (x:bool): string =
+(
+ case+ x of True() => "True" | False() => "False"
+)
+//
+implement
+fprint_val (out, x) = fprint (out, bool2string(x))
+//
+(* ****** ****** *)
+
+fun int2bool (i: int0): bool =
+ let val+I(i) = i in if i > 0 then True else False end
+
+(* ****** ****** *)
+
+val myintlist0 = g0ofg1($list{int0}((I)1, (I)0, (I)1, (I)0, (I)0))
+val myboolist0 = CoYoneda{list0,bool}{int0}(lam (i) => int2bool(i), myintlist0)
+val myboolist0 = CoYoneda_psi{list0}(functor_list0){bool}(myboolist0)
+
+(* ****** ****** *)
+
+val ((*void*)) = fprintln! (stdout_ref, "myboolist0 = ", myboolist0)
+
+(* ****** ****** *)
+
+implement main0 () = ()
+
+(* ****** ****** *)
+
+(* end of [CoYonedaLemma.dats] *)
diff --git a/samples/ATS/DiningPhil2.dats b/samples/ATS/DiningPhil2.dats
new file mode 100644
index 00000000..55c39654
--- /dev/null
+++ b/samples/ATS/DiningPhil2.dats
@@ -0,0 +1,178 @@
+(* ****** ****** *)
+//
+// HX-2013-11
+//
+// Implementing a variant of
+// the problem of Dining Philosophers
+//
+(* ****** ****** *)
+//
+#include
+"share/atspre_define.hats"
+#include
+"share/atspre_staload.hats"
+//
+(* ****** ****** *)
+
+staload
+UN = "prelude/SATS/unsafe.sats"
+
+(* ****** ****** *)
+
+staload "libc/SATS/stdlib.sats"
+staload "libc/SATS/unistd.sats"
+
+(* ****** ****** *)
+
+staload "{$LIBATSHWXI}/teaching/mythread/SATS/channel.sats"
+
+(* ****** ****** *)
+
+staload _ = "libats/DATS/deqarray.dats"
+staload _ = "{$LIBATSHWXI}/teaching/mythread/DATS/channel.dats"
+
+(* ****** ****** *)
+
+staload "./DiningPhil2.sats"
+
+(* ****** ****** *)
+
+implement phil_left (n) = n
+implement phil_right (n) = (n+1) \nmod NPHIL
+
+(* ****** ****** *)
+//
+extern
+fun randsleep (n: intGte(1)): void
+//
+implement
+randsleep (n) =
+ ignoret (sleep($UN.cast{uInt}(rand() mod n + 1)))
+// end of [randsleep]
+//
+(* ****** ****** *)
+
+implement
+phil_think (n) =
+{
+val () = println! ("phil_think(", n, ") starts")
+val () = randsleep (6)
+val () = println! ("phil_think(", n, ") finishes")
+}
+
+(* ****** ****** *)
+
+implement
+phil_dine (n, lf, rf) =
+{
+val () = println! ("phil_dine(", n, ") starts")
+val () = randsleep (3)
+val () = println! ("phil_dine(", n, ") finishes")
+}
+
+(* ****** ****** *)
+
+implement
+phil_loop (n) = let
+//
+val () = phil_think (n)
+//
+val nl = phil_left (n)
+val nr = phil_right (n)
+//
+val ch_lfork = fork_changet (nl)
+val ch_rfork = fork_changet (nr)
+//
+val lf = channel_takeout (ch_lfork)
+val () = println! ("phil_loop(", n, ") picks left fork")
+//
+val () = randsleep (2) // HX: try to actively induce deadlock
+//
+val rf = channel_takeout (ch_rfork)
+val () = println! ("phil_loop(", n, ") picks right fork")
+//
+val () = phil_dine (n, lf, rf)
+//
+val ch_forktray = forktray_changet ()
+val () = channel_insert (ch_forktray, lf)
+val () = channel_insert (ch_forktray, rf)
+//
+in
+ phil_loop (n)
+end // end of [phil_loop]
+
+(* ****** ****** *)
+
+implement
+cleaner_wash (f) =
+{
+val f = fork_get_num (f)
+val () = println! ("cleaner_wash(", f, ") starts")
+val () = randsleep (1)
+val () = println! ("cleaner_wash(", f, ") finishes")
+}
+
+(* ****** ****** *)
+
+implement
+cleaner_return (f) =
+{
+ val n = fork_get_num (f)
+ val ch = fork_changet (n)
+ val () = channel_insert (ch, f)
+}
+
+(* ****** ****** *)
+
+implement
+cleaner_loop () = let
+//
+val ch = forktray_changet ()
+val f0 = channel_takeout (ch)
+//
+val () = cleaner_wash (f0)
+val () = cleaner_return (f0)
+//
+in
+ cleaner_loop ()
+end // end of [cleaner_loop]
+
+(* ****** ****** *)
+
+dynload "DiningPhil2.sats"
+dynload "DiningPhil2_fork.dats"
+dynload "DiningPhil2_thread.dats"
+
+(* ****** ****** *)
+
+local
+//
+staload
+"{$LIBATSHWXI}/teaching/mythread/SATS/mythread.sats"
+//
+in (* in of [local] *)
+//
+val () = mythread_create_cloptr (llam () => phil_loop (0))
+val () = mythread_create_cloptr (llam () => phil_loop (1))
+val () = mythread_create_cloptr (llam () => phil_loop (2))
+val () = mythread_create_cloptr (llam () => phil_loop (3))
+val () = mythread_create_cloptr (llam () => phil_loop (4))
+//
+val () = mythread_create_cloptr (llam () => cleaner_loop ())
+//
+end // end of [local]
+
+(* ****** ****** *)
+
+implement
+main0 () =
+{
+//
+val () = println! ("DiningPhil2: starting")
+val ((*void*)) = while (true) ignoret (sleep(1))
+//
+} (* end of [main0] *)
+
+(* ****** ****** *)
+
+(* end of [DiningPhil2.dats] *)
diff --git a/samples/ATS/DiningPhil2.sats b/samples/ATS/DiningPhil2.sats
new file mode 100644
index 00000000..bc7e96be
--- /dev/null
+++ b/samples/ATS/DiningPhil2.sats
@@ -0,0 +1,71 @@
+(* ****** ****** *)
+//
+// HX-2013-11
+//
+// Implementing a variant of
+// the problem of Dining Philosophers
+//
+(* ****** ****** *)
+
+#include
+"share/atspre_define.hats"
+
+(* ****** ****** *)
+
+staload "{$LIBATSHWXI}/teaching/mythread/SATS/channel.sats"
+
+(* ****** ****** *)
+
+%{#
+#define NPHIL 5
+%} // end of [%{#]
+#define NPHIL 5
+
+(* ****** ****** *)
+
+typedef nphil = natLt(NPHIL)
+
+(* ****** ****** *)
+
+fun phil_left (n: nphil): nphil
+fun phil_right (n: nphil): nphil
+
+(* ****** ****** *)
+//
+fun phil_loop (n: nphil): void
+//
+(* ****** ****** *)
+
+fun cleaner_loop ((*void*)): void
+
+(* ****** ****** *)
+
+absvtype fork_vtype = ptr
+vtypedef fork = fork_vtype
+
+(* ****** ****** *)
+
+fun fork_get_num (!fork): nphil
+
+(* ****** ****** *)
+
+fun phil_dine
+ (n: nphil, lf: !fork, rf: !fork): void
+// end of [phil_dine]
+
+fun phil_think (n: nphil): void
+
+(* ****** ****** *)
+
+fun cleaner_wash (f: !fork): void
+fun cleaner_return (f: fork): void
+
+(* ****** ****** *)
+//
+fun fork_changet (n: nphil): channel(fork)
+//
+fun forktray_changet ((*void*)): channel(fork)
+//
+(* ****** ****** *)
+
+(* end of [DiningPhil2.sats] *)
diff --git a/samples/ATS/DiningPhil2_fork.dats b/samples/ATS/DiningPhil2_fork.dats
new file mode 100644
index 00000000..a6a8d4df
--- /dev/null
+++ b/samples/ATS/DiningPhil2_fork.dats
@@ -0,0 +1,89 @@
+(* ****** ****** *)
+//
+// HX-2013-11
+//
+// Implementing a variant of
+// the problem of Dining Philosophers
+//
+(* ****** ****** *)
+//
+#include
+"share/atspre_define.hats"
+#include
+"share/atspre_staload.hats"
+//
+(* ****** ****** *)
+
+staload
+UN = "prelude/SATS/unsafe.sats"
+
+(* ****** ****** *)
+
+staload "{$LIBATSHWXI}/teaching/mythread/SATS/channel.sats"
+
+(* ****** ****** *)
+
+staload _ = "libats/DATS/deqarray.dats"
+staload _ = "{$LIBATSHWXI}/teaching/mythread/DATS/channel.dats"
+
+(* ****** ****** *)
+
+staload "./DiningPhil2.sats"
+
+(* ****** ****** *)
+
+datavtype fork = FORK of (nphil)
+
+(* ****** ****** *)
+
+assume fork_vtype = fork
+
+(* ****** ****** *)
+
+implement
+fork_get_num (f) = let val FORK(n) = f in n end
+
+(* ****** ****** *)
+
+local
+
+val
+the_forkarray = let
+//
+typedef t = channel(fork)
+//
+implement
+array_tabulate$fopr
+ (n) = ch where
+{
+ val n = $UN.cast{nphil}(n)
+ val ch = channel_create_exn (i2sz(2))
+ val () = channel_insert (ch, FORK (n))
+}
+//
+in
+ arrayref_tabulate (i2sz(NPHIL))
+end // end of [val]
+
+in (* in of [local] *)
+
+implement fork_changet (n) = the_forkarray[n]
+
+end // end of [local]
+
+(* ****** ****** *)
+
+local
+
+val the_forktray =
+ channel_create_exn (i2sz(NPHIL+1))
+
+in (* in of [local] *)
+
+implement forktray_changet () = the_forktray
+
+end // end of [local]
+
+(* ****** ****** *)
+
+(* end of [DiningPhil2_fork.dats] *)
diff --git a/samples/ATS/DiningPhil2_thread.dats b/samples/ATS/DiningPhil2_thread.dats
new file mode 100644
index 00000000..be73840b
--- /dev/null
+++ b/samples/ATS/DiningPhil2_thread.dats
@@ -0,0 +1,43 @@
+(* ****** ****** *)
+//
+// HX-2013-11
+//
+// Implementing a variant of
+// the problem of Dining Philosophers
+//
+(* ****** ****** *)
+//
+#include "share/atspre_define.hats"
+#include "share/atspre_staload.hats"
+//
+(* ****** ****** *)
+
+staload "{$LIBATSHWXI}/teaching/mythread/SATS/mythread.sats"
+
+(* ****** ****** *)
+
+local
+//
+#include "{$LIBATSHWXI}/teaching/mythread/DATS/mythread.dats"
+//
+in (* in of [local] *)
+//
+// HX: it is intentionally left to be empty
+//
+end // end of [local]
+
+(* ****** ****** *)
+
+local
+//
+#include "{$LIBATSHWXI}/teaching/mythread/DATS/mythread_posix.dats"
+//
+in (* in of [local] *)
+//
+// HX: it is intentionally left to be empty
+//
+end // end of [local]
+
+(* ****** ****** *)
+
+(* end of [DiningPhil2_thread.dats] *)
diff --git a/samples/ATS/YonedaLemma.dats b/samples/ATS/YonedaLemma.dats
new file mode 100644
index 00000000..cd3c31e6
--- /dev/null
+++ b/samples/ATS/YonedaLemma.dats
@@ -0,0 +1,178 @@
+(* ****** ****** *)
+//
+// HX-2014-01
+// Yoneda Lemma:
+// The hardest "trivial" theorem :)
+//
+(* ****** ****** *)
+//
+#include
+"share/atspre_staload.hats"
+//
+(* ****** ****** *)
+
+staload
+"libats/ML/SATS/basis.sats"
+staload
+"libats/ML/SATS/list0.sats"
+staload
+"libats/ML/SATS/option0.sats"
+
+(* ****** ****** *)
+
+staload _ = "libats/ML/DATS/list0.dats"
+staload _ = "libats/ML/DATS/option0.dats"
+
+(* ****** ****** *)
+
+sortdef ftype = type -> type
+
+(* ****** ****** *)
+
+infixr (->) ->>
+typedef ->> (a:type, b:type) = a - b
+
+(* ****** ****** *)
+
+typedef
+functor(F:ftype) =
+ {a,b:type} (a ->> b) ->> F(a) ->> F(b)
+
+(* ****** ****** *)
+
+typedef
+list0 (a:type) = list0 (a)
+extern
+val functor_list0 : functor (list0)
+
+(* ****** ****** *)
+
+implement
+functor_list0{a,b}
+ (f) = lam xs => list0_map (xs, f)
+
+(* ****** ****** *)
+
+typedef
+option0 (a:type) = option0 (a)
+extern
+val functor_option0 : functor (option0)
+
+(* ****** ****** *)
+
+implement
+functor_option0{a,b}
+ (f) = lam opt => option0_map (opt, f)
+
+(* ****** ****** *)
+
+extern
+val functor_homres
+ : {c:type} functor (lam(r:type) => c ->> r)
+
+(* ****** ****** *)
+
+implement
+functor_homres{c}{a,b} (f) = lam (r) => lam (x) => f (r(x))
+
+(* ****** ****** *)
+//
+extern
+fun Yoneda_phi : {F:ftype}functor(F) ->
+ {a:type}F(a) ->> ({r:type}(a ->> r) ->> F(r))
+extern
+fun Yoneda_psi : {F:ftype}functor(F) ->
+ {a:type}({r:type}(a ->> r) ->> F(r)) ->> F(a)
+//
+(* ****** ****** *)
+//
+implement
+Yoneda_phi
+ (ftor) = lam(fx) => lam (m) => ftor(m)(fx)
+//
+implement
+Yoneda_psi (ftor) = lam(mf) => mf(lam x => x)
+//
+(* ****** ****** *)
+
+(*
+
+(* ****** ****** *)
+//
+// HX-2014-01-05:
+// Another version based on Natural Transformation
+//
+(* ****** ****** *)
+
+typedef
+natrans(F:ftype, G:ftype) = {x:type} (F(x) ->> G(x))
+
+(* ****** ****** *)
+//
+extern
+fun Yoneda_phi_nat : {F:ftype}functor(F) ->
+ {a:type} F(a) ->> natrans(lam (r:type) => (a ->> r), F)
+extern
+fun Yoneda_psi_nat : {F:ftype}functor(F) ->
+ {a:type} natrans(lam (r:type) => (a ->> r), F) ->> F(a)
+//
+(* ****** ****** *)
+//
+implement
+Yoneda_phi_nat
+ (ftor) = lam(fx) => lam (m) => ftor(m)(fx)
+//
+implement
+Yoneda_psi_nat (ftor) = lam(mf) => mf(lam x => x)
+//
+(* ****** ****** *)
+
+*)
+
+(* ****** ****** *)
+
+datatype bool = True | False // boxed boolean
+
+(* ****** ****** *)
+//
+fun bool2string
+ (x:bool): string =
+(
+ case+ x of True() => "True" | False() => "False"
+)
+//
+implement
+fprint_val (out, x) = fprint (out, bool2string(x))
+//
+(* ****** ****** *)
+//
+val myboolist0 =
+ $list_t{bool}(True, False, True, False, False)
+val myboolist0 = g0ofg1_list (myboolist0)
+//
+(* ****** ****** *)
+//
+extern
+val Yoneda_bool_list0 : {r:type} (bool ->> r) ->> list0(r)
+//
+implement
+Yoneda_bool_list0 =
+ Yoneda_phi(functor_list0){bool}(myboolist0)
+//
+(* ****** ****** *)
+//
+val myboolist1 =
+ Yoneda_psi(functor_list0){bool}(Yoneda_bool_list0)
+//
+(* ****** ****** *)
+
+val () = fprintln! (stdout_ref, "myboolist0 = ", myboolist0)
+val () = fprintln! (stdout_ref, "myboolist1 = ", myboolist1)
+
+(* ****** ****** *)
+
+implement main0 () = ()
+
+(* ****** ****** *)
+
+(* end of [YonedaLemma.dats] *)
diff --git a/samples/ATS/linset.hats b/samples/ATS/linset.hats
new file mode 100644
index 00000000..29e44c44
--- /dev/null
+++ b/samples/ATS/linset.hats
@@ -0,0 +1,187 @@
+(***********************************************************************)
+(* *)
+(* Applied Type System *)
+(* *)
+(***********************************************************************)
+
+(*
+** ATS/Postiats - Unleashing the Potential of Types!
+** Copyright (C) 2011-2013 Hongwei Xi, ATS Trustful Software, Inc.
+** All rights reserved
+**
+** ATS is free software; you can redistribute it and/or modify it under
+** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the
+** Free Software Foundation; either version 3, or (at your option) any
+** later version.
+**
+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY
+** WARRANTY; without even the implied warranty of MERCHANTABILITY or
+** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+** for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with ATS; see the file COPYING. If not, please write to the
+** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+** 02110-1301, USA.
+*)
+
+(* ****** ****** *)
+
+(* Author: Hongwei Xi *)
+(* Authoremail: hwxi AT cs DOT bu DOT edu *)
+(* Start time: December, 2012 *)
+
+(* ****** ****** *)
+//
+// HX: shared by linset_listord (* ordered list *)
+// HX: shared by linset_avltree (* AVL-tree-based *)
+//
+(* ****** ****** *)
+//
+// HX-2013-02:
+// for sets of nonlinear elements
+//
+absvtype set_vtype (a:t@ype+) = ptr
+//
+(* ****** ****** *)
+
+vtypedef set (a:t0p) = set_vtype (a)
+
+(* ****** ****** *)
+
+fun{a:t0p}
+compare_elt_elt (x1: a, x2: a):<> int
+
+(* ****** ****** *)
+
+fun{} linset_nil{a:t0p} ():<> set(a)
+fun{} linset_make_nil{a:t0p} ():<> set(a)
+
+(* ****** ****** *)
+
+fun{a:t0p} linset_sing (x: a): set(a)
+fun{a:t0p} linset_make_sing (x: a): set(a)
+
+(* ****** ****** *)
+
+fun{a:t0p}
+linset_make_list (xs: List(INV(a))): set(a)
+
+(* ****** ****** *)
+
+fun{}
+linset_is_nil {a:t0p} (xs: !set(INV(a))):<> bool
+fun{}
+linset_isnot_nil {a:t0p} (xs: !set(INV(a))):<> bool
+
+(* ****** ****** *)
+
+fun{a:t0p} linset_size (!set(INV(a))): size_t
+
+(* ****** ****** *)
+
+fun{a:t0p}
+linset_is_member (xs: !set(INV(a)), x0: a):<> bool
+fun{a:t0p}
+linset_isnot_member (xs: !set(INV(a)), x0: a):<> bool
+
+(* ****** ****** *)
+
+fun{a:t0p}
+linset_copy (!set(INV(a))): set(a)
+fun{a:t0p}
+linset_free (xs: set(INV(a))): void
+
+(* ****** ****** *)
+//
+fun{a:t0p}
+linset_insert
+ (xs: &set(INV(a)) >> _, x0: a): bool
+//
+(* ****** ****** *)
+//
+fun{a:t0p}
+linset_takeout
+(
+ &set(INV(a)) >> _, a, res: &(a?) >> opt(a, b)
+) : #[b:bool] bool(b) // endfun
+fun{a:t0p}
+linset_takeout_opt (&set(INV(a)) >> _, a): Option_vt(a)
+//
+(* ****** ****** *)
+//
+fun{a:t0p}
+linset_remove
+ (xs: &set(INV(a)) >> _, x0: a): bool
+//
+(* ****** ****** *)
+//
+// HX: choosing an element in an unspecified manner
+//
+fun{a:t0p}
+linset_choose
+(
+ xs: !set(INV(a)), x: &a? >> opt (a, b)
+) : #[b:bool] bool(b)
+//
+fun{a:t0p}
+linset_choose_opt (xs: !set(INV(a))): Option_vt(a)
+//
+(* ****** ****** *)
+
+fun{a:t0p}
+linset_takeoutmax
+(
+ xs: &set(INV(a)) >> _, res: &a? >> opt(a, b)
+) : #[b:bool] bool (b)
+fun{a:t0p}
+linset_takeoutmax_opt (xs: &set(INV(a)) >> _): Option_vt(a)
+
+(* ****** ****** *)
+
+fun{a:t0p}
+linset_takeoutmin
+(
+ xs: &set(INV(a)) >> _, res: &a? >> opt(a, b)
+) : #[b:bool] bool (b)
+fun{a:t0p}
+linset_takeoutmin_opt (xs: &set(INV(a)) >> _): Option_vt(a)
+
+(* ****** ****** *)
+//
+fun{}
+fprint_linset$sep (FILEref): void // ", "
+//
+fun{a:t0p}
+fprint_linset (out: FILEref, xs: !set(INV(a))): void
+//
+overload fprint with fprint_linset
+//
+(* ****** ****** *)
+//
+fun{
+a:t0p}{env:vt0p
+} linset_foreach$fwork
+ (x: a, env: &(env) >> _): void
+//
+fun{a:t0p}
+linset_foreach (set: !set(INV(a))): void
+fun{
+a:t0p}{env:vt0p
+} linset_foreach_env
+ (set: !set(INV(a)), env: &(env) >> _): void
+// end of [linset_foreach_env]
+//
+(* ****** ****** *)
+
+fun{a:t0p}
+linset_listize (xs: set(INV(a))): List0_vt (a)
+
+(* ****** ****** *)
+
+fun{a:t0p}
+linset_listize1 (xs: !set(INV(a))): List0_vt (a)
+
+(* ****** ****** *)
+
+(* end of [linset.hats] *)
diff --git a/samples/ATS/linset_listord.dats b/samples/ATS/linset_listord.dats
new file mode 100644
index 00000000..eb7dd642
--- /dev/null
+++ b/samples/ATS/linset_listord.dats
@@ -0,0 +1,504 @@
+(***********************************************************************)
+(* *)
+(* Applied Type System *)
+(* *)
+(***********************************************************************)
+
+(*
+** ATS/Postiats - Unleashing the Potential of Types!
+** Copyright (C) 2011-2013 Hongwei Xi, ATS Trustful Software, Inc.
+** All rights reserved
+**
+** ATS is free software; you can redistribute it and/or modify it under
+** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the
+** Free Software Foundation; either version 3, or (at your option) any
+** later version.
+**
+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY
+** WARRANTY; without even the implied warranty of MERCHANTABILITY or
+** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+** for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with ATS; see the file COPYING. If not, please write to the
+** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+** 02110-1301, USA.
+*)
+
+(* ****** ****** *)
+
+(* Author: Hongwei Xi *)
+(* Authoremail: hwxi AT cs DOT bu DOT edu *)
+(* Start time: February, 2013 *)
+
+(* ****** ****** *)
+//
+// HX-2013-08:
+// a set is represented as a sorted list in descending order;
+// note that descending order is chosen to faciliate set comparison
+//
+(* ****** ****** *)
+
+staload
+UN = "prelude/SATS/unsafe.sats"
+
+(* ****** ****** *)
+
+staload "libats/SATS/linset_listord.sats"
+
+(* ****** ****** *)
+
+#include "./SHARE/linset.hats" // code reuse
+#include "./SHARE/linset_node.hats" // code reuse
+
+(* ****** ****** *)
+
+assume
+set_vtype (elt:t@ype) = List0_vt (elt)
+
+(* ****** ****** *)
+
+implement{}
+linset_nil () = list_vt_nil ()
+implement{}
+linset_make_nil () = list_vt_nil ()
+
+(* ****** ****** *)
+
+implement
+{a}(*tmp*)
+linset_sing
+ (x) = list_vt_cons{a}(x, list_vt_nil)
+// end of [linset_sing]
+implement{a}
+linset_make_sing
+ (x) = list_vt_cons{a}(x, list_vt_nil)
+// end of [linset_make_sing]
+
+(* ****** ****** *)
+
+implement{}
+linset_is_nil (xs) = list_vt_is_nil (xs)
+implement{}
+linset_isnot_nil (xs) = list_vt_is_cons (xs)
+
+(* ****** ****** *)
+
+implement{a}
+linset_size (xs) =
+ let val n = list_vt_length(xs) in i2sz(n) end
+// end of [linset_size]
+
+(* ****** ****** *)
+
+implement{a}
+linset_is_member
+ (xs, x0) = let
+//
+fun aux
+ {n:nat} ..
+(
+ xs: !list_vt (a, n)
+) :<> bool = let
+in
+//
+case+ xs of
+| list_vt_cons (x, xs) => let
+ val sgn = compare_elt_elt (x0, x) in
+ if sgn > 0 then false else (if sgn < 0 then aux (xs) else true)
+ end // end of [list_vt_cons]
+| list_vt_nil ((*void*)) => false
+//
+end // end of [aux]
+//
+in
+ aux (xs)
+end // end of [linset_is_member]
+
+(* ****** ****** *)
+
+implement{a}
+linset_copy (xs) = list_vt_copy (xs)
+implement{a}
+linset_free (xs) = list_vt_free (xs)
+
+(* ****** ****** *)
+
+implement{a}
+linset_insert
+ (xs, x0) = let
+//
+fun
+mynode_cons
+ {n:nat} .<>.
+(
+ nx: mynode1 (a), xs: list_vt (a, n)
+) : list_vt (a, n+1) = let
+//
+val xs1 =
+$UN.castvwtp0{List1_vt(a)}(nx)
+val+@list_vt_cons (_, xs2) = xs1
+prval () = $UN.cast2void (xs2); val () = (xs2 := xs)
+//
+in
+ fold@ (xs1); xs1
+end // end of [mynode_cons]
+//
+fun ins
+ {n:nat} .. // tail-recursive
+(
+ xs: &list_vt (a, n) >> list_vt (a, n1)
+) : #[n1:nat | n <= n1; n1 <= n+1] bool =
+(
+case+ xs of
+| @list_vt_cons
+ (x, xs1) => let
+ val sgn =
+ compare_elt_elt (x0, x)
+ // end of [val]
+ in
+ if sgn > 0 then let
+ prval () = fold@ (xs)
+ val nx = mynode_make_elt (x0)
+ val ((*void*)) = xs := mynode_cons (nx, xs)
+ in
+ false
+ end else if sgn < 0 then let
+ val ans = ins (xs1)
+ prval () = fold@ (xs)
+ in
+ ans
+ end else let // [x0] is found
+ prval () = fold@ (xs)
+ in
+ true (* [x0] in [xs] *)
+ end (* end of [if] *)
+ end // end of [list_vt_cons]
+| list_vt_nil () => let
+ val nx = mynode_make_elt (x0)
+ val ((*void*)) = xs := mynode_cons (nx, xs)
+ in
+ false
+ end // end of [list_vt_nil]
+) (* end of [ins] *)
+//
+in
+ $effmask_all (ins (xs))
+end // end of [linset_insert]
+
+(* ****** ****** *)
+
+(*
+//
+HX-2013-08:
+[linset_remove] moved up
+//
+implement{a}
+linset_remove
+ (xs, x0) = let
+//
+fun rem
+ {n:nat} .. // tail-recursive
+(
+ xs: &list_vt (a, n) >> list_vt (a, n1)
+) : #[n1:nat | n1 <= n; n <= n1+1] bool =
+(
+case+ xs of
+| @list_vt_cons
+ (x, xs1) => let
+ val sgn =
+ compare_elt_elt (x0, x)
+ // end of [val]
+ in
+ if sgn > 0 then let
+ prval () = fold@ (xs)
+ in
+ false
+ end else if sgn < 0 then let
+ val ans = rem (xs1)
+ prval () = fold@ (xs)
+ in
+ ans
+ end else let // x0 = x
+ val xs1_ = xs1
+ val ((*void*)) = free@{a}{0}(xs)
+ val () = xs := xs1_
+ in
+ true // [x0] in [xs]
+ end (* end of [if] *)
+ end // end of [list_vt_cons]
+| list_vt_nil () => false
+) (* end of [rem] *)
+//
+in
+ $effmask_all (rem (xs))
+end // end of [linset_remove]
+*)
+
+(* ****** ****** *)
+(*
+** By Brandon Barker
+*)
+implement
+{a}(*tmp*)
+linset_choose
+ (xs, x0) = let
+in
+//
+case+ xs of
+| list_vt_cons
+ (x, xs1) => let
+ val () = x0 := x
+ prval () = opt_some{a}(x0)
+ in
+ true
+ end // end of [list_vt_cons]
+| list_vt_nil () => let
+ prval () = opt_none{a}(x0)
+ in
+ false
+ end // end of [list_vt_nil]
+//
+end // end of [linset_choose]
+
+(* ****** ****** *)
+
+implement
+{a}{env}
+linset_foreach_env (xs, env) = let
+//
+implement
+list_vt_foreach$fwork
+ (x, env) = linset_foreach$fwork (x, env)
+//
+in
+ list_vt_foreach_env (xs, env)
+end // end of [linset_foreach_env]
+
+(* ****** ****** *)
+
+implement{a}
+linset_listize (xs) = xs
+
+(* ****** ****** *)
+
+implement{a}
+linset_listize1 (xs) = list_vt_copy (xs)
+
+(* ****** ****** *)
+//
+// HX: functions for processing mynodes
+//
+(* ****** ****** *)
+
+implement{
+} mynode_null{a} () =
+ $UN.castvwtp0{mynode(a,null)}(the_null_ptr)
+// end of [mynode_null]
+
+(* ****** ****** *)
+
+implement
+{a}(*tmp*)
+mynode_make_elt
+ (x) = let
+//
+val nx = list_vt_cons{a}{0}(x, _ )
+//
+in
+ $UN.castvwtp0{mynode1(a)}(nx)
+end // end of [mynode_make_elt]
+
+(* ****** ****** *)
+
+implement{
+} mynode_free
+ {a}(nx) = () where {
+val nx =
+ $UN.castvwtp0{List1_vt(a)}(nx)
+//
+val+~list_vt_cons (_, nx2) = nx
+//
+prval ((*void*)) = $UN.cast2void (nx2)
+//
+} (* end of [mynode_free] *)
+
+(* ****** ****** *)
+
+implement
+{a}(*tmp*)
+mynode_get_elt
+ (nx) = (x) where {
+//
+val nx1 =
+ $UN.castvwtp1{List1_vt(a)}(nx)
+//
+val+list_vt_cons (x, _) = nx1
+//
+prval ((*void*)) = $UN.cast2void (nx1)
+//
+} (* end of [mynode_get_elt] *)
+
+(* ****** ****** *)
+
+implement
+{a}(*tmp*)
+mynode_set_elt
+ {l} (nx, x0) =
+{
+//
+val nx1 =
+ $UN.castvwtp1{List1_vt(a)}(nx)
+//
+val+@list_vt_cons (x, _) = nx1
+//
+val () = x := x0
+//
+prval () = fold@ (nx1)
+prval () = $UN.cast2void (nx1)
+//
+prval () = __assert (nx) where
+{
+ extern praxi __assert (nx: !mynode(a?, l) >> mynode (a, l)): void
+} (* end of [prval] *)
+//
+} (* end of [mynode_set_elt] *)
+
+(* ****** ****** *)
+
+implement
+{a}(*tmp*)
+mynode_getfree_elt
+ (nx) = (x) where {
+//
+val nx =
+ $UN.castvwtp0{List1_vt(a)}(nx)
+//
+val+~list_vt_cons (x, nx2) = nx
+//
+prval ((*void*)) = $UN.cast2void (nx2)
+//
+} (* end of [mynode_getfree_elt] *)
+
+(* ****** ****** *)
+
+(*
+fun{a:t0p}
+linset_takeout_ngc
+ (set: &set(INV(a)) >> _, x0: a): mynode0 (a)
+// end of [linset_takeout_ngc]
+*)
+implement
+{a}(*tmp*)
+linset_takeout_ngc
+ (set, x0) = let
+//
+fun takeout
+(
+ xs: &List0_vt (a) >> _
+) : mynode0(a) = let
+in
+//
+case+ xs of
+| @list_vt_cons
+ (x, xs1) => let
+ prval pf_x = view@x
+ prval pf_xs1 = view@xs1
+ val sgn =
+ compare_elt_elt (x0, x)
+ // end of [val]
+ in
+ if sgn > 0 then let
+ prval () = fold@ (xs)
+ in
+ mynode_null{a}((*void*))
+ end else if sgn < 0 then let
+ val res = takeout (xs1)
+ prval ((*void*)) = fold@ (xs)
+ in
+ res
+ end else let // x0 = x
+ val xs1_ = xs1
+ val res = $UN.castvwtp0{mynode1(a)}((pf_x, pf_xs1 | xs))
+ val () = xs := xs1_
+ in
+ res // [x0] in [xs]
+ end (* end of [if] *)
+ end // end of [list_vt_cons]
+| list_vt_nil () => mynode_null{a}((*void*))
+//
+end (* end of [takeout] *)
+//
+in
+ $effmask_all (takeout (set))
+end // end of [linset_takeout_ngc]
+
+(* ****** ****** *)
+
+implement
+{a}(*tmp*)
+linset_takeoutmax_ngc
+ (xs) = let
+in
+//
+case+ xs of
+| @list_vt_cons
+ (x, xs1) => let
+ prval pf_x = view@x
+ prval pf_xs1 = view@xs1
+ val xs_ = xs
+ val () = xs := xs1
+ in
+ $UN.castvwtp0{mynode1(a)}((pf_x, pf_xs1 | xs_))
+ end // end of [list_vt_cons]
+| @list_vt_nil () => let
+ prval () = fold@ (xs)
+ in
+ mynode_null{a}((*void*))
+ end // end of [list_vt_nil]
+//
+end // end of [linset_takeoutmax_ngc]
+
+(* ****** ****** *)
+
+implement
+{a}(*tmp*)
+linset_takeoutmin_ngc
+ (xs) = let
+//
+fun unsnoc
+ {n:pos} ..
+(
+ xs: &list_vt (a, n) >> list_vt (a, n-1)
+) : mynode1 (a) = let
+//
+val+@list_vt_cons (x, xs1) = xs
+//
+prval pf_x = view@x and pf_xs1 = view@xs1
+//
+in
+//
+case+ xs1 of
+| list_vt_cons _ =>
+ let val res = unsnoc(xs1) in fold@xs; res end
+ // end of [list_vt_cons]
+| list_vt_nil () => let
+ val xs_ = xs
+ val () = xs := list_vt_nil{a}()
+ in
+ $UN.castvwtp0{mynode1(a)}((pf_x, pf_xs1 | xs_))
+ end // end of [list_vt_nil]
+//
+end // end of [unsnoc]
+//
+in
+//
+case+ xs of
+| list_vt_cons _ => unsnoc (xs)
+| list_vt_nil () => mynode_null{a}((*void*))
+//
+end // end of [linset_takeoutmin_ngc]
+
+(* ****** ****** *)
+
+(* end of [linset_listord.dats] *)
diff --git a/samples/ATS/linset_listord.sats b/samples/ATS/linset_listord.sats
new file mode 100644
index 00000000..468a534f
--- /dev/null
+++ b/samples/ATS/linset_listord.sats
@@ -0,0 +1,51 @@
+(***********************************************************************)
+(* *)
+(* Applied Type System *)
+(* *)
+(***********************************************************************)
+
+(*
+** ATS/Postiats - Unleashing the Potential of Types!
+** Copyright (C) 2011-2013 Hongwei Xi, ATS Trustful Software, Inc.
+** All rights reserved
+**
+** ATS is free software; you can redistribute it and/or modify it under
+** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the
+** Free Software Foundation; either version 3, or (at your option) any
+** later version.
+**
+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY
+** WARRANTY; without even the implied warranty of MERCHANTABILITY or
+** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+** for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with ATS; see the file COPYING. If not, please write to the
+** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+** 02110-1301, USA.
+*)
+
+(* ****** ****** *)
+//
+// Author: Hongwei Xi
+// Authoremail: hwxiATcsDOTbuDOTedu
+// Time: October, 2010
+//
+(* ****** ****** *)
+
+#define ATS_PACKNAME "ATSLIB.libats.linset_listord"
+#define ATS_STALOADFLAG 0 // no static loading at run-time
+
+(* ****** ****** *)
+
+#include "./SHARE/linset.hats"
+#include "./SHARE/linset_node.hats"
+
+(* ****** ****** *)
+
+castfn
+linset2list {a:t0p} (xs: set (INV(a))):<> List0_vt (a)
+
+(* ****** ****** *)
+
+(* end of [linset_listord.sats] *)
diff --git a/samples/ATS/main.atxt b/samples/ATS/main.atxt
new file mode 100644
index 00000000..3bba35f0
--- /dev/null
+++ b/samples/ATS/main.atxt
@@ -0,0 +1,215 @@
+%{
+#include "./../ATEXT/atextfun.hats"
+%}
+
+
+
+
+
+
+EFFECTIVATS-DiningPhil2
+#patscode_style()
+
+
+
+
+
+Effective ATS: Dining Philosophers
+
+
+In this article, I present an implementation of a slight variant of the
+famous problem of 5-Dining-Philosophers by Dijkstra that makes simple but
+convincing use of linear types.
+
+
+The Original Problem
+
+
+There are five philosophers sitting around a table and there are also 5
+forks placed on the table such that each fork is located between the left
+hand of a philosopher and the right hand of another philosopher. Each
+philosopher does the following routine repeatedly: thinking and dining. In
+order to dine, a philosopher needs to first acquire two forks: one located
+on his left-hand side and the other on his right-hand side. After
+finishing dining, a philosopher puts the two acquired forks onto the table:
+one on his left-hand side and the other on his right-hand side.
+
+
+A Variant of the Original Problem
+
+
+The following twist is added to the original version:
+
+
+
+After a fork is used, it becomes a "dirty" fork and needs to be put in a
+tray for dirty forks. There is a cleaner who cleans dirty forks and then
+puts them back on the table.
+
+
+Channels for Communication
+
+
+A channel is just a shared queue of fixed capacity. The following two
+functions are for inserting an element into and taking an element out of a
+given channel:
+
+
+#pats2xhtml_sats("\
+fun{a:vt0p} channel_insert (channel (a), a): void
+fun{a:vt0p} channel_takeout (chan: channel (a)): (a)
+")
+
+If [channel_insert] is called on a channel that is full, then the caller is
+blocked until an element is taken out of the channel. If [channel_takeout]
+is called on a channel that is empty, then the caller is blocked until an
+element is inserted into the channel.
+
+
+A Channel for Each Fork
+
+
+Forks are resources given a linear type. Each fork is initially stored in a
+channel, which can be obtained by calling the following function:
+
+
+#pats2xhtml_sats("\
+fun fork_changet (n: nphil): channel(fork)
+")
+
+where the type [nphil] is defined to be [natLt(5)] (for natural numbers
+less than 5). The channels for storing forks are chosen to be of capacity
+2. The reason that channels of capacity 2 are chosen to store at most one
+element (in each of them) is to guarantee that these channels can never be
+full (so that there is no attempt made to send signals to awake callers
+supposedly being blocked due to channels being full).
+
+
+
+A Channel for the Fork Tray
+
+
+A tray for storing "dirty" forks is also a channel, which can be obtained
+by calling the following function:
+
+
+#pats2xhtml_sats("\
+fun forktray_changet ((*void*)): channel(fork)
+")
+
+The capacity chosen for the channel is 6 (instead of 5) so that it can
+never become full (as there are only 5 forks in total).
+
+
+Philosopher Loop
+
+
+Each philosopher is implemented as a loop:
+
+
+#pats2xhtml_dats('\
+implement
+phil_loop (n) = let
+//
+val () = phil_think (n)
+//
+val nl = phil_left (n) // = n
+val nr = phil_right (n) // = (n+1) % 5
+//
+val ch_lfork = fork_changet (nl)
+val ch_rfork = fork_changet (nr)
+//
+val lf = channel_takeout (ch_lfork)
+val () = println! ("phil_loop(", n, ") picks left fork")
+//
+val () = randsleep (2) // sleep up to 2 seconds
+//
+val rf = channel_takeout (ch_rfork)
+val () = println! ("phil_loop(", n, ") picks right fork")
+//
+val () = phil_dine (n, lf, rf)
+//
+val ch_forktray = forktray_changet ()
+val () = channel_insert (ch_forktray, lf) // left fork to dirty tray
+val () = channel_insert (ch_forktray, rf) // right fork to dirty tray
+//
+in
+ phil_loop (n)
+end // end of [phil_loop]
+')
+
+It should be straighforward to follow the code for [phil_loop].
+
+
+Fork Cleaner Loop
+
+
+A cleaner is implemented as a loop:
+
+
+#pats2xhtml_dats('\
+implement
+cleaner_loop () = let
+//
+val ch = forktray_changet ()
+val f0 = channel_takeout (ch) // [f0] is dirty
+//
+val () = cleaner_wash (f0) // washes dirty [f0]
+val () = cleaner_return (f0) // puts back cleaned [f0]
+//
+in
+ cleaner_loop ()
+end // end of [cleaner_loop]
+')
+
+The function [cleaner_return] first finds out the number of a given fork
+and then uses the number to locate the channel for storing the fork. Its
+actual implementation is given as follows:
+
+
+#pats2xhtml_dats('\
+implement
+cleaner_return (f) =
+{
+ val n = fork_get_num (f)
+ val ch = fork_changet (n)
+ val () = channel_insert (ch, f)
+}
+')
+
+It should now be straighforward to follow the code for [cleaner_loop].
+
+
+Testing
+
+
+The entire code of this implementation is stored in the following files:
+
+
+DiningPhil2.sats
+DiningPhil2.dats
+DiningPhil2_fork.dats
+DiningPhil2_thread.dats
+
+
+There is also a Makefile available for compiling the ATS source code into
+an excutable for testing. One should be able to encounter a deadlock after
+running the simulation for a while.
+
+
+
+This article is written by Hongwei Xi.
+
+
+
+
+%{
+implement main () = fprint_filsub (stdout_ref, "main_atxt.txt")
+%}
diff --git a/samples/Alloy/file_system.als b/samples/Alloy/file_system.als
new file mode 100644
index 00000000..60fd959b
--- /dev/null
+++ b/samples/Alloy/file_system.als
@@ -0,0 +1,59 @@
+module examples/systems/file_system
+
+/*
+ * Model of a generic file system.
+ */
+
+abstract sig Object {}
+
+sig Name {}
+
+sig File extends Object {} { some d: Dir | this in d.entries.contents }
+
+sig Dir extends Object {
+ entries: set DirEntry,
+ parent: lone Dir
+} {
+ parent = this.~@contents.~@entries
+ all e1, e2 : entries | e1.name = e2.name => e1 = e2
+ this !in this.^@parent
+ this != Root => Root in this.^@parent
+}
+
+one sig Root extends Dir {} { no parent }
+
+lone sig Cur extends Dir {}
+
+sig DirEntry {
+ name: Name,
+ contents: Object
+} {
+ one this.~entries
+}
+
+
+/**
+ * all directories besides root have one parent
+ */
+pred OneParent_buggyVersion {
+ all d: Dir - Root | one d.parent
+}
+
+/**
+ * all directories besides root have one parent
+ */
+pred OneParent_correctVersion {
+ all d: Dir - Root | (one d.parent && one contents.d)
+}
+
+/**
+ * Only files may be linked (that is, have more than one entry)
+ * That is, all directories are the contents of at most one directory entry
+ */
+pred NoDirAliases {
+ all o: Dir | lone o.~contents
+}
+
+check { OneParent_buggyVersion => NoDirAliases } for 5 expect 1
+
+check { OneParent_correctVersion => NoDirAliases } for 5 expect 0
diff --git a/samples/Alloy/marksweepgc.als b/samples/Alloy/marksweepgc.als
new file mode 100644
index 00000000..b8081e3f
--- /dev/null
+++ b/samples/Alloy/marksweepgc.als
@@ -0,0 +1,83 @@
+module examples/systems/marksweepgc
+
+/*
+ * Model of mark and sweep garbage collection.
+ */
+
+// a node in the heap
+sig Node {}
+
+sig HeapState {
+ left, right : Node -> lone Node,
+ marked : set Node,
+ freeList : lone Node
+}
+
+pred clearMarks[hs, hs' : HeapState] {
+ // clear marked set
+ no hs'.marked
+ // left and right fields are unchanged
+ hs'.left = hs.left
+ hs'.right = hs.right
+}
+
+/**
+ * simulate the recursion of the mark() function using transitive closure
+ */
+fun reachable[hs: HeapState, n: Node] : set Node {
+ n + n.^(hs.left + hs.right)
+}
+
+pred mark[hs: HeapState, from : Node, hs': HeapState] {
+ hs'.marked = hs.reachable[from]
+ hs'.left = hs.left
+ hs'.right = hs.right
+}
+
+/**
+ * complete hack to simulate behavior of code to set freeList
+ */
+pred setFreeList[hs, hs': HeapState] {
+ // especially hackish
+ hs'.freeList.*(hs'.left) in (Node - hs.marked)
+ all n: Node |
+ (n !in hs.marked) => {
+ no hs'.right[n]
+ hs'.left[n] in (hs'.freeList.*(hs'.left))
+ n in hs'.freeList.*(hs'.left)
+ } else {
+ hs'.left[n] = hs.left[n]
+ hs'.right[n] = hs.right[n]
+ }
+ hs'.marked = hs.marked
+}
+
+pred GC[hs: HeapState, root : Node, hs': HeapState] {
+ some hs1, hs2: HeapState |
+ hs.clearMarks[hs1] && hs1.mark[root, hs2] && hs2.setFreeList[hs']
+}
+
+assert Soundness1 {
+ all h, h' : HeapState, root : Node |
+ h.GC[root, h'] =>
+ (all live : h.reachable[root] | {
+ h'.left[live] = h.left[live]
+ h'.right[live] = h.right[live]
+ })
+}
+
+assert Soundness2 {
+ all h, h' : HeapState, root : Node |
+ h.GC[root, h'] =>
+ no h'.reachable[root] & h'.reachable[h'.freeList]
+}
+
+assert Completeness {
+ all h, h' : HeapState, root : Node |
+ h.GC[root, h'] =>
+ (Node - h'.reachable[root]) in h'.reachable[h'.freeList]
+}
+
+check Soundness1 for 3 expect 0
+check Soundness2 for 3 expect 0
+check Completeness for 3 expect 0
diff --git a/samples/Alloy/views.als b/samples/Alloy/views.als
new file mode 100644
index 00000000..3a5ab82b
--- /dev/null
+++ b/samples/Alloy/views.als
@@ -0,0 +1,217 @@
+module examples/systems/views
+
+/*
+ * Model of views in object-oriented programming.
+ *
+ * Two object references, called the view and the backing,
+ * are related by a view mechanism when changes to the
+ * backing are automatically propagated to the view. Note
+ * that the state of a view need not be a projection of the
+ * state of the backing; the keySet method of Map, for
+ * example, produces two view relationships, and for the
+ * one in which the map is modified by changes to the key
+ * set, the value of the new map cannot be determined from
+ * the key set. Note that in the iterator view mechanism,
+ * the iterator is by this definition the backing object,
+ * since changes are propagated from iterator to collection
+ * and not vice versa. Oddly, a reference may be a view of
+ * more than one backing: there can be two iterators on the
+ * same collection, eg. A reference cannot be a view under
+ * more than one view type.
+ *
+ * A reference is made dirty when it is a backing for a view
+ * with which it is no longer related by the view invariant.
+ * This usually happens when a view is modified, either
+ * directly or via another backing. For example, changing a
+ * collection directly when it has an iterator invalidates
+ * it, as does changing the collection through one iterator
+ * when there are others.
+ *
+ * More work is needed if we want to model more closely the
+ * failure of an iterator when its collection is invalidated.
+ *
+ * As a terminological convention, when there are two
+ * complementary view relationships, we will give them types
+ * t and t'. For example, KeySetView propagates from map to
+ * set, and KeySetView' propagates from set to map.
+ *
+ * author: Daniel Jackson
+ */
+
+open util/ordering[State] as so
+open util/relation as rel
+
+sig Ref {}
+sig Object {}
+
+-- t->b->v in views when v is view of type t of backing b
+-- dirty contains refs that have been invalidated
+sig State {
+ refs: set Ref,
+ obj: refs -> one Object,
+ views: ViewType -> refs -> refs,
+ dirty: set refs
+-- , anyviews: Ref -> Ref -- for visualization
+ }
+-- {anyviews = ViewType.views}
+
+sig Map extends Object {
+ keys: set Ref,
+ map: keys -> one Ref
+ }{all s: State | keys + Ref.map in s.refs}
+sig MapRef extends Ref {}
+fact {State.obj[MapRef] in Map}
+
+sig Iterator extends Object {
+ left, done: set Ref,
+ lastRef: lone done
+ }{all s: State | done + left + lastRef in s.refs}
+sig IteratorRef extends Ref {}
+fact {State.obj[IteratorRef] in Iterator}
+
+sig Set extends Object {
+ elts: set Ref
+ }{all s: State | elts in s.refs}
+sig SetRef extends Ref {}
+fact {State.obj[SetRef] in Set}
+
+abstract sig ViewType {}
+one sig KeySetView, KeySetView', IteratorView extends ViewType {}
+fact ViewTypes {
+ State.views[KeySetView] in MapRef -> SetRef
+ State.views[KeySetView'] in SetRef -> MapRef
+ State.views[IteratorView] in IteratorRef -> SetRef
+ all s: State | s.views[KeySetView] = ~(s.views[KeySetView'])
+ }
+
+/**
+ * mods is refs modified directly or by view mechanism
+ * doesn't handle possibility of modifying an object and its view at once?
+ * should we limit frame conds to non-dirty refs?
+ */
+pred modifies [pre, post: State, rs: set Ref] {
+ let vr = pre.views[ViewType], mods = rs.*vr {
+ all r: pre.refs - mods | pre.obj[r] = post.obj[r]
+ all b: mods, v: pre.refs, t: ViewType |
+ b->v in pre.views[t] => viewFrame [t, pre.obj[v], post.obj[v], post.obj[b]]
+ post.dirty = pre.dirty +
+ {b: pre.refs | some v: Ref, t: ViewType |
+ b->v in pre.views[t] && !viewFrame [t, pre.obj[v], post.obj[v], post.obj[b]]
+ }
+ }
+ }
+
+pred allocates [pre, post: State, rs: set Ref] {
+ no rs & pre.refs
+ post.refs = pre.refs + rs
+ }
+
+/**
+ * models frame condition that limits change to view object from v to v' when backing object changes to b'
+ */
+pred viewFrame [t: ViewType, v, v', b': Object] {
+ t in KeySetView => v'.elts = dom [b'.map]
+ t in KeySetView' => b'.elts = dom [v'.map]
+ t in KeySetView' => (b'.elts) <: (v.map) = (b'.elts) <: (v'.map)
+ t in IteratorView => v'.elts = b'.left + b'.done
+ }
+
+pred MapRef.keySet [pre, post: State, setRefs: SetRef] {
+ post.obj[setRefs].elts = dom [pre.obj[this].map]
+ modifies [pre, post, none]
+ allocates [pre, post, setRefs]
+ post.views = pre.views + KeySetView->this->setRefs + KeySetView'->setRefs->this
+ }
+
+pred MapRef.put [pre, post: State, k, v: Ref] {
+ post.obj[this].map = pre.obj[this].map ++ k->v
+ modifies [pre, post, this]
+ allocates [pre, post, none]
+ post.views = pre.views
+ }
+
+pred SetRef.iterator [pre, post: State, iterRef: IteratorRef] {
+ let i = post.obj[iterRef] {
+ i.left = pre.obj[this].elts
+ no i.done + i.lastRef
+ }
+ modifies [pre,post,none]
+ allocates [pre, post, iterRef]
+ post.views = pre.views + IteratorView->iterRef->this
+ }
+
+pred IteratorRef.remove [pre, post: State] {
+ let i = pre.obj[this], i' = post.obj[this] {
+ i'.left = i.left
+ i'.done = i.done - i.lastRef
+ no i'.lastRef
+ }
+ modifies [pre,post,this]
+ allocates [pre, post, none]
+ pre.views = post.views
+ }
+
+pred IteratorRef.next [pre, post: State, ref: Ref] {
+ let i = pre.obj[this], i' = post.obj[this] {
+ ref in i.left
+ i'.left = i.left - ref
+ i'.done = i.done + ref
+ i'.lastRef = ref
+ }
+ modifies [pre, post, this]
+ allocates [pre, post, none]
+ pre.views = post.views
+ }
+
+pred IteratorRef.hasNext [s: State] {
+ some s.obj[this].left
+ }
+
+assert zippishOK {
+ all
+ ks, vs: SetRef,
+ m: MapRef,
+ ki, vi: IteratorRef,
+ k, v: Ref |
+ let s0=so/first,
+ s1=so/next[s0],
+ s2=so/next[s1],
+ s3=so/next[s2],
+ s4=so/next[s3],
+ s5=so/next[s4],
+ s6=so/next[s5],
+ s7=so/next[s6] |
+ ({
+ precondition [s0, ks, vs, m]
+ no s0.dirty
+ ks.iterator [s0, s1, ki]
+ vs.iterator [s1, s2, vi]
+ ki.hasNext [s2]
+ vi.hasNext [s2]
+ ki.this/next [s2, s3, k]
+ vi.this/next [s3, s4, v]
+ m.put [s4, s5, k, v]
+ ki.remove [s5, s6]
+ vi.remove [s6, s7]
+ } => no State.dirty)
+ }
+
+pred precondition [pre: State, ks, vs, m: Ref] {
+ // all these conditions and other errors discovered in scope of 6 but 8,3
+ // in initial state, must have view invariants hold
+ (all t: ViewType, b, v: pre.refs |
+ b->v in pre.views[t] => viewFrame [t, pre.obj[v], pre.obj[v], pre.obj[b]])
+ // sets are not aliases
+-- ks != vs
+ // sets are not views of map
+-- no (ks+vs)->m & ViewType.pre.views
+ // no iterator currently on either set
+-- no Ref->(ks+vs) & ViewType.pre.views
+ }
+
+check zippishOK for 6 but 8 State, 3 ViewType expect 1
+
+/**
+ * experiment with controlling heap size
+ */
+fact {all s: State | #s.obj < 5}
diff --git a/samples/AspectJ/CacheAspect.aj b/samples/AspectJ/CacheAspect.aj
new file mode 100644
index 00000000..bfab7bc4
--- /dev/null
+++ b/samples/AspectJ/CacheAspect.aj
@@ -0,0 +1,41 @@
+package com.blogspot.miguelinlas3.aspectj.cache;
+
+import java.util.Map;
+import java.util.WeakHashMap;
+
+import org.aspectj.lang.JoinPoint;
+
+import com.blogspot.miguelinlas3.aspectj.cache.marker.Cachable;
+
+/**
+ * This simple aspect simulates the behaviour of a very simple cache
+ *
+ * @author migue
+ *
+ */
+public aspect CacheAspect {
+
+ public pointcut cache(Cachable cachable): execution(@Cachable * * (..)) && @annotation(cachable);
+
+ Object around(Cachable cachable): cache(cachable){
+
+ String evaluatedKey = this.evaluateKey(cachable.scriptKey(), thisJoinPoint);
+
+ if(cache.containsKey(evaluatedKey)){
+ System.out.println("Cache hit for key " + evaluatedKey);
+ return this.cache.get(evaluatedKey);
+ }
+
+ System.out.println("Cache miss for key " + evaluatedKey);
+ Object value = proceed(cachable);
+ cache.put(evaluatedKey, value);
+ return value;
+ }
+
+ protected String evaluateKey(String key, JoinPoint joinPoint) {
+ // TODO add some smart staff to allow simple scripting in @Cachable annotation
+ return key;
+ }
+
+ protected Map cache = new WeakHashMap();
+}
diff --git a/samples/AspectJ/OptimizeRecursionCache.aj b/samples/AspectJ/OptimizeRecursionCache.aj
new file mode 100644
index 00000000..ed1e8695
--- /dev/null
+++ b/samples/AspectJ/OptimizeRecursionCache.aj
@@ -0,0 +1,50 @@
+package aspects.caching;
+
+import java.util.Map;
+
+/**
+ * Cache aspect for optimize recursive functions.
+ *
+ * @author Migueli
+ * @date 05/11/2013
+ * @version 1.0
+ *
+ */
+public abstract aspect OptimizeRecursionCache {
+
+ @SuppressWarnings("rawtypes")
+ private Map _cache;
+
+ public OptimizeRecursionCache() {
+ _cache = getCache();
+ }
+
+ @SuppressWarnings("rawtypes")
+ abstract public Map getCache();
+
+ abstract public pointcut operation(Object o);
+
+ pointcut topLevelOperation(Object o): operation(o) && !cflowbelow(operation(Object));
+
+ before(Object o) : topLevelOperation(o) {
+ System.out.println("Seeking value for " + o);
+ }
+
+ Object around(Object o) : operation(o) {
+ Object cachedValue = _cache.get(o);
+ if (cachedValue != null) {
+ System.out.println("Found cached value for " + o + ": " + cachedValue);
+ return cachedValue;
+ }
+ return proceed(o);
+ }
+
+ @SuppressWarnings("unchecked")
+ after(Object o) returning(Object result) : topLevelOperation(o) {
+ _cache.put(o, result);
+ }
+
+ after(Object o) returning(Object result) : topLevelOperation(o) {
+ System.out.println("cache size: " + _cache.size());
+ }
+}
diff --git a/samples/Assembly/ASSEMBLE.inc b/samples/Assembly/ASSEMBLE.inc
new file mode 100644
index 00000000..c4ffdae3
--- /dev/null
+++ b/samples/Assembly/ASSEMBLE.inc
@@ -0,0 +1,2048 @@
+
+; flat assembler core
+; Copyright (c) 1999-2014, Tomasz Grysztar.
+; All rights reserved.
+
+assembler:
+ xor eax,eax
+ mov [stub_size],eax
+ mov [current_pass],ax
+ mov [resolver_flags],eax
+ mov [number_of_sections],eax
+ mov [actual_fixups_size],eax
+ assembler_loop:
+ mov eax,[labels_list]
+ mov [tagged_blocks],eax
+ mov eax,[additional_memory]
+ mov [free_additional_memory],eax
+ mov eax,[additional_memory_end]
+ mov [structures_buffer],eax
+ mov esi,[source_start]
+ mov edi,[code_start]
+ xor eax,eax
+ mov dword [adjustment],eax
+ mov dword [adjustment+4],eax
+ mov [addressing_space],eax
+ mov [error_line],eax
+ mov [counter],eax
+ mov [format_flags],eax
+ mov [number_of_relocations],eax
+ mov [undefined_data_end],eax
+ mov [file_extension],eax
+ mov [next_pass_needed],al
+ mov [output_format],al
+ mov [adjustment_sign],al
+ mov [code_type],16
+ call init_addressing_space
+ pass_loop:
+ call assemble_line
+ jnc pass_loop
+ mov eax,[additional_memory_end]
+ cmp eax,[structures_buffer]
+ je pass_done
+ sub eax,18h
+ mov eax,[eax+4]
+ mov [current_line],eax
+ jmp missing_end_directive
+ pass_done:
+ call close_pass
+ mov eax,[labels_list]
+ check_symbols:
+ cmp eax,[memory_end]
+ jae symbols_checked
+ test byte [eax+8],8
+ jz symbol_defined_ok
+ mov cx,[current_pass]
+ cmp cx,[eax+18]
+ jne symbol_defined_ok
+ test byte [eax+8],1
+ jz symbol_defined_ok
+ sub cx,[eax+16]
+ cmp cx,1
+ jne symbol_defined_ok
+ and byte [eax+8],not 1
+ or [next_pass_needed],-1
+ symbol_defined_ok:
+ test byte [eax+8],10h
+ jz use_prediction_ok
+ mov cx,[current_pass]
+ and byte [eax+8],not 10h
+ test byte [eax+8],20h
+ jnz check_use_prediction
+ cmp cx,[eax+18]
+ jne use_prediction_ok
+ test byte [eax+8],8
+ jz use_prediction_ok
+ jmp use_misprediction
+ check_use_prediction:
+ test byte [eax+8],8
+ jz use_misprediction
+ cmp cx,[eax+18]
+ je use_prediction_ok
+ use_misprediction:
+ or [next_pass_needed],-1
+ use_prediction_ok:
+ test byte [eax+8],40h
+ jz check_next_symbol
+ and byte [eax+8],not 40h
+ test byte [eax+8],4
+ jnz define_misprediction
+ mov cx,[current_pass]
+ test byte [eax+8],80h
+ jnz check_define_prediction
+ cmp cx,[eax+16]
+ jne check_next_symbol
+ test byte [eax+8],1
+ jz check_next_symbol
+ jmp define_misprediction
+ check_define_prediction:
+ test byte [eax+8],1
+ jz define_misprediction
+ cmp cx,[eax+16]
+ je check_next_symbol
+ define_misprediction:
+ or [next_pass_needed],-1
+ check_next_symbol:
+ add eax,LABEL_STRUCTURE_SIZE
+ jmp check_symbols
+ symbols_checked:
+ cmp [next_pass_needed],0
+ jne next_pass
+ mov eax,[error_line]
+ or eax,eax
+ jz assemble_ok
+ mov [current_line],eax
+ cmp [error],undefined_symbol
+ jne error_confirmed
+ mov eax,[error_info]
+ or eax,eax
+ jz error_confirmed
+ test byte [eax+8],1
+ jnz next_pass
+ error_confirmed:
+ call error_handler
+ error_handler:
+ mov eax,[error]
+ sub eax,error_handler
+ add [esp],eax
+ ret
+ next_pass:
+ inc [current_pass]
+ mov ax,[current_pass]
+ cmp ax,[passes_limit]
+ je code_cannot_be_generated
+ jmp assembler_loop
+ assemble_ok:
+ ret
+
+create_addressing_space:
+ mov ebx,[addressing_space]
+ test ebx,ebx
+ jz init_addressing_space
+ test byte [ebx+0Ah],1
+ jnz illegal_instruction
+ mov eax,edi
+ sub eax,[ebx+18h]
+ mov [ebx+1Ch],eax
+ init_addressing_space:
+ mov ebx,[tagged_blocks]
+ mov dword [ebx-4],10h
+ mov dword [ebx-8],20h
+ sub ebx,8+20h
+ cmp ebx,edi
+ jbe out_of_memory
+ mov [tagged_blocks],ebx
+ mov [addressing_space],ebx
+ xor eax,eax
+ mov [ebx],edi
+ mov [ebx+4],eax
+ mov [ebx+8],eax
+ mov [ebx+10h],eax
+ mov [ebx+14h],eax
+ mov [ebx+18h],edi
+ mov [ebx+1Ch],eax
+ ret
+
+assemble_line:
+ mov eax,[tagged_blocks]
+ sub eax,100h
+ cmp edi,eax
+ ja out_of_memory
+ lods byte [esi]
+ cmp al,1
+ je assemble_instruction
+ jb source_end
+ cmp al,3
+ jb define_label
+ je define_constant
+ cmp al,4
+ je label_addressing_space
+ cmp al,0Fh
+ je new_line
+ cmp al,13h
+ je code_type_setting
+ cmp al,10h
+ jne illegal_instruction
+ lods byte [esi]
+ jmp segment_prefix
+ code_type_setting:
+ lods byte [esi]
+ mov [code_type],al
+ jmp instruction_assembled
+ new_line:
+ lods dword [esi]
+ mov [current_line],eax
+ mov [prefixed_instruction],0
+ cmp [symbols_file],0
+ je continue_line
+ cmp [next_pass_needed],0
+ jne continue_line
+ mov ebx,[tagged_blocks]
+ mov dword [ebx-4],1
+ mov dword [ebx-8],14h
+ sub ebx,8+14h
+ cmp ebx,edi
+ jbe out_of_memory
+ mov [tagged_blocks],ebx
+ mov [ebx],eax
+ mov [ebx+4],edi
+ mov eax,[addressing_space]
+ mov [ebx+8],eax
+ mov al,[code_type]
+ mov [ebx+10h],al
+ continue_line:
+ cmp byte [esi],0Fh
+ je line_assembled
+ jmp assemble_line
+ define_label:
+ lods dword [esi]
+ cmp eax,0Fh
+ jb invalid_use_of_symbol
+ je reserved_word_used_as_symbol
+ mov ebx,eax
+ lods byte [esi]
+ mov [label_size],al
+ call make_label
+ jmp continue_line
+ make_label:
+ mov eax,edi
+ xor edx,edx
+ xor cl,cl
+ mov ebp,[addressing_space]
+ sub eax,[ds:ebp]
+ sbb edx,[ds:ebp+4]
+ sbb cl,[ds:ebp+8]
+ jp label_value_ok
+ call recoverable_overflow
+ label_value_ok:
+ mov [address_sign],cl
+ test byte [ds:ebp+0Ah],1
+ jnz make_virtual_label
+ or byte [ebx+9],1
+ xchg eax,[ebx]
+ xchg edx,[ebx+4]
+ mov ch,[ebx+9]
+ shr ch,1
+ and ch,1
+ neg ch
+ sub eax,[ebx]
+ sbb edx,[ebx+4]
+ sbb ch,cl
+ mov dword [adjustment],eax
+ mov dword [adjustment+4],edx
+ mov [adjustment_sign],ch
+ or al,ch
+ or eax,edx
+ setnz ah
+ jmp finish_label
+ make_virtual_label:
+ and byte [ebx+9],not 1
+ cmp eax,[ebx]
+ mov [ebx],eax
+ setne ah
+ cmp edx,[ebx+4]
+ mov [ebx+4],edx
+ setne al
+ or ah,al
+ finish_label:
+ mov ebp,[addressing_space]
+ mov ch,[ds:ebp+9]
+ mov cl,[label_size]
+ mov edx,[ds:ebp+14h]
+ mov ebp,[ds:ebp+10h]
+ finish_label_symbol:
+ mov al,[address_sign]
+ xor al,[ebx+9]
+ and al,10b
+ or ah,al
+ xor [ebx+9],al
+ cmp cl,[ebx+10]
+ mov [ebx+10],cl
+ setne al
+ or ah,al
+ cmp ch,[ebx+11]
+ mov [ebx+11],ch
+ setne al
+ or ah,al
+ cmp ebp,[ebx+12]
+ mov [ebx+12],ebp
+ setne al
+ or ah,al
+ or ch,ch
+ jz label_symbol_ok
+ cmp edx,[ebx+20]
+ mov [ebx+20],edx
+ setne al
+ or ah,al
+ label_symbol_ok:
+ mov cx,[current_pass]
+ xchg [ebx+16],cx
+ mov edx,[current_line]
+ mov [ebx+28],edx
+ and byte [ebx+8],not 2
+ test byte [ebx+8],1
+ jz new_label
+ cmp cx,[ebx+16]
+ je symbol_already_defined
+ btr dword [ebx+8],10
+ jc requalified_label
+ inc cx
+ sub cx,[ebx+16]
+ setnz al
+ or ah,al
+ jz label_made
+ test byte [ebx+8],8
+ jz label_made
+ mov cx,[current_pass]
+ cmp cx,[ebx+18]
+ jne label_made
+ requalified_label:
+ or [next_pass_needed],-1
+ label_made:
+ ret
+ new_label:
+ or byte [ebx+8],1
+ ret
+ define_constant:
+ lods dword [esi]
+ inc esi
+ cmp eax,0Fh
+ jb invalid_use_of_symbol
+ je reserved_word_used_as_symbol
+ mov edx,[eax+8]
+ push edx
+ cmp [current_pass],0
+ je get_constant_value
+ test dl,4
+ jnz get_constant_value
+ mov cx,[current_pass]
+ cmp cx,[eax+16]
+ je get_constant_value
+ or dl,4
+ mov [eax+8],dl
+ get_constant_value:
+ push eax
+ mov al,byte [esi-1]
+ push eax
+ or [size_override],-1
+ call get_value
+ pop ebx
+ mov ch,bl
+ pop ebx
+ pop ecx
+ test cl,4
+ jnz constant_referencing_mode_ok
+ and byte [ebx+8],not 4
+ constant_referencing_mode_ok:
+ xor cl,cl
+ mov ch,[value_type]
+ cmp ch,3
+ je invalid_use_of_symbol
+ make_constant:
+ and byte [ebx+9],not 1
+ cmp eax,[ebx]
+ mov [ebx],eax
+ setne ah
+ cmp edx,[ebx+4]
+ mov [ebx+4],edx
+ setne al
+ or ah,al
+ mov al,[value_sign]
+ xor al,[ebx+9]
+ and al,10b
+ or ah,al
+ xor [ebx+9],al
+ cmp cl,[ebx+10]
+ mov [ebx+10],cl
+ setne al
+ or ah,al
+ cmp ch,[ebx+11]
+ mov [ebx+11],ch
+ setne al
+ or ah,al
+ xor edx,edx
+ cmp edx,[ebx+12]
+ mov [ebx+12],edx
+ setne al
+ or ah,al
+ or ch,ch
+ jz constant_symbol_ok
+ mov edx,[symbol_identifier]
+ cmp edx,[ebx+20]
+ mov [ebx+20],edx
+ setne al
+ or ah,al
+ constant_symbol_ok:
+ mov cx,[current_pass]
+ xchg [ebx+16],cx
+ mov edx,[current_line]
+ mov [ebx+28],edx
+ test byte [ebx+8],1
+ jz new_constant
+ cmp cx,[ebx+16]
+ jne redeclare_constant
+ test byte [ebx+8],2
+ jz symbol_already_defined
+ or byte [ebx+8],4
+ and byte [ebx+9],not 4
+ jmp instruction_assembled
+ redeclare_constant:
+ btr dword [ebx+8],10
+ jc requalified_constant
+ inc cx
+ sub cx,[ebx+16]
+ setnz al
+ or ah,al
+ jz instruction_assembled
+ test byte [ebx+8],4
+ jnz instruction_assembled
+ test byte [ebx+8],8
+ jz instruction_assembled
+ mov cx,[current_pass]
+ cmp cx,[ebx+18]
+ jne instruction_assembled
+ requalified_constant:
+ or [next_pass_needed],-1
+ jmp instruction_assembled
+ new_constant:
+ or byte [ebx+8],1+2
+ jmp instruction_assembled
+ label_addressing_space:
+ lods dword [esi]
+ cmp eax,0Fh
+ jb invalid_use_of_symbol
+ je reserved_word_used_as_symbol
+ mov cx,[current_pass]
+ test byte [eax+8],1
+ jz make_addressing_space_label
+ cmp cx,[eax+16]
+ je symbol_already_defined
+ test byte [eax+9],4
+ jnz make_addressing_space_label
+ or [next_pass_needed],-1
+ make_addressing_space_label:
+ mov dx,[eax+8]
+ and dx,not (2 or 100h)
+ or dx,1 or 4 or 400h
+ mov [eax+8],dx
+ mov [eax+16],cx
+ mov edx,[current_line]
+ mov [eax+28],edx
+ mov ebx,[addressing_space]
+ mov [eax],ebx
+ or byte [ebx+0Ah],2
+ jmp continue_line
+ assemble_instruction:
+; mov [operand_size],0
+; mov [size_override],0
+; mov [operand_prefix],0
+; mov [opcode_prefix],0
+ and dword [operand_size],0
+; mov [rex_prefix],0
+; mov [vex_required],0
+; mov [vex_register],0
+; mov [immediate_size],0
+ and dword [rex_prefix],0
+ call instruction_handler
+ instruction_handler:
+ movzx ebx,word [esi]
+ mov al,[esi+2]
+ add esi,3
+ add [esp],ebx
+ ret
+ instruction_assembled:
+ mov al,[esi]
+ cmp al,0Fh
+ je line_assembled
+ or al,al
+ jnz extra_characters_on_line
+ line_assembled:
+ clc
+ ret
+ source_end:
+ dec esi
+ stc
+ ret
+
+org_directive:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_qword_value
+ mov cl,[value_type]
+ test cl,1
+ jnz invalid_use_of_symbol
+ push eax
+ mov ebx,[addressing_space]
+ mov eax,edi
+ sub eax,[ebx+18h]
+ mov [ebx+1Ch],eax
+ test byte [ebx+0Ah],1
+ jnz in_virtual
+ call init_addressing_space
+ jmp org_space_ok
+ in_virtual:
+ call close_virtual_addressing_space
+ call init_addressing_space
+ or byte [ebx+0Ah],1
+ org_space_ok:
+ pop eax
+ mov [ebx+9],cl
+ mov cl,[value_sign]
+ sub [ebx],eax
+ sbb [ebx+4],edx
+ sbb byte [ebx+8],cl
+ jp org_value_ok
+ call recoverable_overflow
+ org_value_ok:
+ mov edx,[symbol_identifier]
+ mov [ebx+14h],edx
+ cmp [output_format],1
+ ja instruction_assembled
+ cmp edi,[code_start]
+ jne instruction_assembled
+ cmp eax,100h
+ jne instruction_assembled
+ bts [format_flags],0
+ jmp instruction_assembled
+label_directive:
+ lods byte [esi]
+ cmp al,2
+ jne invalid_argument
+ lods dword [esi]
+ cmp eax,0Fh
+ jb invalid_use_of_symbol
+ je reserved_word_used_as_symbol
+ inc esi
+ mov ebx,eax
+ mov [label_size],0
+ lods byte [esi]
+ cmp al,':'
+ je get_label_size
+ dec esi
+ cmp al,11h
+ jne label_size_ok
+ get_label_size:
+ lods word [esi]
+ cmp al,11h
+ jne invalid_argument
+ mov [label_size],ah
+ label_size_ok:
+ cmp byte [esi],80h
+ je get_free_label_value
+ call make_label
+ jmp instruction_assembled
+ get_free_label_value:
+ inc esi
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ push ebx ecx
+ or byte [ebx+8],4
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_address_value
+ or bh,bh
+ setnz ch
+ xchg ch,cl
+ mov bp,cx
+ shl ebp,16
+ xchg bl,bh
+ mov bp,bx
+ pop ecx ebx
+ and byte [ebx+8],not 4
+ mov ch,[value_type]
+ test ch,1
+ jnz invalid_use_of_symbol
+ make_free_label:
+ and byte [ebx+9],not 1
+ cmp eax,[ebx]
+ mov [ebx],eax
+ setne ah
+ cmp edx,[ebx+4]
+ mov [ebx+4],edx
+ setne al
+ or ah,al
+ mov edx,[address_symbol]
+ mov cl,[label_size]
+ call finish_label_symbol
+ jmp instruction_assembled
+load_directive:
+ lods byte [esi]
+ cmp al,2
+ jne invalid_argument
+ lods dword [esi]
+ cmp eax,0Fh
+ jb invalid_use_of_symbol
+ je reserved_word_used_as_symbol
+ inc esi
+ push eax
+ mov al,1
+ cmp byte [esi],11h
+ jne load_size_ok
+ lods byte [esi]
+ lods byte [esi]
+ load_size_ok:
+ cmp al,8
+ ja invalid_value
+ mov [operand_size],al
+ and dword [value],0
+ and dword [value+4],0
+ lods byte [esi]
+ cmp al,82h
+ jne invalid_argument
+ call get_data_point
+ jc value_loaded
+ push esi edi
+ mov esi,ebx
+ mov edi,value
+ rep movs byte [edi],[esi]
+ pop edi esi
+ value_loaded:
+ mov [value_sign],0
+ mov eax,dword [value]
+ mov edx,dword [value+4]
+ pop ebx
+ xor cx,cx
+ jmp make_constant
+ get_data_point:
+ mov ebx,[addressing_space]
+ mov ecx,edi
+ sub ecx,[ebx+18h]
+ mov [ebx+1Ch],ecx
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],11h
+ jne get_data_address
+ cmp word [esi+1+4],'):'
+ jne get_data_address
+ inc esi
+ lods dword [esi]
+ add esi,2
+ cmp byte [esi],'('
+ jne invalid_argument
+ inc esi
+ cmp eax,0Fh
+ jbe reserved_word_used_as_symbol
+ mov edx,undefined_symbol
+ test byte [eax+8],1
+ jz addressing_space_unavailable
+ mov edx,symbol_out_of_scope
+ mov cx,[eax+16]
+ cmp cx,[current_pass]
+ jne addressing_space_unavailable
+ test byte [eax+9],4
+ jz invalid_use_of_symbol
+ mov ebx,eax
+ mov ax,[current_pass]
+ mov [ebx+18],ax
+ or byte [ebx+8],8
+ cmp [symbols_file],0
+ je get_addressing_space
+ cmp [next_pass_needed],0
+ jne get_addressing_space
+ call store_label_reference
+ get_addressing_space:
+ mov ebx,[ebx]
+ get_data_address:
+ push ebx
+ cmp byte [esi],'.'
+ je invalid_value
+ or [size_override],-1
+ call get_address_value
+ pop ebp
+ call calculate_relative_offset
+ cmp [next_pass_needed],0
+ jne data_address_type_ok
+ cmp [value_type],0
+ jne invalid_use_of_symbol
+ data_address_type_ok:
+ mov ebx,edi
+ xor ecx,ecx
+ add ebx,eax
+ adc edx,ecx
+ mov eax,ebx
+ sub eax,[ds:ebp+18h]
+ sbb edx,ecx
+ jnz bad_data_address
+ mov cl,[operand_size]
+ add eax,ecx
+ cmp eax,[ds:ebp+1Ch]
+ ja bad_data_address
+ clc
+ ret
+ addressing_space_unavailable:
+ cmp [error_line],0
+ jne get_data_address
+ push [current_line]
+ pop [error_line]
+ mov [error],edx
+ mov [error_info],eax
+ jmp get_data_address
+ bad_data_address:
+ call recoverable_overflow
+ stc
+ ret
+store_directive:
+ cmp byte [esi],11h
+ je sized_store
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ call get_byte_value
+ xor edx,edx
+ movzx eax,al
+ mov [operand_size],1
+ jmp store_value_ok
+ sized_store:
+ or [size_override],-1
+ call get_value
+ store_value_ok:
+ cmp [value_type],0
+ jne invalid_use_of_symbol
+ mov dword [value],eax
+ mov dword [value+4],edx
+ lods byte [esi]
+ cmp al,80h
+ jne invalid_argument
+ call get_data_point
+ jc instruction_assembled
+ push esi edi
+ mov esi,value
+ mov edi,ebx
+ rep movs byte [edi],[esi]
+ mov eax,edi
+ pop edi esi
+ cmp ebx,[undefined_data_end]
+ jae instruction_assembled
+ cmp eax,[undefined_data_start]
+ jbe instruction_assembled
+ mov [undefined_data_start],eax
+ jmp instruction_assembled
+
+display_directive:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],0
+ jne display_byte
+ inc esi
+ lods dword [esi]
+ mov ecx,eax
+ push edi
+ mov edi,[tagged_blocks]
+ sub edi,8
+ sub edi,eax
+ cmp edi,[esp]
+ jbe out_of_memory
+ mov [tagged_blocks],edi
+ rep movs byte [edi],[esi]
+ stos dword [edi]
+ xor eax,eax
+ stos dword [edi]
+ pop edi
+ inc esi
+ jmp display_next
+ display_byte:
+ call get_byte_value
+ push edi
+ mov edi,[tagged_blocks]
+ sub edi,8+1
+ mov [tagged_blocks],edi
+ stos byte [edi]
+ mov eax,1
+ stos dword [edi]
+ dec eax
+ stos dword [edi]
+ pop edi
+ display_next:
+ cmp edi,[tagged_blocks]
+ ja out_of_memory
+ lods byte [esi]
+ cmp al,','
+ je display_directive
+ dec esi
+ jmp instruction_assembled
+show_display_buffer:
+ mov eax,[tagged_blocks]
+ or eax,eax
+ jz display_done
+ mov esi,[labels_list]
+ cmp esi,eax
+ je display_done
+ display_messages:
+ sub esi,8
+ mov eax,[esi+4]
+ mov ecx,[esi]
+ sub esi,ecx
+ test eax,eax
+ jnz skip_block
+ push esi
+ call display_block
+ pop esi
+ skip_block:
+ cmp esi,[tagged_blocks]
+ jne display_messages
+ display_done:
+ ret
+
+times_directive:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ cmp eax,0
+ je zero_times
+ cmp byte [esi],':'
+ jne times_argument_ok
+ inc esi
+ times_argument_ok:
+ push [counter]
+ push [counter_limit]
+ mov [counter_limit],eax
+ mov [counter],1
+ times_loop:
+ mov eax,esp
+ sub eax,100h
+ jc stack_overflow
+ cmp eax,[stack_limit]
+ jb stack_overflow
+ push esi
+ or [prefixed_instruction],-1
+ call continue_line
+ mov eax,[counter_limit]
+ cmp [counter],eax
+ je times_done
+ inc [counter]
+ pop esi
+ jmp times_loop
+ times_done:
+ pop eax
+ pop [counter_limit]
+ pop [counter]
+ jmp instruction_assembled
+ zero_times:
+ call skip_symbol
+ jnc zero_times
+ jmp instruction_assembled
+
+virtual_directive:
+ lods byte [esi]
+ cmp al,80h
+ jne virtual_at_current
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_address_value
+ mov ebp,[address_symbol]
+ or bh,bh
+ setnz ch
+ jmp set_virtual
+ virtual_at_current:
+ dec esi
+ mov ebp,[addressing_space]
+ mov al,[ds:ebp+9]
+ mov [value_type],al
+ mov eax,edi
+ xor edx,edx
+ xor cl,cl
+ sub eax,[ds:ebp]
+ sbb edx,[ds:ebp+4]
+ sbb cl,[ds:ebp+8]
+ mov [address_sign],cl
+ mov bx,[ds:ebp+10h]
+ mov cx,[ds:ebp+10h+2]
+ xchg bh,bl
+ xchg ch,cl
+ mov ebp,[ds:ebp+14h]
+ set_virtual:
+ xchg bl,bh
+ xchg cl,ch
+ shl ecx,16
+ mov cx,bx
+ push ecx eax
+ call allocate_structure_data
+ mov word [ebx],virtual_directive-instruction_handler
+ mov ecx,[addressing_space]
+ mov [ebx+12],ecx
+ mov [ebx+8],edi
+ mov ecx,[current_line]
+ mov [ebx+4],ecx
+ mov ebx,[addressing_space]
+ mov eax,edi
+ sub eax,[ebx+18h]
+ mov [ebx+1Ch],eax
+ call init_addressing_space
+ or byte [ebx+0Ah],1
+ pop eax
+ mov cl,[address_sign]
+ not eax
+ not edx
+ not cl
+ add eax,1
+ adc edx,0
+ adc cl,0
+ add eax,edi
+ adc edx,0
+ adc cl,0
+ mov [ebx],eax
+ mov [ebx+4],edx
+ mov [ebx+8],cl
+ pop dword [ebx+10h]
+ mov [ebx+14h],ebp
+ mov al,[value_type]
+ test al,1
+ jnz invalid_use_of_symbol
+ mov [ebx+9],al
+ jmp instruction_assembled
+ allocate_structure_data:
+ mov ebx,[structures_buffer]
+ sub ebx,18h
+ cmp ebx,[free_additional_memory]
+ jb out_of_memory
+ mov [structures_buffer],ebx
+ ret
+ find_structure_data:
+ mov ebx,[structures_buffer]
+ scan_structures:
+ cmp ebx,[additional_memory_end]
+ je no_such_structure
+ cmp ax,[ebx]
+ je structure_data_found
+ add ebx,18h
+ jmp scan_structures
+ structure_data_found:
+ ret
+ no_such_structure:
+ stc
+ ret
+ end_virtual:
+ call find_structure_data
+ jc unexpected_instruction
+ push ebx
+ call close_virtual_addressing_space
+ pop ebx
+ mov eax,[ebx+12]
+ mov [addressing_space],eax
+ mov edi,[ebx+8]
+ remove_structure_data:
+ push esi edi
+ mov ecx,ebx
+ sub ecx,[structures_buffer]
+ shr ecx,2
+ lea esi,[ebx-4]
+ lea edi,[esi+18h]
+ std
+ rep movs dword [edi],[esi]
+ cld
+ add [structures_buffer],18h
+ pop edi esi
+ ret
+ close_virtual_addressing_space:
+ mov ebx,[addressing_space]
+ mov eax,edi
+ sub eax,[ebx+18h]
+ mov [ebx+1Ch],eax
+ test byte [ebx+0Ah],2
+ jz addressing_space_closed
+ push esi edi ecx edx
+ mov ecx,eax
+ mov eax,[tagged_blocks]
+ mov dword [eax-4],11h
+ mov dword [eax-8],ecx
+ sub eax,8
+ sub eax,ecx
+ mov [tagged_blocks],eax
+ lea edi,[eax+ecx-1]
+ xchg eax,[ebx+18h]
+ lea esi,[eax+ecx-1]
+ mov eax,edi
+ sub eax,esi
+ std
+ shr ecx,1
+ jnc virtual_byte_ok
+ movs byte [edi],[esi]
+ virtual_byte_ok:
+ dec esi
+ dec edi
+ shr ecx,1
+ jnc virtual_word_ok
+ movs word [edi],[esi]
+ virtual_word_ok:
+ sub esi,2
+ sub edi,2
+ rep movs dword [edi],[esi]
+ cld
+ xor edx,edx
+ add [ebx],eax
+ adc dword [ebx+4],edx
+ adc byte [ebx+8],dl
+ pop edx ecx edi esi
+ addressing_space_closed:
+ ret
+repeat_directive:
+ cmp [prefixed_instruction],0
+ jne unexpected_instruction
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ cmp eax,0
+ je zero_repeat
+ call allocate_structure_data
+ mov word [ebx],repeat_directive-instruction_handler
+ xchg eax,[counter_limit]
+ mov [ebx+10h],eax
+ mov eax,1
+ xchg eax,[counter]
+ mov [ebx+14h],eax
+ mov [ebx+8],esi
+ mov eax,[current_line]
+ mov [ebx+4],eax
+ jmp instruction_assembled
+ end_repeat:
+ cmp [prefixed_instruction],0
+ jne unexpected_instruction
+ call find_structure_data
+ jc unexpected_instruction
+ mov eax,[counter_limit]
+ inc [counter]
+ cmp [counter],eax
+ jbe continue_repeating
+ stop_repeat:
+ mov eax,[ebx+10h]
+ mov [counter_limit],eax
+ mov eax,[ebx+14h]
+ mov [counter],eax
+ call remove_structure_data
+ jmp instruction_assembled
+ continue_repeating:
+ mov esi,[ebx+8]
+ jmp instruction_assembled
+ zero_repeat:
+ mov al,[esi]
+ or al,al
+ jz missing_end_directive
+ cmp al,0Fh
+ jne extra_characters_on_line
+ call find_end_repeat
+ jmp instruction_assembled
+ find_end_repeat:
+ call find_structure_end
+ cmp ax,repeat_directive-instruction_handler
+ jne unexpected_instruction
+ ret
+while_directive:
+ cmp [prefixed_instruction],0
+ jne unexpected_instruction
+ call allocate_structure_data
+ mov word [ebx],while_directive-instruction_handler
+ mov eax,1
+ xchg eax,[counter]
+ mov [ebx+10h],eax
+ mov [ebx+8],esi
+ mov eax,[current_line]
+ mov [ebx+4],eax
+ do_while:
+ push ebx
+ call calculate_logical_expression
+ or al,al
+ jnz while_true
+ mov al,[esi]
+ or al,al
+ jz missing_end_directive
+ cmp al,0Fh
+ jne extra_characters_on_line
+ stop_while:
+ call find_end_while
+ pop ebx
+ mov eax,[ebx+10h]
+ mov [counter],eax
+ call remove_structure_data
+ jmp instruction_assembled
+ while_true:
+ pop ebx
+ jmp instruction_assembled
+ end_while:
+ cmp [prefixed_instruction],0
+ jne unexpected_instruction
+ call find_structure_data
+ jc unexpected_instruction
+ mov eax,[ebx+4]
+ mov [current_line],eax
+ inc [counter]
+ jz too_many_repeats
+ mov esi,[ebx+8]
+ jmp do_while
+ find_end_while:
+ call find_structure_end
+ cmp ax,while_directive-instruction_handler
+ jne unexpected_instruction
+ ret
+if_directive:
+ cmp [prefixed_instruction],0
+ jne unexpected_instruction
+ call calculate_logical_expression
+ mov dl,al
+ mov al,[esi]
+ or al,al
+ jz missing_end_directive
+ cmp al,0Fh
+ jne extra_characters_on_line
+ or dl,dl
+ jnz if_true
+ call find_else
+ jc instruction_assembled
+ mov al,[esi]
+ cmp al,1
+ jne else_true
+ cmp word [esi+1],if_directive-instruction_handler
+ jne else_true
+ add esi,4
+ jmp if_directive
+ if_true:
+ xor al,al
+ make_if_structure:
+ call allocate_structure_data
+ mov word [ebx],if_directive-instruction_handler
+ mov byte [ebx+2],al
+ mov eax,[current_line]
+ mov [ebx+4],eax
+ jmp instruction_assembled
+ else_true:
+ or al,al
+ jz missing_end_directive
+ cmp al,0Fh
+ jne extra_characters_on_line
+ or al,-1
+ jmp make_if_structure
+ else_directive:
+ cmp [prefixed_instruction],0
+ jne unexpected_instruction
+ mov ax,if_directive-instruction_handler
+ call find_structure_data
+ jc unexpected_instruction
+ cmp byte [ebx+2],0
+ jne unexpected_instruction
+ found_else:
+ mov al,[esi]
+ cmp al,1
+ jne skip_else
+ cmp word [esi+1],if_directive-instruction_handler
+ jne skip_else
+ add esi,4
+ call find_else
+ jnc found_else
+ call remove_structure_data
+ jmp instruction_assembled
+ skip_else:
+ or al,al
+ jz missing_end_directive
+ cmp al,0Fh
+ jne extra_characters_on_line
+ call find_end_if
+ call remove_structure_data
+ jmp instruction_assembled
+ end_if:
+ cmp [prefixed_instruction],0
+ jne unexpected_instruction
+ call find_structure_data
+ jc unexpected_instruction
+ call remove_structure_data
+ jmp instruction_assembled
+ find_else:
+ call find_structure_end
+ cmp ax,else_directive-instruction_handler
+ je else_found
+ cmp ax,if_directive-instruction_handler
+ jne unexpected_instruction
+ stc
+ ret
+ else_found:
+ clc
+ ret
+ find_end_if:
+ call find_structure_end
+ cmp ax,if_directive-instruction_handler
+ jne unexpected_instruction
+ ret
+ find_structure_end:
+ push [error_line]
+ mov eax,[current_line]
+ mov [error_line],eax
+ find_end_directive:
+ call skip_symbol
+ jnc find_end_directive
+ lods byte [esi]
+ cmp al,0Fh
+ jne no_end_directive
+ lods dword [esi]
+ mov [current_line],eax
+ skip_labels:
+ cmp byte [esi],2
+ jne labels_ok
+ add esi,6
+ jmp skip_labels
+ labels_ok:
+ cmp byte [esi],1
+ jne find_end_directive
+ mov ax,[esi+1]
+ cmp ax,prefix_instruction-instruction_handler
+ je find_end_directive
+ add esi,4
+ cmp ax,repeat_directive-instruction_handler
+ je skip_repeat
+ cmp ax,while_directive-instruction_handler
+ je skip_while
+ cmp ax,if_directive-instruction_handler
+ je skip_if
+ cmp ax,else_directive-instruction_handler
+ je structure_end
+ cmp ax,end_directive-instruction_handler
+ jne find_end_directive
+ cmp byte [esi],1
+ jne find_end_directive
+ mov ax,[esi+1]
+ add esi,4
+ cmp ax,repeat_directive-instruction_handler
+ je structure_end
+ cmp ax,while_directive-instruction_handler
+ je structure_end
+ cmp ax,if_directive-instruction_handler
+ jne find_end_directive
+ structure_end:
+ pop [error_line]
+ ret
+ no_end_directive:
+ mov eax,[error_line]
+ mov [current_line],eax
+ jmp missing_end_directive
+ skip_repeat:
+ call find_end_repeat
+ jmp find_end_directive
+ skip_while:
+ call find_end_while
+ jmp find_end_directive
+ skip_if:
+ call skip_if_block
+ jmp find_end_directive
+ skip_if_block:
+ call find_else
+ jc if_block_skipped
+ cmp byte [esi],1
+ jne skip_after_else
+ cmp word [esi+1],if_directive-instruction_handler
+ jne skip_after_else
+ add esi,4
+ jmp skip_if_block
+ skip_after_else:
+ call find_end_if
+ if_block_skipped:
+ ret
+end_directive:
+ lods byte [esi]
+ cmp al,1
+ jne invalid_argument
+ lods word [esi]
+ inc esi
+ cmp ax,virtual_directive-instruction_handler
+ je end_virtual
+ cmp ax,repeat_directive-instruction_handler
+ je end_repeat
+ cmp ax,while_directive-instruction_handler
+ je end_while
+ cmp ax,if_directive-instruction_handler
+ je end_if
+ cmp ax,data_directive-instruction_handler
+ je end_data
+ jmp invalid_argument
+break_directive:
+ mov ebx,[structures_buffer]
+ mov al,[esi]
+ or al,al
+ jz find_breakable_structure
+ cmp al,0Fh
+ jne extra_characters_on_line
+ find_breakable_structure:
+ cmp ebx,[additional_memory_end]
+ je unexpected_instruction
+ mov ax,[ebx]
+ cmp ax,repeat_directive-instruction_handler
+ je break_repeat
+ cmp ax,while_directive-instruction_handler
+ je break_while
+ cmp ax,if_directive-instruction_handler
+ je break_if
+ add ebx,18h
+ jmp find_breakable_structure
+ break_if:
+ push [current_line]
+ mov eax,[ebx+4]
+ mov [current_line],eax
+ call remove_structure_data
+ call skip_if_block
+ pop [current_line]
+ mov ebx,[structures_buffer]
+ jmp find_breakable_structure
+ break_repeat:
+ push ebx
+ call find_end_repeat
+ pop ebx
+ jmp stop_repeat
+ break_while:
+ push ebx
+ jmp stop_while
+
+data_bytes:
+ call define_data
+ lods byte [esi]
+ cmp al,'('
+ je get_byte
+ cmp al,'?'
+ jne invalid_argument
+ mov eax,edi
+ mov byte [edi],0
+ inc edi
+ jmp undefined_data
+ get_byte:
+ cmp byte [esi],0
+ je get_string
+ call get_byte_value
+ stos byte [edi]
+ ret
+ get_string:
+ inc esi
+ lods dword [esi]
+ mov ecx,eax
+ lea eax,[edi+ecx]
+ cmp eax,[tagged_blocks]
+ ja out_of_memory
+ rep movs byte [edi],[esi]
+ inc esi
+ ret
+ undefined_data:
+ mov ebp,[addressing_space]
+ test byte [ds:ebp+0Ah],1
+ jz mark_undefined_data
+ ret
+ mark_undefined_data:
+ cmp eax,[undefined_data_end]
+ je undefined_data_ok
+ mov [undefined_data_start],eax
+ undefined_data_ok:
+ mov [undefined_data_end],edi
+ ret
+ define_data:
+ cmp edi,[tagged_blocks]
+ jae out_of_memory
+ cmp byte [esi],'('
+ jne simple_data_value
+ mov ebx,esi
+ inc esi
+ call skip_expression
+ xchg esi,ebx
+ cmp byte [ebx],81h
+ jne simple_data_value
+ inc esi
+ call get_count_value
+ inc esi
+ or eax,eax
+ jz duplicate_zero_times
+ cmp byte [esi],'{'
+ jne duplicate_single_data_value
+ inc esi
+ duplicate_data:
+ push eax esi
+ duplicated_values:
+ cmp edi,[tagged_blocks]
+ jae out_of_memory
+ call near dword [esp+8]
+ lods byte [esi]
+ cmp al,','
+ je duplicated_values
+ cmp al,'}'
+ jne invalid_argument
+ pop ebx eax
+ dec eax
+ jz data_defined
+ mov esi,ebx
+ jmp duplicate_data
+ duplicate_single_data_value:
+ cmp edi,[tagged_blocks]
+ jae out_of_memory
+ push eax esi
+ call near dword [esp+8]
+ pop ebx eax
+ dec eax
+ jz data_defined
+ mov esi,ebx
+ jmp duplicate_single_data_value
+ duplicate_zero_times:
+ cmp byte [esi],'{'
+ jne skip_single_data_value
+ inc esi
+ skip_data_value:
+ call skip_symbol
+ jc invalid_argument
+ cmp byte [esi],'}'
+ jne skip_data_value
+ inc esi
+ jmp data_defined
+ skip_single_data_value:
+ call skip_symbol
+ jmp data_defined
+ simple_data_value:
+ cmp edi,[tagged_blocks]
+ jae out_of_memory
+ call near dword [esp]
+ data_defined:
+ lods byte [esi]
+ cmp al,','
+ je define_data
+ dec esi
+ add esp,4
+ jmp instruction_assembled
+data_unicode:
+ or [base_code],-1
+ jmp define_words
+data_words:
+ mov [base_code],0
+ define_words:
+ call define_data
+ lods byte [esi]
+ cmp al,'('
+ je get_word
+ cmp al,'?'
+ jne invalid_argument
+ mov eax,edi
+ and word [edi],0
+ scas word [edi]
+ jmp undefined_data
+ ret
+ get_word:
+ cmp [base_code],0
+ je word_data_value
+ cmp byte [esi],0
+ je word_string
+ word_data_value:
+ call get_word_value
+ call mark_relocation
+ stos word [edi]
+ ret
+ word_string:
+ inc esi
+ lods dword [esi]
+ mov ecx,eax
+ jecxz word_string_ok
+ lea eax,[edi+ecx*2]
+ cmp eax,[tagged_blocks]
+ ja out_of_memory
+ xor ah,ah
+ copy_word_string:
+ lods byte [esi]
+ stos word [edi]
+ loop copy_word_string
+ word_string_ok:
+ inc esi
+ ret
+data_dwords:
+ call define_data
+ lods byte [esi]
+ cmp al,'('
+ je get_dword
+ cmp al,'?'
+ jne invalid_argument
+ mov eax,edi
+ and dword [edi],0
+ scas dword [edi]
+ jmp undefined_data
+ get_dword:
+ push esi
+ call get_dword_value
+ pop ebx
+ cmp byte [esi],':'
+ je complex_dword
+ call mark_relocation
+ stos dword [edi]
+ ret
+ complex_dword:
+ mov esi,ebx
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_word_value
+ push eax
+ inc esi
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_operand
+ mov al,[value_type]
+ push eax
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_word_value
+ call mark_relocation
+ stos word [edi]
+ pop eax
+ mov [value_type],al
+ pop eax
+ call mark_relocation
+ stos word [edi]
+ ret
+data_pwords:
+ call define_data
+ lods byte [esi]
+ cmp al,'('
+ je get_pword
+ cmp al,'?'
+ jne invalid_argument
+ mov eax,edi
+ and dword [edi],0
+ scas dword [edi]
+ and word [edi],0
+ scas word [edi]
+ jmp undefined_data
+ get_pword:
+ push esi
+ call get_pword_value
+ pop ebx
+ cmp byte [esi],':'
+ je complex_pword
+ call mark_relocation
+ stos dword [edi]
+ mov ax,dx
+ stos word [edi]
+ ret
+ complex_pword:
+ mov esi,ebx
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_word_value
+ push eax
+ inc esi
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_operand
+ mov al,[value_type]
+ push eax
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_dword_value
+ call mark_relocation
+ stos dword [edi]
+ pop eax
+ mov [value_type],al
+ pop eax
+ call mark_relocation
+ stos word [edi]
+ ret
+data_qwords:
+ call define_data
+ lods byte [esi]
+ cmp al,'('
+ je get_qword
+ cmp al,'?'
+ jne invalid_argument
+ mov eax,edi
+ and dword [edi],0
+ scas dword [edi]
+ and dword [edi],0
+ scas dword [edi]
+ jmp undefined_data
+ get_qword:
+ call get_qword_value
+ call mark_relocation
+ stos dword [edi]
+ mov eax,edx
+ stos dword [edi]
+ ret
+data_twords:
+ call define_data
+ lods byte [esi]
+ cmp al,'('
+ je get_tword
+ cmp al,'?'
+ jne invalid_argument
+ mov eax,edi
+ and dword [edi],0
+ scas dword [edi]
+ and dword [edi],0
+ scas dword [edi]
+ and word [edi],0
+ scas word [edi]
+ jmp undefined_data
+ get_tword:
+ cmp byte [esi],'.'
+ jne complex_tword
+ inc esi
+ cmp word [esi+8],8000h
+ je fp_zero_tword
+ mov eax,[esi]
+ stos dword [edi]
+ mov eax,[esi+4]
+ stos dword [edi]
+ mov ax,[esi+8]
+ add ax,3FFFh
+ jo value_out_of_range
+ cmp ax,7FFFh
+ jge value_out_of_range
+ cmp ax,0
+ jg tword_exp_ok
+ mov cx,ax
+ neg cx
+ inc cx
+ cmp cx,64
+ jae value_out_of_range
+ cmp cx,32
+ ja large_shift
+ mov eax,[esi]
+ mov edx,[esi+4]
+ mov ebx,edx
+ shr edx,cl
+ shrd eax,ebx,cl
+ jmp tword_mantissa_shift_done
+ large_shift:
+ sub cx,32
+ xor edx,edx
+ mov eax,[esi+4]
+ shr eax,cl
+ tword_mantissa_shift_done:
+ jnc store_shifted_mantissa
+ add eax,1
+ adc edx,0
+ store_shifted_mantissa:
+ mov [edi-8],eax
+ mov [edi-4],edx
+ xor ax,ax
+ test edx,1 shl 31
+ jz tword_exp_ok
+ inc ax
+ tword_exp_ok:
+ mov bl,[esi+11]
+ shl bx,15
+ or ax,bx
+ stos word [edi]
+ add esi,13
+ ret
+ fp_zero_tword:
+ xor eax,eax
+ stos dword [edi]
+ stos dword [edi]
+ mov al,[esi+11]
+ shl ax,15
+ stos word [edi]
+ add esi,13
+ ret
+ complex_tword:
+ call get_word_value
+ push eax
+ cmp byte [esi],':'
+ jne invalid_operand
+ inc esi
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_operand
+ mov al,[value_type]
+ push eax
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_qword_value
+ call mark_relocation
+ stos dword [edi]
+ mov eax,edx
+ stos dword [edi]
+ pop eax
+ mov [value_type],al
+ pop eax
+ call mark_relocation
+ stos word [edi]
+ ret
+data_file:
+ lods word [esi]
+ cmp ax,'('
+ jne invalid_argument
+ add esi,4
+ call open_binary_file
+ mov eax,[esi-4]
+ lea esi,[esi+eax+1]
+ mov al,2
+ xor edx,edx
+ call lseek
+ push eax
+ xor edx,edx
+ cmp byte [esi],':'
+ jne position_ok
+ inc esi
+ cmp byte [esi],'('
+ jne invalid_argument
+ inc esi
+ cmp byte [esi],'.'
+ je invalid_value
+ push ebx
+ call get_count_value
+ pop ebx
+ mov edx,eax
+ sub [esp],edx
+ jc value_out_of_range
+ position_ok:
+ cmp byte [esi],','
+ jne size_ok
+ inc esi
+ cmp byte [esi],'('
+ jne invalid_argument
+ inc esi
+ cmp byte [esi],'.'
+ je invalid_value
+ push ebx edx
+ call get_count_value
+ pop edx ebx
+ cmp eax,[esp]
+ ja value_out_of_range
+ mov [esp],eax
+ size_ok:
+ xor al,al
+ call lseek
+ pop ecx
+ mov edx,edi
+ add edi,ecx
+ jc out_of_memory
+ cmp edi,[tagged_blocks]
+ ja out_of_memory
+ call read
+ jc error_reading_file
+ call close
+ lods byte [esi]
+ cmp al,','
+ je data_file
+ dec esi
+ jmp instruction_assembled
+ open_binary_file:
+ push esi
+ push edi
+ mov eax,[current_line]
+ find_current_source_path:
+ mov esi,[eax]
+ test byte [eax+7],80h
+ jz get_current_path
+ mov eax,[eax+8]
+ jmp find_current_source_path
+ get_current_path:
+ lodsb
+ stosb
+ or al,al
+ jnz get_current_path
+ cut_current_path:
+ cmp edi,[esp]
+ je current_path_ok
+ cmp byte [edi-1],'\'
+ je current_path_ok
+ cmp byte [edi-1],'/'
+ je current_path_ok
+ dec edi
+ jmp cut_current_path
+ current_path_ok:
+ mov esi,[esp+4]
+ call expand_path
+ pop edx
+ mov esi,edx
+ call open
+ jnc file_opened
+ mov edx,[include_paths]
+ search_in_include_paths:
+ push edx esi
+ mov edi,esi
+ mov esi,[esp+4]
+ call get_include_directory
+ mov [esp+4],esi
+ mov esi,[esp+8]
+ call expand_path
+ pop edx
+ mov esi,edx
+ call open
+ pop edx
+ jnc file_opened
+ cmp byte [edx],0
+ jne search_in_include_paths
+ mov edi,esi
+ mov esi,[esp]
+ push edi
+ call expand_path
+ pop edx
+ mov esi,edx
+ call open
+ jc file_not_found
+ file_opened:
+ mov edi,esi
+ pop esi
+ ret
+reserve_bytes:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ mov ecx,eax
+ mov edx,ecx
+ add edx,edi
+ jc out_of_memory
+ cmp edx,[tagged_blocks]
+ ja out_of_memory
+ push edi
+ cmp [next_pass_needed],0
+ je zero_bytes
+ add edi,ecx
+ jmp reserved_data
+ zero_bytes:
+ xor eax,eax
+ shr ecx,1
+ jnc bytes_stosb_ok
+ stos byte [edi]
+ bytes_stosb_ok:
+ shr ecx,1
+ jnc bytes_stosw_ok
+ stos word [edi]
+ bytes_stosw_ok:
+ rep stos dword [edi]
+ reserved_data:
+ pop eax
+ call undefined_data
+ jmp instruction_assembled
+reserve_words:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ mov ecx,eax
+ mov edx,ecx
+ shl edx,1
+ jc out_of_memory
+ add edx,edi
+ jc out_of_memory
+ cmp edx,[tagged_blocks]
+ ja out_of_memory
+ push edi
+ cmp [next_pass_needed],0
+ je zero_words
+ lea edi,[edi+ecx*2]
+ jmp reserved_data
+ zero_words:
+ xor eax,eax
+ shr ecx,1
+ jnc words_stosw_ok
+ stos word [edi]
+ words_stosw_ok:
+ rep stos dword [edi]
+ jmp reserved_data
+reserve_dwords:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ mov ecx,eax
+ mov edx,ecx
+ shl edx,1
+ jc out_of_memory
+ shl edx,1
+ jc out_of_memory
+ add edx,edi
+ jc out_of_memory
+ cmp edx,[tagged_blocks]
+ ja out_of_memory
+ push edi
+ cmp [next_pass_needed],0
+ je zero_dwords
+ lea edi,[edi+ecx*4]
+ jmp reserved_data
+ zero_dwords:
+ xor eax,eax
+ rep stos dword [edi]
+ jmp reserved_data
+reserve_pwords:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ mov ecx,eax
+ shl ecx,1
+ jc out_of_memory
+ add ecx,eax
+ mov edx,ecx
+ shl edx,1
+ jc out_of_memory
+ add edx,edi
+ jc out_of_memory
+ cmp edx,[tagged_blocks]
+ ja out_of_memory
+ push edi
+ cmp [next_pass_needed],0
+ je zero_words
+ lea edi,[edi+ecx*2]
+ jmp reserved_data
+reserve_qwords:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ mov ecx,eax
+ shl ecx,1
+ jc out_of_memory
+ mov edx,ecx
+ shl edx,1
+ jc out_of_memory
+ shl edx,1
+ jc out_of_memory
+ add edx,edi
+ jc out_of_memory
+ cmp edx,[tagged_blocks]
+ ja out_of_memory
+ push edi
+ cmp [next_pass_needed],0
+ je zero_dwords
+ lea edi,[edi+ecx*4]
+ jmp reserved_data
+reserve_twords:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ mov ecx,eax
+ shl ecx,2
+ jc out_of_memory
+ add ecx,eax
+ mov edx,ecx
+ shl edx,1
+ jc out_of_memory
+ add edx,edi
+ jc out_of_memory
+ cmp edx,[tagged_blocks]
+ ja out_of_memory
+ push edi
+ cmp [next_pass_needed],0
+ je zero_words
+ lea edi,[edi+ecx*2]
+ jmp reserved_data
+align_directive:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_argument
+ cmp byte [esi],'.'
+ je invalid_value
+ call get_count_value
+ mov edx,eax
+ dec edx
+ test eax,edx
+ jnz invalid_align_value
+ or eax,eax
+ jz invalid_align_value
+ cmp eax,1
+ je instruction_assembled
+ mov ecx,edi
+ mov ebp,[addressing_space]
+ sub ecx,[ds:ebp]
+ cmp dword [ds:ebp+10h],0
+ jne section_not_aligned_enough
+ cmp byte [ds:ebp+9],0
+ je make_alignment
+ cmp [output_format],3
+ je pe_alignment
+ mov ebx,[ds:ebp+14h]
+ cmp byte [ebx],0
+ jne section_not_aligned_enough
+ cmp eax,[ebx+10h]
+ jbe make_alignment
+ jmp section_not_aligned_enough
+ pe_alignment:
+ cmp eax,1000h
+ ja section_not_aligned_enough
+ make_alignment:
+ dec eax
+ and ecx,eax
+ jz instruction_assembled
+ neg ecx
+ add ecx,eax
+ inc ecx
+ mov edx,ecx
+ add edx,edi
+ jc out_of_memory
+ cmp edx,[tagged_blocks]
+ ja out_of_memory
+ push edi
+ cmp [next_pass_needed],0
+ je nops
+ add edi,ecx
+ jmp reserved_data
+ invalid_align_value:
+ cmp [error_line],0
+ jne instruction_assembled
+ mov eax,[current_line]
+ mov [error_line],eax
+ mov [error],invalid_value
+ jmp instruction_assembled
+ nops:
+ mov eax,90909090h
+ shr ecx,1
+ jnc nops_stosb_ok
+ stos byte [edi]
+ nops_stosb_ok:
+ shr ecx,1
+ jnc nops_stosw_ok
+ stos word [edi]
+ nops_stosw_ok:
+ rep stos dword [edi]
+ jmp reserved_data
+err_directive:
+ mov al,[esi]
+ cmp al,0Fh
+ je invoked_error
+ or al,al
+ jz invoked_error
+ jmp extra_characters_on_line
+assert_directive:
+ call calculate_logical_expression
+ or al,al
+ jnz instruction_assembled
+ cmp [error_line],0
+ jne instruction_assembled
+ mov eax,[current_line]
+ mov [error_line],eax
+ mov [error],assertion_failed
+ jmp instruction_assembled
diff --git a/samples/Assembly/FASM.asm b/samples/Assembly/FASM.asm
new file mode 100644
index 00000000..9a2201ae
--- /dev/null
+++ b/samples/Assembly/FASM.asm
@@ -0,0 +1,350 @@
+
+; flat assembler interface for Win32
+; Copyright (c) 1999-2014, Tomasz Grysztar.
+; All rights reserved.
+
+ format PE console
+
+section '.text' code readable executable
+
+start:
+
+ mov [con_handle],STD_OUTPUT_HANDLE
+ mov esi,_logo
+ call display_string
+
+ call get_params
+ jc information
+
+ call init_memory
+
+ mov esi,_memory_prefix
+ call display_string
+ mov eax,[memory_end]
+ sub eax,[memory_start]
+ add eax,[additional_memory_end]
+ sub eax,[additional_memory]
+ shr eax,10
+ call display_number
+ mov esi,_memory_suffix
+ call display_string
+
+ call [GetTickCount]
+ mov [start_time],eax
+
+ call preprocessor
+ call parser
+ call assembler
+ call formatter
+
+ call display_user_messages
+ movzx eax,[current_pass]
+ inc eax
+ call display_number
+ mov esi,_passes_suffix
+ call display_string
+ call [GetTickCount]
+ sub eax,[start_time]
+ xor edx,edx
+ mov ebx,100
+ div ebx
+ or eax,eax
+ jz display_bytes_count
+ xor edx,edx
+ mov ebx,10
+ div ebx
+ push edx
+ call display_number
+ mov dl,'.'
+ call display_character
+ pop eax
+ call display_number
+ mov esi,_seconds_suffix
+ call display_string
+ display_bytes_count:
+ mov eax,[written_size]
+ call display_number
+ mov esi,_bytes_suffix
+ call display_string
+ xor al,al
+ jmp exit_program
+
+information:
+ mov esi,_usage
+ call display_string
+ mov al,1
+ jmp exit_program
+
+get_params:
+ mov [input_file],0
+ mov [output_file],0
+ mov [symbols_file],0
+ mov [memory_setting],0
+ mov [passes_limit],100
+ call [GetCommandLine]
+ mov esi,eax
+ mov edi,params
+ find_command_start:
+ lodsb
+ cmp al,20h
+ je find_command_start
+ cmp al,22h
+ je skip_quoted_name
+ skip_name:
+ lodsb
+ cmp al,20h
+ je find_param
+ or al,al
+ jz all_params
+ jmp skip_name
+ skip_quoted_name:
+ lodsb
+ cmp al,22h
+ je find_param
+ or al,al
+ jz all_params
+ jmp skip_quoted_name
+ find_param:
+ lodsb
+ cmp al,20h
+ je find_param
+ cmp al,'-'
+ je option_param
+ cmp al,0Dh
+ je all_params
+ or al,al
+ jz all_params
+ cmp [input_file],0
+ jne get_output_file
+ mov [input_file],edi
+ jmp process_param
+ get_output_file:
+ cmp [output_file],0
+ jne bad_params
+ mov [output_file],edi
+ process_param:
+ cmp al,22h
+ je string_param
+ copy_param:
+ stosb
+ lodsb
+ cmp al,20h
+ je param_end
+ cmp al,0Dh
+ je param_end
+ or al,al
+ jz param_end
+ jmp copy_param
+ string_param:
+ lodsb
+ cmp al,22h
+ je string_param_end
+ cmp al,0Dh
+ je param_end
+ or al,al
+ jz param_end
+ stosb
+ jmp string_param
+ option_param:
+ lodsb
+ cmp al,'m'
+ je memory_option
+ cmp al,'M'
+ je memory_option
+ cmp al,'p'
+ je passes_option
+ cmp al,'P'
+ je passes_option
+ cmp al,'s'
+ je symbols_option
+ cmp al,'S'
+ je symbols_option
+ bad_params:
+ stc
+ ret
+ get_option_value:
+ xor eax,eax
+ mov edx,eax
+ get_option_digit:
+ lodsb
+ cmp al,20h
+ je option_value_ok
+ cmp al,0Dh
+ je option_value_ok
+ or al,al
+ jz option_value_ok
+ sub al,30h
+ jc invalid_option_value
+ cmp al,9
+ ja invalid_option_value
+ imul edx,10
+ jo invalid_option_value
+ add edx,eax
+ jc invalid_option_value
+ jmp get_option_digit
+ option_value_ok:
+ dec esi
+ clc
+ ret
+ invalid_option_value:
+ stc
+ ret
+ memory_option:
+ lodsb
+ cmp al,20h
+ je memory_option
+ cmp al,0Dh
+ je bad_params
+ or al,al
+ jz bad_params
+ dec esi
+ call get_option_value
+ or edx,edx
+ jz bad_params
+ cmp edx,1 shl (32-10)
+ jae bad_params
+ mov [memory_setting],edx
+ jmp find_param
+ passes_option:
+ lodsb
+ cmp al,20h
+ je passes_option
+ cmp al,0Dh
+ je bad_params
+ or al,al
+ jz bad_params
+ dec esi
+ call get_option_value
+ or edx,edx
+ jz bad_params
+ cmp edx,10000h
+ ja bad_params
+ mov [passes_limit],dx
+ jmp find_param
+ symbols_option:
+ mov [symbols_file],edi
+ find_symbols_file_name:
+ lodsb
+ cmp al,20h
+ jne process_param
+ jmp find_symbols_file_name
+ param_end:
+ dec esi
+ string_param_end:
+ xor al,al
+ stosb
+ jmp find_param
+ all_params:
+ cmp [input_file],0
+ je bad_params
+ clc
+ ret
+
+include 'system.inc'
+
+include '..\errors.inc'
+include '..\symbdump.inc'
+include '..\preproce.inc'
+include '..\parser.inc'
+include '..\exprpars.inc'
+include '..\assemble.inc'
+include '..\exprcalc.inc'
+include '..\formats.inc'
+include '..\x86_64.inc'
+include '..\avx.inc'
+
+include '..\tables.inc'
+include '..\messages.inc'
+
+section '.data' data readable writeable
+
+include '..\version.inc'
+
+_copyright db 'Copyright (c) 1999-2014, Tomasz Grysztar',0Dh,0Ah,0
+
+_logo db 'flat assembler version ',VERSION_STRING,0
+_usage db 0Dh,0Ah
+ db 'usage: fasm [output]',0Dh,0Ah
+ db 'optional settings:',0Dh,0Ah
+ db ' -m set the limit in kilobytes for the available memory',0Dh,0Ah
+ db ' -p set the maximum allowed number of passes',0Dh,0Ah
+ db ' -s dump symbolic information for debugging',0Dh,0Ah
+ db 0
+_memory_prefix db ' (',0
+_memory_suffix db ' kilobytes memory)',0Dh,0Ah,0
+_passes_suffix db ' passes, ',0
+_seconds_suffix db ' seconds, ',0
+_bytes_suffix db ' bytes.',0Dh,0Ah,0
+
+align 4
+
+include '..\variable.inc'
+
+con_handle dd ?
+memory_setting dd ?
+start_time dd ?
+bytes_count dd ?
+displayed_count dd ?
+character db ?
+last_displayed rb 2
+
+params rb 1000h
+options rb 1000h
+buffer rb 4000h
+
+stack 10000h
+
+section '.idata' import data readable writeable
+
+ dd 0,0,0,rva kernel_name,rva kernel_table
+ dd 0,0,0,0,0
+
+ kernel_table:
+ ExitProcess dd rva _ExitProcess
+ CreateFile dd rva _CreateFileA
+ ReadFile dd rva _ReadFile
+ WriteFile dd rva _WriteFile
+ CloseHandle dd rva _CloseHandle
+ SetFilePointer dd rva _SetFilePointer
+ GetCommandLine dd rva _GetCommandLineA
+ GetEnvironmentVariable dd rva _GetEnvironmentVariable
+ GetStdHandle dd rva _GetStdHandle
+ VirtualAlloc dd rva _VirtualAlloc
+ VirtualFree dd rva _VirtualFree
+ GetTickCount dd rva _GetTickCount
+ GetSystemTime dd rva _GetSystemTime
+ GlobalMemoryStatus dd rva _GlobalMemoryStatus
+ dd 0
+
+ kernel_name db 'KERNEL32.DLL',0
+
+ _ExitProcess dw 0
+ db 'ExitProcess',0
+ _CreateFileA dw 0
+ db 'CreateFileA',0
+ _ReadFile dw 0
+ db 'ReadFile',0
+ _WriteFile dw 0
+ db 'WriteFile',0
+ _CloseHandle dw 0
+ db 'CloseHandle',0
+ _SetFilePointer dw 0
+ db 'SetFilePointer',0
+ _GetCommandLineA dw 0
+ db 'GetCommandLineA',0
+ _GetEnvironmentVariable dw 0
+ db 'GetEnvironmentVariableA',0
+ _GetStdHandle dw 0
+ db 'GetStdHandle',0
+ _VirtualAlloc dw 0
+ db 'VirtualAlloc',0
+ _VirtualFree dw 0
+ db 'VirtualFree',0
+ _GetTickCount dw 0
+ db 'GetTickCount',0
+ _GetSystemTime dw 0
+ db 'GetSystemTime',0
+ _GlobalMemoryStatus dw 0
+ db 'GlobalMemoryStatus',0
+
+section '.reloc' fixups data readable discardable
diff --git a/samples/Assembly/SYSTEM.inc b/samples/Assembly/SYSTEM.inc
new file mode 100644
index 00000000..77a61d29
--- /dev/null
+++ b/samples/Assembly/SYSTEM.inc
@@ -0,0 +1,503 @@
+
+; flat assembler interface for Win32
+; Copyright (c) 1999-2014, Tomasz Grysztar.
+; All rights reserved.
+
+CREATE_NEW = 1
+CREATE_ALWAYS = 2
+OPEN_EXISTING = 3
+OPEN_ALWAYS = 4
+TRUNCATE_EXISTING = 5
+
+FILE_SHARE_READ = 1
+FILE_SHARE_WRITE = 2
+FILE_SHARE_DELETE = 4
+
+GENERIC_READ = 80000000h
+GENERIC_WRITE = 40000000h
+
+STD_INPUT_HANDLE = 0FFFFFFF6h
+STD_OUTPUT_HANDLE = 0FFFFFFF5h
+STD_ERROR_HANDLE = 0FFFFFFF4h
+
+MEM_COMMIT = 1000h
+MEM_RESERVE = 2000h
+MEM_DECOMMIT = 4000h
+MEM_RELEASE = 8000h
+MEM_FREE = 10000h
+MEM_PRIVATE = 20000h
+MEM_MAPPED = 40000h
+MEM_RESET = 80000h
+MEM_TOP_DOWN = 100000h
+
+PAGE_NOACCESS = 1
+PAGE_READONLY = 2
+PAGE_READWRITE = 4
+PAGE_WRITECOPY = 8
+PAGE_EXECUTE = 10h
+PAGE_EXECUTE_READ = 20h
+PAGE_EXECUTE_READWRITE = 40h
+PAGE_EXECUTE_WRITECOPY = 80h
+PAGE_GUARD = 100h
+PAGE_NOCACHE = 200h
+
+init_memory:
+ xor eax,eax
+ mov [memory_start],eax
+ mov eax,esp
+ and eax,not 0FFFh
+ add eax,1000h-10000h
+ mov [stack_limit],eax
+ mov eax,[memory_setting]
+ shl eax,10
+ jnz allocate_memory
+ push buffer
+ call [GlobalMemoryStatus]
+ mov eax,dword [buffer+20]
+ mov edx,dword [buffer+12]
+ cmp eax,0
+ jl large_memory
+ cmp edx,0
+ jl large_memory
+ shr eax,2
+ add eax,edx
+ jmp allocate_memory
+ large_memory:
+ mov eax,80000000h
+ allocate_memory:
+ mov edx,eax
+ shr edx,2
+ mov ecx,eax
+ sub ecx,edx
+ mov [memory_end],ecx
+ mov [additional_memory_end],edx
+ push PAGE_READWRITE
+ push MEM_COMMIT
+ push eax
+ push 0
+ call [VirtualAlloc]
+ or eax,eax
+ jz not_enough_memory
+ mov [memory_start],eax
+ add eax,[memory_end]
+ mov [memory_end],eax
+ mov [additional_memory],eax
+ add [additional_memory_end],eax
+ ret
+ not_enough_memory:
+ mov eax,[additional_memory_end]
+ shl eax,1
+ cmp eax,4000h
+ jb out_of_memory
+ jmp allocate_memory
+
+exit_program:
+ movzx eax,al
+ push eax
+ mov eax,[memory_start]
+ test eax,eax
+ jz do_exit
+ push MEM_RELEASE
+ push 0
+ push eax
+ call [VirtualFree]
+ do_exit:
+ call [ExitProcess]
+
+get_environment_variable:
+ mov ecx,[memory_end]
+ sub ecx,edi
+ cmp ecx,4000h
+ jbe buffer_for_variable_ok
+ mov ecx,4000h
+ buffer_for_variable_ok:
+ push ecx
+ push edi
+ push esi
+ call [GetEnvironmentVariable]
+ add edi,eax
+ cmp edi,[memory_end]
+ jae out_of_memory
+ ret
+
+open:
+ push 0
+ push 0
+ push OPEN_EXISTING
+ push 0
+ push FILE_SHARE_READ
+ push GENERIC_READ
+ push edx
+ call [CreateFile]
+ cmp eax,-1
+ je file_error
+ mov ebx,eax
+ clc
+ ret
+ file_error:
+ stc
+ ret
+create:
+ push 0
+ push 0
+ push CREATE_ALWAYS
+ push 0
+ push FILE_SHARE_READ
+ push GENERIC_WRITE
+ push edx
+ call [CreateFile]
+ cmp eax,-1
+ je file_error
+ mov ebx,eax
+ clc
+ ret
+write:
+ push 0
+ push bytes_count
+ push ecx
+ push edx
+ push ebx
+ call [WriteFile]
+ or eax,eax
+ jz file_error
+ clc
+ ret
+read:
+ mov ebp,ecx
+ push 0
+ push bytes_count
+ push ecx
+ push edx
+ push ebx
+ call [ReadFile]
+ or eax,eax
+ jz file_error
+ cmp ebp,[bytes_count]
+ jne file_error
+ clc
+ ret
+close:
+ push ebx
+ call [CloseHandle]
+ ret
+lseek:
+ movzx eax,al
+ push eax
+ push 0
+ push edx
+ push ebx
+ call [SetFilePointer]
+ ret
+
+display_string:
+ push [con_handle]
+ call [GetStdHandle]
+ mov ebp,eax
+ mov edi,esi
+ or ecx,-1
+ xor al,al
+ repne scasb
+ neg ecx
+ sub ecx,2
+ push 0
+ push bytes_count
+ push ecx
+ push esi
+ push ebp
+ call [WriteFile]
+ ret
+display_character:
+ push ebx
+ mov [character],dl
+ push [con_handle]
+ call [GetStdHandle]
+ mov ebx,eax
+ push 0
+ push bytes_count
+ push 1
+ push character
+ push ebx
+ call [WriteFile]
+ pop ebx
+ ret
+display_number:
+ push ebx
+ mov ecx,1000000000
+ xor edx,edx
+ xor bl,bl
+ display_loop:
+ div ecx
+ push edx
+ cmp ecx,1
+ je display_digit
+ or bl,bl
+ jnz display_digit
+ or al,al
+ jz digit_ok
+ not bl
+ display_digit:
+ mov dl,al
+ add dl,30h
+ push ecx
+ call display_character
+ pop ecx
+ digit_ok:
+ mov eax,ecx
+ xor edx,edx
+ mov ecx,10
+ div ecx
+ mov ecx,eax
+ pop eax
+ or ecx,ecx
+ jnz display_loop
+ pop ebx
+ ret
+
+display_user_messages:
+ mov [displayed_count],0
+ call show_display_buffer
+ cmp [displayed_count],1
+ jb line_break_ok
+ je make_line_break
+ mov ax,word [last_displayed]
+ cmp ax,0A0Dh
+ je line_break_ok
+ cmp ax,0D0Ah
+ je line_break_ok
+ make_line_break:
+ mov word [buffer],0A0Dh
+ push [con_handle]
+ call [GetStdHandle]
+ push 0
+ push bytes_count
+ push 2
+ push buffer
+ push eax
+ call [WriteFile]
+ line_break_ok:
+ ret
+display_block:
+ add [displayed_count],ecx
+ cmp ecx,1
+ ja take_last_two_characters
+ jb block_displayed
+ mov al,[last_displayed+1]
+ mov ah,[esi]
+ mov word [last_displayed],ax
+ jmp block_ok
+ take_last_two_characters:
+ mov ax,[esi+ecx-2]
+ mov word [last_displayed],ax
+ block_ok:
+ push ecx
+ push [con_handle]
+ call [GetStdHandle]
+ pop ecx
+ push 0
+ push bytes_count
+ push ecx
+ push esi
+ push eax
+ call [WriteFile]
+ block_displayed:
+ ret
+
+fatal_error:
+ mov [con_handle],STD_ERROR_HANDLE
+ mov esi,error_prefix
+ call display_string
+ pop esi
+ call display_string
+ mov esi,error_suffix
+ call display_string
+ mov al,0FFh
+ jmp exit_program
+assembler_error:
+ mov [con_handle],STD_ERROR_HANDLE
+ call display_user_messages
+ push dword 0
+ mov ebx,[current_line]
+ get_error_lines:
+ mov eax,[ebx]
+ cmp byte [eax],0
+ je get_next_error_line
+ push ebx
+ test byte [ebx+7],80h
+ jz display_error_line
+ mov edx,ebx
+ find_definition_origin:
+ mov edx,[edx+12]
+ test byte [edx+7],80h
+ jnz find_definition_origin
+ push edx
+ get_next_error_line:
+ mov ebx,[ebx+8]
+ jmp get_error_lines
+ display_error_line:
+ mov esi,[ebx]
+ call display_string
+ mov esi,line_number_start
+ call display_string
+ mov eax,[ebx+4]
+ and eax,7FFFFFFFh
+ call display_number
+ mov dl,']'
+ call display_character
+ pop esi
+ cmp ebx,esi
+ je line_number_ok
+ mov dl,20h
+ call display_character
+ push esi
+ mov esi,[esi]
+ movzx ecx,byte [esi]
+ inc esi
+ call display_block
+ mov esi,line_number_start
+ call display_string
+ pop esi
+ mov eax,[esi+4]
+ and eax,7FFFFFFFh
+ call display_number
+ mov dl,']'
+ call display_character
+ line_number_ok:
+ mov esi,line_data_start
+ call display_string
+ mov esi,ebx
+ mov edx,[esi]
+ call open
+ mov al,2
+ xor edx,edx
+ call lseek
+ mov edx,[esi+8]
+ sub eax,edx
+ jz line_data_displayed
+ push eax
+ xor al,al
+ call lseek
+ mov ecx,[esp]
+ mov edx,[additional_memory]
+ lea eax,[edx+ecx]
+ cmp eax,[additional_memory_end]
+ ja out_of_memory
+ call read
+ call close
+ pop ecx
+ mov esi,[additional_memory]
+ get_line_data:
+ mov al,[esi]
+ cmp al,0Ah
+ je display_line_data
+ cmp al,0Dh
+ je display_line_data
+ cmp al,1Ah
+ je display_line_data
+ or al,al
+ jz display_line_data
+ inc esi
+ loop get_line_data
+ display_line_data:
+ mov ecx,esi
+ mov esi,[additional_memory]
+ sub ecx,esi
+ call display_block
+ line_data_displayed:
+ mov esi,cr_lf
+ call display_string
+ pop ebx
+ or ebx,ebx
+ jnz display_error_line
+ mov esi,error_prefix
+ call display_string
+ pop esi
+ call display_string
+ mov esi,error_suffix
+ call display_string
+ mov al,2
+ jmp exit_program
+
+make_timestamp:
+ push buffer
+ call [GetSystemTime]
+ movzx ecx,word [buffer]
+ mov eax,ecx
+ sub eax,1970
+ mov ebx,365
+ mul ebx
+ mov ebp,eax
+ mov eax,ecx
+ sub eax,1969
+ shr eax,2
+ add ebp,eax
+ mov eax,ecx
+ sub eax,1901
+ mov ebx,100
+ div ebx
+ sub ebp,eax
+ mov eax,ecx
+ xor edx,edx
+ sub eax,1601
+ mov ebx,400
+ div ebx
+ add ebp,eax
+ movzx ecx,word [buffer+2]
+ mov eax,ecx
+ dec eax
+ mov ebx,30
+ mul ebx
+ add ebp,eax
+ cmp ecx,8
+ jbe months_correction
+ mov eax,ecx
+ sub eax,7
+ shr eax,1
+ add ebp,eax
+ mov ecx,8
+ months_correction:
+ mov eax,ecx
+ shr eax,1
+ add ebp,eax
+ cmp ecx,2
+ jbe day_correction_ok
+ sub ebp,2
+ movzx ecx,word [buffer]
+ test ecx,11b
+ jnz day_correction_ok
+ xor edx,edx
+ mov eax,ecx
+ mov ebx,100
+ div ebx
+ or edx,edx
+ jnz day_correction
+ mov eax,ecx
+ mov ebx,400
+ div ebx
+ or edx,edx
+ jnz day_correction_ok
+ day_correction:
+ inc ebp
+ day_correction_ok:
+ movzx eax,word [buffer+6]
+ dec eax
+ add eax,ebp
+ mov ebx,24
+ mul ebx
+ movzx ecx,word [buffer+8]
+ add eax,ecx
+ mov ebx,60
+ mul ebx
+ movzx ecx,word [buffer+10]
+ add eax,ecx
+ mov ebx,60
+ mul ebx
+ movzx ecx,word [buffer+12]
+ add eax,ecx
+ adc edx,0
+ ret
+
+error_prefix db 'error: ',0
+error_suffix db '.'
+cr_lf db 0Dh,0Ah,0
+line_number_start db ' [',0
+line_data_start db ':',0Dh,0Ah,0
diff --git a/samples/Assembly/X86_64.inc b/samples/Assembly/X86_64.inc
new file mode 100644
index 00000000..28413065
--- /dev/null
+++ b/samples/Assembly/X86_64.inc
@@ -0,0 +1,7060 @@
+
+; flat assembler core
+; Copyright (c) 1999-2014, Tomasz Grysztar.
+; All rights reserved.
+
+simple_instruction_except64:
+ cmp [code_type],64
+ je illegal_instruction
+simple_instruction:
+ stos byte [edi]
+ jmp instruction_assembled
+simple_instruction_only64:
+ cmp [code_type],64
+ jne illegal_instruction
+ jmp simple_instruction
+simple_instruction_16bit_except64:
+ cmp [code_type],64
+ je illegal_instruction
+simple_instruction_16bit:
+ cmp [code_type],16
+ jne size_prefix
+ stos byte [edi]
+ jmp instruction_assembled
+ size_prefix:
+ mov ah,al
+ mov al,66h
+ stos word [edi]
+ jmp instruction_assembled
+simple_instruction_32bit_except64:
+ cmp [code_type],64
+ je illegal_instruction
+simple_instruction_32bit:
+ cmp [code_type],16
+ je size_prefix
+ stos byte [edi]
+ jmp instruction_assembled
+iret_instruction:
+ cmp [code_type],64
+ jne simple_instruction
+simple_instruction_64bit:
+ cmp [code_type],64
+ jne illegal_instruction
+ mov ah,al
+ mov al,48h
+ stos word [edi]
+ jmp instruction_assembled
+simple_extended_instruction_64bit:
+ cmp [code_type],64
+ jne illegal_instruction
+ mov byte [edi],48h
+ inc edi
+simple_extended_instruction:
+ mov ah,al
+ mov al,0Fh
+ stos word [edi]
+ jmp instruction_assembled
+prefix_instruction:
+ stos byte [edi]
+ or [prefixed_instruction],-1
+ jmp continue_line
+segment_prefix:
+ mov ah,al
+ shr ah,4
+ cmp ah,6
+ jne illegal_instruction
+ and al,1111b
+ mov [segment_register],al
+ call store_segment_prefix
+ or [prefixed_instruction],-1
+ jmp continue_line
+int_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp ah,1
+ ja invalid_operand_size
+ cmp al,'('
+ jne invalid_operand
+ call get_byte_value
+ test eax,eax
+ jns int_imm_ok
+ call recoverable_overflow
+ int_imm_ok:
+ mov ah,al
+ mov al,0CDh
+ stos word [edi]
+ jmp instruction_assembled
+aa_instruction:
+ cmp [code_type],64
+ je illegal_instruction
+ push eax
+ mov bl,10
+ cmp byte [esi],'('
+ jne aa_store
+ inc esi
+ xor al,al
+ xchg al,[operand_size]
+ cmp al,1
+ ja invalid_operand_size
+ call get_byte_value
+ mov bl,al
+ aa_store:
+ cmp [operand_size],0
+ jne invalid_operand
+ pop eax
+ mov ah,bl
+ stos word [edi]
+ jmp instruction_assembled
+
+basic_instruction:
+ mov [base_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je basic_reg
+ cmp al,'['
+ jne invalid_operand
+ basic_mem:
+ call get_address
+ push edx ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je basic_mem_imm
+ cmp al,10h
+ jne invalid_operand
+ basic_mem_reg:
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ mov al,ah
+ cmp al,1
+ je instruction_ready
+ call operand_autodetect
+ inc [base_code]
+ instruction_ready:
+ call store_instruction
+ jmp instruction_assembled
+ basic_mem_imm:
+ mov al,[operand_size]
+ cmp al,1
+ jb basic_mem_imm_nosize
+ je basic_mem_imm_8bit
+ cmp al,2
+ je basic_mem_imm_16bit
+ cmp al,4
+ je basic_mem_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ basic_mem_imm_64bit:
+ cmp [size_declared],0
+ jne long_immediate_not_encodable
+ call operand_64bit
+ call get_simm32
+ cmp [value_type],4
+ jae long_immediate_not_encodable
+ jmp basic_mem_imm_32bit_ok
+ basic_mem_imm_nosize:
+ call recoverable_unknown_size
+ basic_mem_imm_8bit:
+ call get_byte_value
+ mov byte [value],al
+ mov al,[base_code]
+ shr al,3
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ mov [base_code],80h
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ basic_mem_imm_16bit:
+ call operand_16bit
+ call get_word_value
+ mov word [value],ax
+ mov al,[base_code]
+ shr al,3
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ cmp [value_type],0
+ jne basic_mem_imm_16bit_store
+ cmp [size_declared],0
+ jne basic_mem_imm_16bit_store
+ cmp word [value],80h
+ jb basic_mem_simm_8bit
+ cmp word [value],-80h
+ jae basic_mem_simm_8bit
+ basic_mem_imm_16bit_store:
+ mov [base_code],81h
+ call store_instruction_with_imm16
+ jmp instruction_assembled
+ basic_mem_simm_8bit:
+ mov [base_code],83h
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ basic_mem_imm_32bit:
+ call operand_32bit
+ call get_dword_value
+ basic_mem_imm_32bit_ok:
+ mov dword [value],eax
+ mov al,[base_code]
+ shr al,3
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ cmp [value_type],0
+ jne basic_mem_imm_32bit_store
+ cmp [size_declared],0
+ jne basic_mem_imm_32bit_store
+ cmp dword [value],80h
+ jb basic_mem_simm_8bit
+ cmp dword [value],-80h
+ jae basic_mem_simm_8bit
+ basic_mem_imm_32bit_store:
+ mov [base_code],81h
+ call store_instruction_with_imm32
+ jmp instruction_assembled
+ get_simm32:
+ call get_qword_value
+ mov ecx,edx
+ cdq
+ cmp ecx,edx
+ jne value_out_of_range
+ cmp [value_type],4
+ jne get_simm32_ok
+ mov [value_type],2
+ get_simm32_ok:
+ ret
+ basic_reg:
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je basic_reg_reg
+ cmp al,'('
+ je basic_reg_imm
+ cmp al,'['
+ jne invalid_operand
+ basic_reg_mem:
+ call get_address
+ mov al,[operand_size]
+ cmp al,1
+ je basic_reg_mem_8bit
+ call operand_autodetect
+ add [base_code],3
+ jmp instruction_ready
+ basic_reg_mem_8bit:
+ add [base_code],2
+ jmp instruction_ready
+ basic_reg_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,[postbyte_register]
+ mov [postbyte_register],al
+ mov al,ah
+ cmp al,1
+ je nomem_instruction_ready
+ call operand_autodetect
+ inc [base_code]
+ nomem_instruction_ready:
+ call store_nomem_instruction
+ jmp instruction_assembled
+ basic_reg_imm:
+ mov al,[operand_size]
+ cmp al,1
+ je basic_reg_imm_8bit
+ cmp al,2
+ je basic_reg_imm_16bit
+ cmp al,4
+ je basic_reg_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ basic_reg_imm_64bit:
+ cmp [size_declared],0
+ jne long_immediate_not_encodable
+ call operand_64bit
+ call get_simm32
+ cmp [value_type],4
+ jae long_immediate_not_encodable
+ jmp basic_reg_imm_32bit_ok
+ basic_reg_imm_8bit:
+ call get_byte_value
+ mov dl,al
+ mov bl,[base_code]
+ shr bl,3
+ xchg bl,[postbyte_register]
+ or bl,bl
+ jz basic_al_imm
+ mov [base_code],80h
+ call store_nomem_instruction
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ basic_al_imm:
+ mov al,[base_code]
+ add al,4
+ stos byte [edi]
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ basic_reg_imm_16bit:
+ call operand_16bit
+ call get_word_value
+ mov dx,ax
+ mov bl,[base_code]
+ shr bl,3
+ xchg bl,[postbyte_register]
+ cmp [value_type],0
+ jne basic_reg_imm_16bit_store
+ cmp [size_declared],0
+ jne basic_reg_imm_16bit_store
+ cmp dx,80h
+ jb basic_reg_simm_8bit
+ cmp dx,-80h
+ jae basic_reg_simm_8bit
+ basic_reg_imm_16bit_store:
+ or bl,bl
+ jz basic_ax_imm
+ mov [base_code],81h
+ call store_nomem_instruction
+ basic_store_imm_16bit:
+ mov ax,dx
+ call mark_relocation
+ stos word [edi]
+ jmp instruction_assembled
+ basic_reg_simm_8bit:
+ mov [base_code],83h
+ call store_nomem_instruction
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ basic_ax_imm:
+ add [base_code],5
+ call store_instruction_code
+ jmp basic_store_imm_16bit
+ basic_reg_imm_32bit:
+ call operand_32bit
+ call get_dword_value
+ basic_reg_imm_32bit_ok:
+ mov edx,eax
+ mov bl,[base_code]
+ shr bl,3
+ xchg bl,[postbyte_register]
+ cmp [value_type],0
+ jne basic_reg_imm_32bit_store
+ cmp [size_declared],0
+ jne basic_reg_imm_32bit_store
+ cmp edx,80h
+ jb basic_reg_simm_8bit
+ cmp edx,-80h
+ jae basic_reg_simm_8bit
+ basic_reg_imm_32bit_store:
+ or bl,bl
+ jz basic_eax_imm
+ mov [base_code],81h
+ call store_nomem_instruction
+ basic_store_imm_32bit:
+ mov eax,edx
+ call mark_relocation
+ stos dword [edi]
+ jmp instruction_assembled
+ basic_eax_imm:
+ add [base_code],5
+ call store_instruction_code
+ jmp basic_store_imm_32bit
+ recoverable_unknown_size:
+ cmp [error_line],0
+ jne ignore_unknown_size
+ push [current_line]
+ pop [error_line]
+ mov [error],operand_size_not_specified
+ ignore_unknown_size:
+ ret
+single_operand_instruction:
+ mov [base_code],0F6h
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je single_reg
+ cmp al,'['
+ jne invalid_operand
+ single_mem:
+ call get_address
+ mov al,[operand_size]
+ cmp al,1
+ je single_mem_8bit
+ jb single_mem_nosize
+ call operand_autodetect
+ inc [base_code]
+ jmp instruction_ready
+ single_mem_nosize:
+ call recoverable_unknown_size
+ single_mem_8bit:
+ jmp instruction_ready
+ single_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ cmp al,1
+ je single_reg_8bit
+ call operand_autodetect
+ inc [base_code]
+ single_reg_8bit:
+ jmp nomem_instruction_ready
+mov_instruction:
+ mov [base_code],88h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je mov_reg
+ cmp al,'['
+ jne invalid_operand
+ mov_mem:
+ call get_address
+ push edx ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je mov_mem_imm
+ cmp al,10h
+ jne invalid_operand
+ mov_mem_reg:
+ lods byte [esi]
+ cmp al,60h
+ jb mov_mem_general_reg
+ cmp al,70h
+ jb mov_mem_sreg
+ mov_mem_general_reg:
+ call convert_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ cmp ah,1
+ je mov_mem_reg_8bit
+ mov al,ah
+ call operand_autodetect
+ mov al,[postbyte_register]
+ or al,bl
+ or al,bh
+ jz mov_mem_ax
+ inc [base_code]
+ jmp instruction_ready
+ mov_mem_reg_8bit:
+ or al,bl
+ or al,bh
+ jnz instruction_ready
+ mov_mem_al:
+ test ch,22h
+ jnz mov_mem_address16_al
+ test ch,44h
+ jnz mov_mem_address32_al
+ test ch,88h
+ jnz mov_mem_address64_al
+ or ch,ch
+ jnz invalid_address_size
+ cmp [code_type],64
+ je mov_mem_address64_al
+ cmp [code_type],32
+ je mov_mem_address32_al
+ cmp edx,10000h
+ jb mov_mem_address16_al
+ mov_mem_address32_al:
+ call store_segment_prefix_if_necessary
+ call address_32bit_prefix
+ mov [base_code],0A2h
+ store_mov_address32:
+ call store_instruction_code
+ call store_address_32bit_value
+ jmp instruction_assembled
+ mov_mem_address16_al:
+ call store_segment_prefix_if_necessary
+ call address_16bit_prefix
+ mov [base_code],0A2h
+ store_mov_address16:
+ cmp [code_type],64
+ je invalid_address
+ call store_instruction_code
+ mov eax,edx
+ stos word [edi]
+ cmp edx,10000h
+ jge value_out_of_range
+ jmp instruction_assembled
+ mov_mem_address64_al:
+ call store_segment_prefix_if_necessary
+ mov [base_code],0A2h
+ store_mov_address64:
+ call store_instruction_code
+ call store_address_64bit_value
+ jmp instruction_assembled
+ mov_mem_ax:
+ test ch,22h
+ jnz mov_mem_address16_ax
+ test ch,44h
+ jnz mov_mem_address32_ax
+ test ch,88h
+ jnz mov_mem_address64_ax
+ or ch,ch
+ jnz invalid_address_size
+ cmp [code_type],64
+ je mov_mem_address64_ax
+ cmp [code_type],32
+ je mov_mem_address32_ax
+ cmp edx,10000h
+ jb mov_mem_address16_ax
+ mov_mem_address32_ax:
+ call store_segment_prefix_if_necessary
+ call address_32bit_prefix
+ mov [base_code],0A3h
+ jmp store_mov_address32
+ mov_mem_address16_ax:
+ call store_segment_prefix_if_necessary
+ call address_16bit_prefix
+ mov [base_code],0A3h
+ jmp store_mov_address16
+ mov_mem_address64_ax:
+ call store_segment_prefix_if_necessary
+ mov [base_code],0A3h
+ jmp store_mov_address64
+ mov_mem_sreg:
+ sub al,61h
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ mov ah,[operand_size]
+ or ah,ah
+ jz mov_mem_sreg_store
+ cmp ah,2
+ jne invalid_operand_size
+ mov_mem_sreg_store:
+ mov [base_code],8Ch
+ jmp instruction_ready
+ mov_mem_imm:
+ mov al,[operand_size]
+ cmp al,1
+ jb mov_mem_imm_nosize
+ je mov_mem_imm_8bit
+ cmp al,2
+ je mov_mem_imm_16bit
+ cmp al,4
+ je mov_mem_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ mov_mem_imm_64bit:
+ cmp [size_declared],0
+ jne long_immediate_not_encodable
+ call operand_64bit
+ call get_simm32
+ cmp [value_type],4
+ jae long_immediate_not_encodable
+ jmp mov_mem_imm_32bit_store
+ mov_mem_imm_8bit:
+ call get_byte_value
+ mov byte [value],al
+ mov [postbyte_register],0
+ mov [base_code],0C6h
+ pop ecx ebx edx
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ mov_mem_imm_16bit:
+ call operand_16bit
+ call get_word_value
+ mov word [value],ax
+ mov [postbyte_register],0
+ mov [base_code],0C7h
+ pop ecx ebx edx
+ call store_instruction_with_imm16
+ jmp instruction_assembled
+ mov_mem_imm_nosize:
+ call recoverable_unknown_size
+ mov_mem_imm_32bit:
+ call operand_32bit
+ call get_dword_value
+ mov_mem_imm_32bit_store:
+ mov dword [value],eax
+ mov [postbyte_register],0
+ mov [base_code],0C7h
+ pop ecx ebx edx
+ call store_instruction_with_imm32
+ jmp instruction_assembled
+ mov_reg:
+ lods byte [esi]
+ mov ah,al
+ sub ah,10h
+ and ah,al
+ test ah,0F0h
+ jnz mov_sreg
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ je mov_reg_mem
+ cmp al,'('
+ je mov_reg_imm
+ cmp al,10h
+ jne invalid_operand
+ mov_reg_reg:
+ lods byte [esi]
+ mov ah,al
+ sub ah,10h
+ and ah,al
+ test ah,0F0h
+ jnz mov_reg_sreg
+ call convert_register
+ mov bl,[postbyte_register]
+ mov [postbyte_register],al
+ mov al,ah
+ cmp al,1
+ je mov_reg_reg_8bit
+ call operand_autodetect
+ inc [base_code]
+ mov_reg_reg_8bit:
+ jmp nomem_instruction_ready
+ mov_reg_sreg:
+ mov bl,[postbyte_register]
+ mov ah,al
+ and al,1111b
+ mov [postbyte_register],al
+ shr ah,4
+ cmp ah,5
+ je mov_reg_creg
+ cmp ah,7
+ je mov_reg_dreg
+ ja mov_reg_treg
+ dec [postbyte_register]
+ cmp [operand_size],8
+ je mov_reg_sreg64
+ cmp [operand_size],4
+ je mov_reg_sreg32
+ cmp [operand_size],2
+ jne invalid_operand_size
+ call operand_16bit
+ jmp mov_reg_sreg_store
+ mov_reg_sreg64:
+ call operand_64bit
+ jmp mov_reg_sreg_store
+ mov_reg_sreg32:
+ call operand_32bit
+ mov_reg_sreg_store:
+ mov [base_code],8Ch
+ jmp nomem_instruction_ready
+ mov_reg_treg:
+ cmp ah,9
+ jne invalid_operand
+ mov [extended_code],24h
+ jmp mov_reg_xrx
+ mov_reg_dreg:
+ mov [extended_code],21h
+ jmp mov_reg_xrx
+ mov_reg_creg:
+ mov [extended_code],20h
+ mov_reg_xrx:
+ mov [base_code],0Fh
+ cmp [code_type],64
+ je mov_reg_xrx_64bit
+ cmp [operand_size],4
+ jne invalid_operand_size
+ cmp [postbyte_register],8
+ jne mov_reg_xrx_store
+ cmp [extended_code],20h
+ jne mov_reg_xrx_store
+ mov al,0F0h
+ stos byte [edi]
+ mov [postbyte_register],0
+ mov_reg_xrx_store:
+ jmp nomem_instruction_ready
+ mov_reg_xrx_64bit:
+ cmp [operand_size],8
+ jne invalid_operand_size
+ jmp nomem_instruction_ready
+ mov_reg_mem:
+ call get_address
+ mov al,[operand_size]
+ cmp al,1
+ je mov_reg_mem_8bit
+ call operand_autodetect
+ mov al,[postbyte_register]
+ or al,bl
+ or al,bh
+ jz mov_ax_mem
+ add [base_code],3
+ jmp instruction_ready
+ mov_reg_mem_8bit:
+ mov al,[postbyte_register]
+ or al,bl
+ or al,bh
+ jz mov_al_mem
+ add [base_code],2
+ jmp instruction_ready
+ mov_al_mem:
+ test ch,22h
+ jnz mov_al_mem_address16
+ test ch,44h
+ jnz mov_al_mem_address32
+ test ch,88h
+ jnz mov_al_mem_address64
+ or ch,ch
+ jnz invalid_address_size
+ cmp [code_type],64
+ je mov_al_mem_address64
+ cmp [code_type],32
+ je mov_al_mem_address32
+ cmp edx,10000h
+ jb mov_al_mem_address16
+ mov_al_mem_address32:
+ call store_segment_prefix_if_necessary
+ call address_32bit_prefix
+ mov [base_code],0A0h
+ jmp store_mov_address32
+ mov_al_mem_address16:
+ call store_segment_prefix_if_necessary
+ call address_16bit_prefix
+ mov [base_code],0A0h
+ jmp store_mov_address16
+ mov_al_mem_address64:
+ call store_segment_prefix_if_necessary
+ mov [base_code],0A0h
+ jmp store_mov_address64
+ mov_ax_mem:
+ test ch,22h
+ jnz mov_ax_mem_address16
+ test ch,44h
+ jnz mov_ax_mem_address32
+ test ch,88h
+ jnz mov_ax_mem_address64
+ or ch,ch
+ jnz invalid_address_size
+ cmp [code_type],64
+ je mov_ax_mem_address64
+ cmp [code_type],32
+ je mov_ax_mem_address32
+ cmp edx,10000h
+ jb mov_ax_mem_address16
+ mov_ax_mem_address32:
+ call store_segment_prefix_if_necessary
+ call address_32bit_prefix
+ mov [base_code],0A1h
+ jmp store_mov_address32
+ mov_ax_mem_address16:
+ call store_segment_prefix_if_necessary
+ call address_16bit_prefix
+ mov [base_code],0A1h
+ jmp store_mov_address16
+ mov_ax_mem_address64:
+ call store_segment_prefix_if_necessary
+ mov [base_code],0A1h
+ jmp store_mov_address64
+ mov_reg_imm:
+ mov al,[operand_size]
+ cmp al,1
+ je mov_reg_imm_8bit
+ cmp al,2
+ je mov_reg_imm_16bit
+ cmp al,4
+ je mov_reg_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ mov_reg_imm_64bit:
+ call operand_64bit
+ call get_qword_value
+ mov ecx,edx
+ cmp [size_declared],0
+ jne mov_reg_imm_64bit_store
+ cmp [value_type],4
+ jae mov_reg_imm_64bit_store
+ cdq
+ cmp ecx,edx
+ je mov_reg_64bit_imm_32bit
+ mov_reg_imm_64bit_store:
+ push eax ecx
+ mov al,0B8h
+ call store_mov_reg_imm_code
+ pop edx eax
+ call mark_relocation
+ stos dword [edi]
+ mov eax,edx
+ stos dword [edi]
+ jmp instruction_assembled
+ mov_reg_imm_8bit:
+ call get_byte_value
+ mov dl,al
+ mov al,0B0h
+ call store_mov_reg_imm_code
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ mov_reg_imm_16bit:
+ call get_word_value
+ mov dx,ax
+ call operand_16bit
+ mov al,0B8h
+ call store_mov_reg_imm_code
+ mov ax,dx
+ call mark_relocation
+ stos word [edi]
+ jmp instruction_assembled
+ mov_reg_imm_32bit:
+ call operand_32bit
+ call get_dword_value
+ mov edx,eax
+ mov al,0B8h
+ call store_mov_reg_imm_code
+ mov_store_imm_32bit:
+ mov eax,edx
+ call mark_relocation
+ stos dword [edi]
+ jmp instruction_assembled
+ store_mov_reg_imm_code:
+ mov ah,[postbyte_register]
+ test ah,1000b
+ jz mov_reg_imm_prefix_ok
+ or [rex_prefix],41h
+ mov_reg_imm_prefix_ok:
+ and ah,111b
+ add al,ah
+ mov [base_code],al
+ call store_instruction_code
+ ret
+ mov_reg_64bit_imm_32bit:
+ mov edx,eax
+ mov bl,[postbyte_register]
+ mov [postbyte_register],0
+ mov [base_code],0C7h
+ call store_nomem_instruction
+ jmp mov_store_imm_32bit
+ mov_sreg:
+ mov ah,al
+ and al,1111b
+ mov [postbyte_register],al
+ shr ah,4
+ cmp ah,5
+ je mov_creg
+ cmp ah,7
+ je mov_dreg
+ ja mov_treg
+ cmp al,2
+ je illegal_instruction
+ dec [postbyte_register]
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ je mov_sreg_mem
+ cmp al,10h
+ jne invalid_operand
+ mov_sreg_reg:
+ lods byte [esi]
+ call convert_register
+ or ah,ah
+ jz mov_sreg_reg_size_ok
+ cmp ah,2
+ jne invalid_operand_size
+ mov bl,al
+ mov_sreg_reg_size_ok:
+ mov [base_code],8Eh
+ jmp nomem_instruction_ready
+ mov_sreg_mem:
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz mov_sreg_mem_size_ok
+ cmp al,2
+ jne invalid_operand_size
+ mov_sreg_mem_size_ok:
+ mov [base_code],8Eh
+ jmp instruction_ready
+ mov_treg:
+ cmp ah,9
+ jne invalid_operand
+ mov [extended_code],26h
+ jmp mov_xrx
+ mov_dreg:
+ mov [extended_code],23h
+ jmp mov_xrx
+ mov_creg:
+ mov [extended_code],22h
+ mov_xrx:
+ mov [base_code],0Fh
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ cmp [code_type],64
+ je mov_xrx_64bit
+ cmp ah,4
+ jne invalid_operand_size
+ cmp [postbyte_register],8
+ jne mov_xrx_store
+ cmp [extended_code],22h
+ jne mov_xrx_store
+ mov al,0F0h
+ stos byte [edi]
+ mov [postbyte_register],0
+ mov_xrx_store:
+ jmp nomem_instruction_ready
+ mov_xrx_64bit:
+ cmp ah,8
+ je mov_xrx_store
+ jmp invalid_operand_size
+test_instruction:
+ mov [base_code],84h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je test_reg
+ cmp al,'['
+ jne invalid_operand
+ test_mem:
+ call get_address
+ push edx ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je test_mem_imm
+ cmp al,10h
+ jne invalid_operand
+ test_mem_reg:
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ mov al,ah
+ cmp al,1
+ je test_mem_reg_8bit
+ call operand_autodetect
+ inc [base_code]
+ test_mem_reg_8bit:
+ jmp instruction_ready
+ test_mem_imm:
+ mov al,[operand_size]
+ cmp al,1
+ jb test_mem_imm_nosize
+ je test_mem_imm_8bit
+ cmp al,2
+ je test_mem_imm_16bit
+ cmp al,4
+ je test_mem_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ test_mem_imm_64bit:
+ cmp [size_declared],0
+ jne long_immediate_not_encodable
+ call operand_64bit
+ call get_simm32
+ cmp [value_type],4
+ jae long_immediate_not_encodable
+ jmp test_mem_imm_32bit_store
+ test_mem_imm_8bit:
+ call get_byte_value
+ mov byte [value],al
+ mov [postbyte_register],0
+ mov [base_code],0F6h
+ pop ecx ebx edx
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ test_mem_imm_16bit:
+ call operand_16bit
+ call get_word_value
+ mov word [value],ax
+ mov [postbyte_register],0
+ mov [base_code],0F7h
+ pop ecx ebx edx
+ call store_instruction_with_imm16
+ jmp instruction_assembled
+ test_mem_imm_nosize:
+ call recoverable_unknown_size
+ test_mem_imm_32bit:
+ call operand_32bit
+ call get_dword_value
+ test_mem_imm_32bit_store:
+ mov dword [value],eax
+ mov [postbyte_register],0
+ mov [base_code],0F7h
+ pop ecx ebx edx
+ call store_instruction_with_imm32
+ jmp instruction_assembled
+ test_reg:
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ je test_reg_mem
+ cmp al,'('
+ je test_reg_imm
+ cmp al,10h
+ jne invalid_operand
+ test_reg_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,[postbyte_register]
+ mov [postbyte_register],al
+ mov al,ah
+ cmp al,1
+ je test_reg_reg_8bit
+ call operand_autodetect
+ inc [base_code]
+ test_reg_reg_8bit:
+ jmp nomem_instruction_ready
+ test_reg_imm:
+ mov al,[operand_size]
+ cmp al,1
+ je test_reg_imm_8bit
+ cmp al,2
+ je test_reg_imm_16bit
+ cmp al,4
+ je test_reg_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ test_reg_imm_64bit:
+ cmp [size_declared],0
+ jne long_immediate_not_encodable
+ call operand_64bit
+ call get_simm32
+ cmp [value_type],4
+ jae long_immediate_not_encodable
+ jmp test_reg_imm_32bit_store
+ test_reg_imm_8bit:
+ call get_byte_value
+ mov dl,al
+ mov bl,[postbyte_register]
+ mov [postbyte_register],0
+ mov [base_code],0F6h
+ or bl,bl
+ jz test_al_imm
+ call store_nomem_instruction
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ test_al_imm:
+ mov [base_code],0A8h
+ call store_instruction_code
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ test_reg_imm_16bit:
+ call operand_16bit
+ call get_word_value
+ mov dx,ax
+ mov bl,[postbyte_register]
+ mov [postbyte_register],0
+ mov [base_code],0F7h
+ or bl,bl
+ jz test_ax_imm
+ call store_nomem_instruction
+ mov ax,dx
+ call mark_relocation
+ stos word [edi]
+ jmp instruction_assembled
+ test_ax_imm:
+ mov [base_code],0A9h
+ call store_instruction_code
+ mov ax,dx
+ stos word [edi]
+ jmp instruction_assembled
+ test_reg_imm_32bit:
+ call operand_32bit
+ call get_dword_value
+ test_reg_imm_32bit_store:
+ mov edx,eax
+ mov bl,[postbyte_register]
+ mov [postbyte_register],0
+ mov [base_code],0F7h
+ or bl,bl
+ jz test_eax_imm
+ call store_nomem_instruction
+ mov eax,edx
+ call mark_relocation
+ stos dword [edi]
+ jmp instruction_assembled
+ test_eax_imm:
+ mov [base_code],0A9h
+ call store_instruction_code
+ mov eax,edx
+ stos dword [edi]
+ jmp instruction_assembled
+ test_reg_mem:
+ call get_address
+ mov al,[operand_size]
+ cmp al,1
+ je test_reg_mem_8bit
+ call operand_autodetect
+ inc [base_code]
+ test_reg_mem_8bit:
+ jmp instruction_ready
+xchg_instruction:
+ mov [base_code],86h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je xchg_reg
+ cmp al,'['
+ jne invalid_operand
+ xchg_mem:
+ call get_address
+ push edx ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je test_mem_reg
+ jmp invalid_operand
+ xchg_reg:
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ je test_reg_mem
+ cmp al,10h
+ jne invalid_operand
+ xchg_reg_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ cmp al,1
+ je xchg_reg_reg_8bit
+ call operand_autodetect
+ cmp [postbyte_register],0
+ je xchg_ax_reg
+ or bl,bl
+ jnz xchg_reg_reg_store
+ mov bl,[postbyte_register]
+ xchg_ax_reg:
+ cmp [code_type],64
+ jne xchg_ax_reg_ok
+ cmp ah,4
+ jne xchg_ax_reg_ok
+ or bl,bl
+ jz xchg_reg_reg_store
+ xchg_ax_reg_ok:
+ test bl,1000b
+ jz xchg_ax_reg_store
+ or [rex_prefix],41h
+ and bl,111b
+ xchg_ax_reg_store:
+ add bl,90h
+ mov [base_code],bl
+ call store_instruction_code
+ jmp instruction_assembled
+ xchg_reg_reg_store:
+ inc [base_code]
+ xchg_reg_reg_8bit:
+ jmp nomem_instruction_ready
+push_instruction:
+ mov [push_size],al
+ push_next:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je push_reg
+ cmp al,'('
+ je push_imm
+ cmp al,'['
+ jne invalid_operand
+ push_mem:
+ call get_address
+ mov al,[operand_size]
+ mov ah,[push_size]
+ cmp al,2
+ je push_mem_16bit
+ cmp al,4
+ je push_mem_32bit
+ cmp al,8
+ je push_mem_64bit
+ or al,al
+ jnz invalid_operand_size
+ cmp ah,2
+ je push_mem_16bit
+ cmp ah,4
+ je push_mem_32bit
+ cmp ah,8
+ je push_mem_64bit
+ call recoverable_unknown_size
+ jmp push_mem_store
+ push_mem_16bit:
+ test ah,not 2
+ jnz invalid_operand_size
+ call operand_16bit
+ jmp push_mem_store
+ push_mem_32bit:
+ test ah,not 4
+ jnz invalid_operand_size
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp push_mem_store
+ push_mem_64bit:
+ test ah,not 8
+ jnz invalid_operand_size
+ cmp [code_type],64
+ jne illegal_instruction
+ push_mem_store:
+ mov [base_code],0FFh
+ mov [postbyte_register],110b
+ call store_instruction
+ jmp push_done
+ push_reg:
+ lods byte [esi]
+ mov ah,al
+ sub ah,10h
+ and ah,al
+ test ah,0F0h
+ jnz push_sreg
+ call convert_register
+ test al,1000b
+ jz push_reg_ok
+ or [rex_prefix],41h
+ and al,111b
+ push_reg_ok:
+ add al,50h
+ mov [base_code],al
+ mov al,ah
+ mov ah,[push_size]
+ cmp al,2
+ je push_reg_16bit
+ cmp al,4
+ je push_reg_32bit
+ cmp al,8
+ jne invalid_operand_size
+ push_reg_64bit:
+ test ah,not 8
+ jnz invalid_operand_size
+ cmp [code_type],64
+ jne illegal_instruction
+ jmp push_reg_store
+ push_reg_32bit:
+ test ah,not 4
+ jnz invalid_operand_size
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp push_reg_store
+ push_reg_16bit:
+ test ah,not 2
+ jnz invalid_operand_size
+ call operand_16bit
+ push_reg_store:
+ call store_instruction_code
+ jmp push_done
+ push_sreg:
+ mov bl,al
+ mov dl,[operand_size]
+ mov dh,[push_size]
+ cmp dl,2
+ je push_sreg16
+ cmp dl,4
+ je push_sreg32
+ cmp dl,8
+ je push_sreg64
+ or dl,dl
+ jnz invalid_operand_size
+ cmp dh,2
+ je push_sreg16
+ cmp dh,4
+ je push_sreg32
+ cmp dh,8
+ je push_sreg64
+ jmp push_sreg_store
+ push_sreg16:
+ test dh,not 2
+ jnz invalid_operand_size
+ call operand_16bit
+ jmp push_sreg_store
+ push_sreg32:
+ test dh,not 4
+ jnz invalid_operand_size
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp push_sreg_store
+ push_sreg64:
+ test dh,not 8
+ jnz invalid_operand_size
+ cmp [code_type],64
+ jne illegal_instruction
+ push_sreg_store:
+ mov al,bl
+ cmp al,70h
+ jae invalid_operand
+ sub al,61h
+ jc invalid_operand
+ cmp al,4
+ jae push_sreg_386
+ shl al,3
+ add al,6
+ mov [base_code],al
+ cmp [code_type],64
+ je illegal_instruction
+ jmp push_reg_store
+ push_sreg_386:
+ sub al,4
+ shl al,3
+ add al,0A0h
+ mov [extended_code],al
+ mov [base_code],0Fh
+ jmp push_reg_store
+ push_imm:
+ mov al,[operand_size]
+ mov ah,[push_size]
+ or al,al
+ je push_imm_size_ok
+ or ah,ah
+ je push_imm_size_ok
+ cmp al,ah
+ jne invalid_operand_size
+ push_imm_size_ok:
+ cmp al,2
+ je push_imm_16bit
+ cmp al,4
+ je push_imm_32bit
+ cmp al,8
+ je push_imm_64bit
+ cmp ah,2
+ je push_imm_optimized_16bit
+ cmp ah,4
+ je push_imm_optimized_32bit
+ cmp ah,8
+ je push_imm_optimized_64bit
+ or al,al
+ jnz invalid_operand_size
+ cmp [code_type],16
+ je push_imm_optimized_16bit
+ cmp [code_type],32
+ je push_imm_optimized_32bit
+ push_imm_optimized_64bit:
+ cmp [code_type],64
+ jne illegal_instruction
+ call get_simm32
+ mov edx,eax
+ cmp [value_type],0
+ jne push_imm_32bit_store
+ cmp eax,-80h
+ jl push_imm_32bit_store
+ cmp eax,80h
+ jge push_imm_32bit_store
+ jmp push_imm_8bit
+ push_imm_optimized_32bit:
+ cmp [code_type],64
+ je illegal_instruction
+ call get_dword_value
+ mov edx,eax
+ call operand_32bit
+ cmp [value_type],0
+ jne push_imm_32bit_store
+ cmp eax,-80h
+ jl push_imm_32bit_store
+ cmp eax,80h
+ jge push_imm_32bit_store
+ jmp push_imm_8bit
+ push_imm_optimized_16bit:
+ call get_word_value
+ mov dx,ax
+ call operand_16bit
+ cmp [value_type],0
+ jne push_imm_16bit_store
+ cmp ax,-80h
+ jl push_imm_16bit_store
+ cmp ax,80h
+ jge push_imm_16bit_store
+ push_imm_8bit:
+ mov ah,al
+ mov [base_code],6Ah
+ call store_instruction_code
+ mov al,ah
+ stos byte [edi]
+ jmp push_done
+ push_imm_16bit:
+ call get_word_value
+ mov dx,ax
+ call operand_16bit
+ push_imm_16bit_store:
+ mov [base_code],68h
+ call store_instruction_code
+ mov ax,dx
+ call mark_relocation
+ stos word [edi]
+ jmp push_done
+ push_imm_64bit:
+ cmp [code_type],64
+ jne illegal_instruction
+ call get_simm32
+ mov edx,eax
+ jmp push_imm_32bit_store
+ push_imm_32bit:
+ cmp [code_type],64
+ je illegal_instruction
+ call get_dword_value
+ mov edx,eax
+ call operand_32bit
+ push_imm_32bit_store:
+ mov [base_code],68h
+ call store_instruction_code
+ mov eax,edx
+ call mark_relocation
+ stos dword [edi]
+ push_done:
+ lods byte [esi]
+ dec esi
+ cmp al,0Fh
+ je instruction_assembled
+ or al,al
+ jz instruction_assembled
+ mov [operand_size],0
+ mov [size_override],0
+ mov [operand_prefix],0
+ mov [rex_prefix],0
+ jmp push_next
+pop_instruction:
+ mov [push_size],al
+ pop_next:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je pop_reg
+ cmp al,'['
+ jne invalid_operand
+ pop_mem:
+ call get_address
+ mov al,[operand_size]
+ mov ah,[push_size]
+ cmp al,2
+ je pop_mem_16bit
+ cmp al,4
+ je pop_mem_32bit
+ cmp al,8
+ je pop_mem_64bit
+ or al,al
+ jnz invalid_operand_size
+ cmp ah,2
+ je pop_mem_16bit
+ cmp ah,4
+ je pop_mem_32bit
+ cmp ah,8
+ je pop_mem_64bit
+ call recoverable_unknown_size
+ jmp pop_mem_store
+ pop_mem_16bit:
+ test ah,not 2
+ jnz invalid_operand_size
+ call operand_16bit
+ jmp pop_mem_store
+ pop_mem_32bit:
+ test ah,not 4
+ jnz invalid_operand_size
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp pop_mem_store
+ pop_mem_64bit:
+ test ah,not 8
+ jnz invalid_operand_size
+ cmp [code_type],64
+ jne illegal_instruction
+ pop_mem_store:
+ mov [base_code],08Fh
+ mov [postbyte_register],0
+ call store_instruction
+ jmp pop_done
+ pop_reg:
+ lods byte [esi]
+ mov ah,al
+ sub ah,10h
+ and ah,al
+ test ah,0F0h
+ jnz pop_sreg
+ call convert_register
+ test al,1000b
+ jz pop_reg_ok
+ or [rex_prefix],41h
+ and al,111b
+ pop_reg_ok:
+ add al,58h
+ mov [base_code],al
+ mov al,ah
+ mov ah,[push_size]
+ cmp al,2
+ je pop_reg_16bit
+ cmp al,4
+ je pop_reg_32bit
+ cmp al,8
+ je pop_reg_64bit
+ jmp invalid_operand_size
+ pop_reg_64bit:
+ test ah,not 8
+ jnz invalid_operand_size
+ cmp [code_type],64
+ jne illegal_instruction
+ jmp pop_reg_store
+ pop_reg_32bit:
+ test ah,not 4
+ jnz invalid_operand_size
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp pop_reg_store
+ pop_reg_16bit:
+ test ah,not 2
+ jnz invalid_operand_size
+ call operand_16bit
+ pop_reg_store:
+ call store_instruction_code
+ pop_done:
+ lods byte [esi]
+ dec esi
+ cmp al,0Fh
+ je instruction_assembled
+ or al,al
+ jz instruction_assembled
+ mov [operand_size],0
+ mov [size_override],0
+ mov [operand_prefix],0
+ mov [rex_prefix],0
+ jmp pop_next
+ pop_sreg:
+ mov dl,[operand_size]
+ mov dh,[push_size]
+ cmp al,62h
+ je pop_cs
+ mov bl,al
+ cmp dl,2
+ je pop_sreg16
+ cmp dl,4
+ je pop_sreg32
+ cmp dl,8
+ je pop_sreg64
+ or dl,dl
+ jnz invalid_operand_size
+ cmp dh,2
+ je pop_sreg16
+ cmp dh,4
+ je pop_sreg32
+ cmp dh,8
+ je pop_sreg64
+ jmp pop_sreg_store
+ pop_sreg16:
+ test dh,not 2
+ jnz invalid_operand_size
+ call operand_16bit
+ jmp pop_sreg_store
+ pop_sreg32:
+ test dh,not 4
+ jnz invalid_operand_size
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp pop_sreg_store
+ pop_sreg64:
+ test dh,not 8
+ jnz invalid_operand_size
+ cmp [code_type],64
+ jne illegal_instruction
+ pop_sreg_store:
+ mov al,bl
+ cmp al,70h
+ jae invalid_operand
+ sub al,61h
+ jc invalid_operand
+ cmp al,4
+ jae pop_sreg_386
+ shl al,3
+ add al,7
+ mov [base_code],al
+ cmp [code_type],64
+ je illegal_instruction
+ jmp pop_reg_store
+ pop_cs:
+ cmp [code_type],16
+ jne illegal_instruction
+ cmp dl,2
+ je pop_cs_store
+ or dl,dl
+ jnz invalid_operand_size
+ cmp dh,2
+ je pop_cs_store
+ or dh,dh
+ jnz illegal_instruction
+ pop_cs_store:
+ test dh,not 2
+ jnz invalid_operand_size
+ mov al,0Fh
+ stos byte [edi]
+ jmp pop_done
+ pop_sreg_386:
+ sub al,4
+ shl al,3
+ add al,0A1h
+ mov [extended_code],al
+ mov [base_code],0Fh
+ jmp pop_reg_store
+inc_instruction:
+ mov [base_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je inc_reg
+ cmp al,'['
+ je inc_mem
+ jne invalid_operand
+ inc_mem:
+ call get_address
+ mov al,[operand_size]
+ cmp al,1
+ je inc_mem_8bit
+ jb inc_mem_nosize
+ call operand_autodetect
+ mov al,0FFh
+ xchg al,[base_code]
+ mov [postbyte_register],al
+ jmp instruction_ready
+ inc_mem_nosize:
+ call recoverable_unknown_size
+ inc_mem_8bit:
+ mov al,0FEh
+ xchg al,[base_code]
+ mov [postbyte_register],al
+ jmp instruction_ready
+ inc_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,0FEh
+ xchg al,[base_code]
+ mov [postbyte_register],al
+ mov al,ah
+ cmp al,1
+ je inc_reg_8bit
+ call operand_autodetect
+ cmp [code_type],64
+ je inc_reg_long_form
+ mov al,[postbyte_register]
+ shl al,3
+ add al,bl
+ add al,40h
+ mov [base_code],al
+ call store_instruction_code
+ jmp instruction_assembled
+ inc_reg_long_form:
+ inc [base_code]
+ inc_reg_8bit:
+ jmp nomem_instruction_ready
+set_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je set_reg
+ cmp al,'['
+ jne invalid_operand
+ set_mem:
+ call get_address
+ cmp [operand_size],1
+ ja invalid_operand_size
+ mov [postbyte_register],0
+ jmp instruction_ready
+ set_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ah,1
+ jne invalid_operand_size
+ mov bl,al
+ mov [postbyte_register],0
+ jmp nomem_instruction_ready
+arpl_instruction:
+ cmp [code_type],64
+ je illegal_instruction
+ mov [base_code],63h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je arpl_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ cmp ah,2
+ jne invalid_operand_size
+ jmp instruction_ready
+ arpl_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ah,2
+ jne invalid_operand_size
+ mov bl,al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ jmp nomem_instruction_ready
+bound_instruction:
+ cmp [code_type],64
+ je illegal_instruction
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,2
+ je bound_store
+ cmp al,4
+ jne invalid_operand_size
+ bound_store:
+ call operand_autodetect
+ mov [base_code],62h
+ jmp instruction_ready
+enter_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp ah,2
+ je enter_imm16_size_ok
+ or ah,ah
+ jnz invalid_operand_size
+ enter_imm16_size_ok:
+ cmp al,'('
+ jne invalid_operand
+ call get_word_value
+ cmp [next_pass_needed],0
+ jne enter_imm16_ok
+ cmp [value_type],0
+ jne invalid_use_of_symbol
+ test eax,eax
+ js value_out_of_range
+ enter_imm16_ok:
+ push eax
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp ah,1
+ je enter_imm8_size_ok
+ or ah,ah
+ jnz invalid_operand_size
+ enter_imm8_size_ok:
+ cmp al,'('
+ jne invalid_operand
+ call get_byte_value
+ cmp [next_pass_needed],0
+ jne enter_imm8_ok
+ test eax,eax
+ js value_out_of_range
+ enter_imm8_ok:
+ mov dl,al
+ pop ebx
+ mov al,0C8h
+ stos byte [edi]
+ mov ax,bx
+ stos word [edi]
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ret_instruction_only64:
+ cmp [code_type],64
+ jne illegal_instruction
+ jmp ret_instruction
+ret_instruction_32bit_except64:
+ cmp [code_type],64
+ je illegal_instruction
+ret_instruction_32bit:
+ call operand_32bit
+ jmp ret_instruction
+ret_instruction_16bit:
+ call operand_16bit
+ jmp ret_instruction
+retf_instruction:
+ cmp [code_type],64
+ jne ret_instruction
+ret_instruction_64bit:
+ call operand_64bit
+ret_instruction:
+ mov [base_code],al
+ lods byte [esi]
+ dec esi
+ or al,al
+ jz simple_ret
+ cmp al,0Fh
+ je simple_ret
+ lods byte [esi]
+ call get_size_operator
+ or ah,ah
+ jz ret_imm
+ cmp ah,2
+ je ret_imm
+ jmp invalid_operand_size
+ ret_imm:
+ cmp al,'('
+ jne invalid_operand
+ call get_word_value
+ cmp [next_pass_needed],0
+ jne ret_imm_ok
+ cmp [value_type],0
+ jne invalid_use_of_symbol
+ test eax,eax
+ js value_out_of_range
+ ret_imm_ok:
+ cmp [size_declared],0
+ jne ret_imm_store
+ or ax,ax
+ jz simple_ret
+ ret_imm_store:
+ mov dx,ax
+ call store_instruction_code
+ mov ax,dx
+ stos word [edi]
+ jmp instruction_assembled
+ simple_ret:
+ inc [base_code]
+ call store_instruction_code
+ jmp instruction_assembled
+lea_instruction:
+ mov [base_code],8Dh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ xor al,al
+ xchg al,[operand_size]
+ push eax
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ mov [size_override],-1
+ call get_address
+ pop eax
+ mov [operand_size],al
+ call operand_autodetect
+ jmp instruction_ready
+ls_instruction:
+ or al,al
+ jz les_instruction
+ cmp al,3
+ jz lds_instruction
+ add al,0B0h
+ mov [extended_code],al
+ mov [base_code],0Fh
+ jmp ls_code_ok
+ les_instruction:
+ mov [base_code],0C4h
+ jmp ls_short_code
+ lds_instruction:
+ mov [base_code],0C5h
+ ls_short_code:
+ cmp [code_type],64
+ je illegal_instruction
+ ls_code_ok:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ add [operand_size],2
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,4
+ je ls_16bit
+ cmp al,6
+ je ls_32bit
+ cmp al,10
+ je ls_64bit
+ jmp invalid_operand_size
+ ls_16bit:
+ call operand_16bit
+ jmp instruction_ready
+ ls_32bit:
+ call operand_32bit
+ jmp instruction_ready
+ ls_64bit:
+ call operand_64bit
+ jmp instruction_ready
+sh_instruction:
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je sh_reg
+ cmp al,'['
+ jne invalid_operand
+ sh_mem:
+ call get_address
+ push edx ebx ecx
+ mov al,[operand_size]
+ push eax
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je sh_mem_imm
+ cmp al,10h
+ jne invalid_operand
+ sh_mem_reg:
+ lods byte [esi]
+ cmp al,11h
+ jne invalid_operand
+ pop eax ecx ebx edx
+ cmp al,1
+ je sh_mem_cl_8bit
+ jb sh_mem_cl_nosize
+ call operand_autodetect
+ mov [base_code],0D3h
+ jmp instruction_ready
+ sh_mem_cl_nosize:
+ call recoverable_unknown_size
+ sh_mem_cl_8bit:
+ mov [base_code],0D2h
+ jmp instruction_ready
+ sh_mem_imm:
+ mov al,[operand_size]
+ or al,al
+ jz sh_mem_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ sh_mem_imm_size_ok:
+ call get_byte_value
+ mov byte [value],al
+ pop eax ecx ebx edx
+ cmp al,1
+ je sh_mem_imm_8bit
+ jb sh_mem_imm_nosize
+ call operand_autodetect
+ cmp byte [value],1
+ je sh_mem_1
+ mov [base_code],0C1h
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ sh_mem_1:
+ mov [base_code],0D1h
+ jmp instruction_ready
+ sh_mem_imm_nosize:
+ call recoverable_unknown_size
+ sh_mem_imm_8bit:
+ cmp byte [value],1
+ je sh_mem_1_8bit
+ mov [base_code],0C0h
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ sh_mem_1_8bit:
+ mov [base_code],0D0h
+ jmp instruction_ready
+ sh_reg:
+ lods byte [esi]
+ call convert_register
+ mov bx,ax
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je sh_reg_imm
+ cmp al,10h
+ jne invalid_operand
+ sh_reg_reg:
+ lods byte [esi]
+ cmp al,11h
+ jne invalid_operand
+ mov al,bh
+ cmp al,1
+ je sh_reg_cl_8bit
+ call operand_autodetect
+ mov [base_code],0D3h
+ jmp nomem_instruction_ready
+ sh_reg_cl_8bit:
+ mov [base_code],0D2h
+ jmp nomem_instruction_ready
+ sh_reg_imm:
+ mov al,[operand_size]
+ or al,al
+ jz sh_reg_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ sh_reg_imm_size_ok:
+ push ebx
+ call get_byte_value
+ mov dl,al
+ pop ebx
+ mov al,bh
+ cmp al,1
+ je sh_reg_imm_8bit
+ call operand_autodetect
+ cmp dl,1
+ je sh_reg_1
+ mov [base_code],0C1h
+ call store_nomem_instruction
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ sh_reg_1:
+ mov [base_code],0D1h
+ jmp nomem_instruction_ready
+ sh_reg_imm_8bit:
+ cmp dl,1
+ je sh_reg_1_8bit
+ mov [base_code],0C0h
+ call store_nomem_instruction
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ sh_reg_1_8bit:
+ mov [base_code],0D0h
+ jmp nomem_instruction_ready
+shd_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je shd_reg
+ cmp al,'['
+ jne invalid_operand
+ shd_mem:
+ call get_address
+ push edx ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov al,ah
+ mov [operand_size],0
+ push eax
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je shd_mem_reg_imm
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,11h
+ jne invalid_operand
+ pop eax ecx ebx edx
+ call operand_autodetect
+ inc [extended_code]
+ jmp instruction_ready
+ shd_mem_reg_imm:
+ mov al,[operand_size]
+ or al,al
+ jz shd_mem_reg_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ shd_mem_reg_imm_size_ok:
+ call get_byte_value
+ mov byte [value],al
+ pop eax ecx ebx edx
+ call operand_autodetect
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ shd_reg:
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov bl,[postbyte_register]
+ mov [postbyte_register],al
+ mov al,ah
+ push eax ebx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je shd_reg_reg_imm
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,11h
+ jne invalid_operand
+ pop ebx eax
+ call operand_autodetect
+ inc [extended_code]
+ jmp nomem_instruction_ready
+ shd_reg_reg_imm:
+ mov al,[operand_size]
+ or al,al
+ jz shd_reg_reg_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ shd_reg_reg_imm_size_ok:
+ call get_byte_value
+ mov dl,al
+ pop ebx eax
+ call operand_autodetect
+ call store_nomem_instruction
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+movx_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ mov al,ah
+ push eax
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movx_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ pop eax
+ mov ah,[operand_size]
+ or ah,ah
+ jz movx_unknown_size
+ cmp ah,al
+ jae invalid_operand_size
+ cmp ah,1
+ je movx_mem_store
+ cmp ah,2
+ jne invalid_operand_size
+ inc [extended_code]
+ movx_mem_store:
+ call operand_autodetect
+ jmp instruction_ready
+ movx_unknown_size:
+ call recoverable_unknown_size
+ jmp movx_mem_store
+ movx_reg:
+ lods byte [esi]
+ call convert_register
+ pop ebx
+ xchg bl,al
+ cmp ah,al
+ jae invalid_operand_size
+ cmp ah,1
+ je movx_reg_8bit
+ cmp ah,2
+ je movx_reg_16bit
+ jmp invalid_operand_size
+ movx_reg_8bit:
+ call operand_autodetect
+ jmp nomem_instruction_ready
+ movx_reg_16bit:
+ call operand_autodetect
+ inc [extended_code]
+ jmp nomem_instruction_ready
+movsxd_instruction:
+ mov [base_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ cmp ah,8
+ jne invalid_operand_size
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movsxd_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],4
+ je movsxd_mem_store
+ cmp [operand_size],0
+ jne invalid_operand_size
+ movsxd_mem_store:
+ call operand_64bit
+ jmp instruction_ready
+ movsxd_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ah,4
+ jne invalid_operand_size
+ mov bl,al
+ call operand_64bit
+ jmp nomem_instruction_ready
+bt_instruction:
+ mov [postbyte_register],al
+ shl al,3
+ add al,83h
+ mov [extended_code],al
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je bt_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ push eax ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ cmp byte [esi],'('
+ je bt_mem_imm
+ cmp byte [esi],11h
+ jne bt_mem_reg
+ cmp byte [esi+2],'('
+ je bt_mem_imm
+ bt_mem_reg:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ mov al,ah
+ call operand_autodetect
+ jmp instruction_ready
+ bt_mem_imm:
+ xor al,al
+ xchg al,[operand_size]
+ push eax
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ jne invalid_operand
+ mov al,[operand_size]
+ or al,al
+ jz bt_mem_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ bt_mem_imm_size_ok:
+ call get_byte_value
+ mov byte [value],al
+ pop eax
+ or al,al
+ jz bt_mem_imm_nosize
+ call operand_autodetect
+ bt_mem_imm_store:
+ pop ecx ebx edx
+ mov [extended_code],0BAh
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ bt_mem_imm_nosize:
+ call recoverable_unknown_size
+ jmp bt_mem_imm_store
+ bt_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ cmp byte [esi],'('
+ je bt_reg_imm
+ cmp byte [esi],11h
+ jne bt_reg_reg
+ cmp byte [esi+2],'('
+ je bt_reg_imm
+ bt_reg_reg:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ mov al,ah
+ call operand_autodetect
+ jmp nomem_instruction_ready
+ bt_reg_imm:
+ xor al,al
+ xchg al,[operand_size]
+ push eax ebx
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ jne invalid_operand
+ mov al,[operand_size]
+ or al,al
+ jz bt_reg_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ bt_reg_imm_size_ok:
+ call get_byte_value
+ mov byte [value],al
+ pop ebx eax
+ call operand_autodetect
+ bt_reg_imm_store:
+ mov [extended_code],0BAh
+ call store_nomem_instruction
+ mov al,byte [value]
+ stos byte [edi]
+ jmp instruction_assembled
+bs_instruction:
+ mov [extended_code],al
+ mov [base_code],0Fh
+ call get_reg_mem
+ jc bs_reg_reg
+ mov al,[operand_size]
+ call operand_autodetect
+ jmp instruction_ready
+ bs_reg_reg:
+ mov al,ah
+ call operand_autodetect
+ jmp nomem_instruction_ready
+ get_reg_mem:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je get_reg_reg
+ cmp al,'['
+ jne invalid_argument
+ call get_address
+ clc
+ ret
+ get_reg_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ stc
+ ret
+
+imul_instruction:
+ mov [base_code],0F6h
+ mov [postbyte_register],5
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je imul_reg
+ cmp al,'['
+ jne invalid_operand
+ imul_mem:
+ call get_address
+ mov al,[operand_size]
+ cmp al,1
+ je imul_mem_8bit
+ jb imul_mem_nosize
+ call operand_autodetect
+ inc [base_code]
+ jmp instruction_ready
+ imul_mem_nosize:
+ call recoverable_unknown_size
+ imul_mem_8bit:
+ jmp instruction_ready
+ imul_reg:
+ lods byte [esi]
+ call convert_register
+ cmp byte [esi],','
+ je imul_reg_
+ mov bl,al
+ mov al,ah
+ cmp al,1
+ je imul_reg_8bit
+ call operand_autodetect
+ inc [base_code]
+ imul_reg_8bit:
+ jmp nomem_instruction_ready
+ imul_reg_:
+ mov [postbyte_register],al
+ inc esi
+ cmp byte [esi],'('
+ je imul_reg_imm
+ cmp byte [esi],11h
+ jne imul_reg_noimm
+ cmp byte [esi+2],'('
+ je imul_reg_imm
+ imul_reg_noimm:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je imul_reg_reg
+ cmp al,'['
+ jne invalid_operand
+ imul_reg_mem:
+ call get_address
+ push edx ebx ecx
+ cmp byte [esi],','
+ je imul_reg_mem_imm
+ mov al,[operand_size]
+ call operand_autodetect
+ pop ecx ebx edx
+ mov [base_code],0Fh
+ mov [extended_code],0AFh
+ jmp instruction_ready
+ imul_reg_mem_imm:
+ inc esi
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ jne invalid_operand
+ mov al,[operand_size]
+ cmp al,2
+ je imul_reg_mem_imm_16bit
+ cmp al,4
+ je imul_reg_mem_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ imul_reg_mem_imm_64bit:
+ cmp [size_declared],0
+ jne long_immediate_not_encodable
+ call operand_64bit
+ call get_simm32
+ cmp [value_type],4
+ jae long_immediate_not_encodable
+ jmp imul_reg_mem_imm_32bit_ok
+ imul_reg_mem_imm_16bit:
+ call operand_16bit
+ call get_word_value
+ mov word [value],ax
+ cmp [value_type],0
+ jne imul_reg_mem_imm_16bit_store
+ cmp [size_declared],0
+ jne imul_reg_mem_imm_16bit_store
+ cmp ax,-80h
+ jl imul_reg_mem_imm_16bit_store
+ cmp ax,80h
+ jl imul_reg_mem_imm_8bit_store
+ imul_reg_mem_imm_16bit_store:
+ pop ecx ebx edx
+ mov [base_code],69h
+ call store_instruction_with_imm16
+ jmp instruction_assembled
+ imul_reg_mem_imm_32bit:
+ call operand_32bit
+ call get_dword_value
+ imul_reg_mem_imm_32bit_ok:
+ mov dword [value],eax
+ cmp [value_type],0
+ jne imul_reg_mem_imm_32bit_store
+ cmp [size_declared],0
+ jne imul_reg_mem_imm_32bit_store
+ cmp eax,-80h
+ jl imul_reg_mem_imm_32bit_store
+ cmp eax,80h
+ jl imul_reg_mem_imm_8bit_store
+ imul_reg_mem_imm_32bit_store:
+ pop ecx ebx edx
+ mov [base_code],69h
+ call store_instruction_with_imm32
+ jmp instruction_assembled
+ imul_reg_mem_imm_8bit_store:
+ pop ecx ebx edx
+ mov [base_code],6Bh
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ imul_reg_imm:
+ mov bl,[postbyte_register]
+ dec esi
+ jmp imul_reg_reg_imm
+ imul_reg_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ cmp byte [esi],','
+ je imul_reg_reg_imm
+ mov al,ah
+ call operand_autodetect
+ mov [base_code],0Fh
+ mov [extended_code],0AFh
+ jmp nomem_instruction_ready
+ imul_reg_reg_imm:
+ inc esi
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ jne invalid_operand
+ mov al,[operand_size]
+ cmp al,2
+ je imul_reg_reg_imm_16bit
+ cmp al,4
+ je imul_reg_reg_imm_32bit
+ cmp al,8
+ jne invalid_operand_size
+ imul_reg_reg_imm_64bit:
+ cmp [size_declared],0
+ jne long_immediate_not_encodable
+ call operand_64bit
+ push ebx
+ call get_simm32
+ cmp [value_type],4
+ jae long_immediate_not_encodable
+ jmp imul_reg_reg_imm_32bit_ok
+ imul_reg_reg_imm_16bit:
+ call operand_16bit
+ push ebx
+ call get_word_value
+ pop ebx
+ mov dx,ax
+ cmp [value_type],0
+ jne imul_reg_reg_imm_16bit_store
+ cmp [size_declared],0
+ jne imul_reg_reg_imm_16bit_store
+ cmp ax,-80h
+ jl imul_reg_reg_imm_16bit_store
+ cmp ax,80h
+ jl imul_reg_reg_imm_8bit_store
+ imul_reg_reg_imm_16bit_store:
+ mov [base_code],69h
+ call store_nomem_instruction
+ mov ax,dx
+ call mark_relocation
+ stos word [edi]
+ jmp instruction_assembled
+ imul_reg_reg_imm_32bit:
+ call operand_32bit
+ push ebx
+ call get_dword_value
+ imul_reg_reg_imm_32bit_ok:
+ pop ebx
+ mov edx,eax
+ cmp [value_type],0
+ jne imul_reg_reg_imm_32bit_store
+ cmp [size_declared],0
+ jne imul_reg_reg_imm_32bit_store
+ cmp eax,-80h
+ jl imul_reg_reg_imm_32bit_store
+ cmp eax,80h
+ jl imul_reg_reg_imm_8bit_store
+ imul_reg_reg_imm_32bit_store:
+ mov [base_code],69h
+ call store_nomem_instruction
+ mov eax,edx
+ call mark_relocation
+ stos dword [edi]
+ jmp instruction_assembled
+ imul_reg_reg_imm_8bit_store:
+ mov [base_code],6Bh
+ call store_nomem_instruction
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+in_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ or al,al
+ jnz invalid_operand
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov al,ah
+ push eax
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je in_imm
+ cmp al,10h
+ je in_reg
+ jmp invalid_operand
+ in_reg:
+ lods byte [esi]
+ cmp al,22h
+ jne invalid_operand
+ pop eax
+ cmp al,1
+ je in_al_dx
+ cmp al,2
+ je in_ax_dx
+ cmp al,4
+ jne invalid_operand_size
+ in_ax_dx:
+ call operand_autodetect
+ mov [base_code],0EDh
+ call store_instruction_code
+ jmp instruction_assembled
+ in_al_dx:
+ mov al,0ECh
+ stos byte [edi]
+ jmp instruction_assembled
+ in_imm:
+ mov al,[operand_size]
+ or al,al
+ jz in_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ in_imm_size_ok:
+ call get_byte_value
+ mov dl,al
+ pop eax
+ cmp al,1
+ je in_al_imm
+ cmp al,2
+ je in_ax_imm
+ cmp al,4
+ jne invalid_operand_size
+ in_ax_imm:
+ call operand_autodetect
+ mov [base_code],0E5h
+ call store_instruction_code
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ in_al_imm:
+ mov al,0E4h
+ stos byte [edi]
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+out_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'('
+ je out_imm
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,22h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ or al,al
+ jnz invalid_operand
+ mov al,ah
+ cmp al,1
+ je out_dx_al
+ cmp al,2
+ je out_dx_ax
+ cmp al,4
+ jne invalid_operand_size
+ out_dx_ax:
+ call operand_autodetect
+ mov [base_code],0EFh
+ call store_instruction_code
+ jmp instruction_assembled
+ out_dx_al:
+ mov al,0EEh
+ stos byte [edi]
+ jmp instruction_assembled
+ out_imm:
+ mov al,[operand_size]
+ or al,al
+ jz out_imm_size_ok
+ cmp al,1
+ jne invalid_operand_size
+ out_imm_size_ok:
+ call get_byte_value
+ mov dl,al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ or al,al
+ jnz invalid_operand
+ mov al,ah
+ cmp al,1
+ je out_imm_al
+ cmp al,2
+ je out_imm_ax
+ cmp al,4
+ jne invalid_operand_size
+ out_imm_ax:
+ call operand_autodetect
+ mov [base_code],0E7h
+ call store_instruction_code
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+ out_imm_al:
+ mov al,0E6h
+ stos byte [edi]
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+
+call_instruction:
+ mov [postbyte_register],10b
+ mov [base_code],0E8h
+ mov [extended_code],9Ah
+ jmp process_jmp
+jmp_instruction:
+ mov [postbyte_register],100b
+ mov [base_code],0E9h
+ mov [extended_code],0EAh
+ process_jmp:
+ lods byte [esi]
+ call get_jump_operator
+ call get_size_operator
+ cmp al,'('
+ je jmp_imm
+ mov [base_code],0FFh
+ cmp al,10h
+ je jmp_reg
+ cmp al,'['
+ jne invalid_operand
+ jmp_mem:
+ cmp [jump_type],1
+ je illegal_instruction
+ call get_address
+ mov edx,eax
+ mov al,[operand_size]
+ or al,al
+ jz jmp_mem_size_not_specified
+ cmp al,2
+ je jmp_mem_16bit
+ cmp al,4
+ je jmp_mem_32bit
+ cmp al,6
+ je jmp_mem_48bit
+ cmp al,8
+ je jmp_mem_64bit
+ cmp al,10
+ je jmp_mem_80bit
+ jmp invalid_operand_size
+ jmp_mem_size_not_specified:
+ cmp [jump_type],3
+ je jmp_mem_far
+ cmp [jump_type],2
+ je jmp_mem_near
+ call recoverable_unknown_size
+ jmp_mem_near:
+ cmp [code_type],16
+ je jmp_mem_16bit
+ cmp [code_type],32
+ je jmp_mem_near_32bit
+ jmp_mem_64bit:
+ cmp [jump_type],3
+ je invalid_operand_size
+ cmp [code_type],64
+ jne illegal_instruction
+ jmp instruction_ready
+ jmp_mem_far:
+ cmp [code_type],16
+ je jmp_mem_far_32bit
+ jmp_mem_48bit:
+ call operand_32bit
+ jmp_mem_far_store:
+ cmp [jump_type],2
+ je invalid_operand_size
+ inc [postbyte_register]
+ jmp instruction_ready
+ jmp_mem_80bit:
+ call operand_64bit
+ jmp jmp_mem_far_store
+ jmp_mem_far_32bit:
+ call operand_16bit
+ jmp jmp_mem_far_store
+ jmp_mem_32bit:
+ cmp [jump_type],3
+ je jmp_mem_far_32bit
+ cmp [jump_type],2
+ je jmp_mem_near_32bit
+ cmp [code_type],16
+ je jmp_mem_far_32bit
+ jmp_mem_near_32bit:
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp instruction_ready
+ jmp_mem_16bit:
+ cmp [jump_type],3
+ je invalid_operand_size
+ call operand_16bit
+ jmp instruction_ready
+ jmp_reg:
+ test [jump_type],1
+ jnz invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ cmp al,2
+ je jmp_reg_16bit
+ cmp al,4
+ je jmp_reg_32bit
+ cmp al,8
+ jne invalid_operand_size
+ jmp_reg_64bit:
+ cmp [code_type],64
+ jne illegal_instruction
+ jmp nomem_instruction_ready
+ jmp_reg_32bit:
+ cmp [code_type],64
+ je illegal_instruction
+ call operand_32bit
+ jmp nomem_instruction_ready
+ jmp_reg_16bit:
+ call operand_16bit
+ jmp nomem_instruction_ready
+ jmp_imm:
+ cmp byte [esi],'.'
+ je invalid_value
+ mov ebx,esi
+ dec esi
+ call skip_symbol
+ xchg esi,ebx
+ cmp byte [ebx],':'
+ je jmp_far
+ cmp [jump_type],3
+ je invalid_operand
+ jmp_near:
+ mov al,[operand_size]
+ cmp al,2
+ je jmp_imm_16bit
+ cmp al,4
+ je jmp_imm_32bit
+ cmp al,8
+ je jmp_imm_64bit
+ or al,al
+ jnz invalid_operand_size
+ cmp [code_type],16
+ je jmp_imm_16bit
+ cmp [code_type],64
+ je jmp_imm_64bit
+ jmp_imm_32bit:
+ cmp [code_type],64
+ je invalid_operand_size
+ call get_address_dword_value
+ cmp [code_type],16
+ jne jmp_imm_32bit_prefix_ok
+ mov byte [edi],66h
+ inc edi
+ jmp_imm_32bit_prefix_ok:
+ call calculate_jump_offset
+ cdq
+ call check_for_short_jump
+ jc jmp_short
+ jmp_imm_32bit_store:
+ mov edx,eax
+ sub edx,3
+ jno jmp_imm_32bit_ok
+ cmp [code_type],64
+ je relative_jump_out_of_range
+ jmp_imm_32bit_ok:
+ mov al,[base_code]
+ stos byte [edi]
+ mov eax,edx
+ call mark_relocation
+ stos dword [edi]
+ jmp instruction_assembled
+ jmp_imm_64bit:
+ cmp [code_type],64
+ jne invalid_operand_size
+ call get_address_qword_value
+ call calculate_jump_offset
+ mov ecx,edx
+ cdq
+ cmp edx,ecx
+ jne relative_jump_out_of_range
+ call check_for_short_jump
+ jnc jmp_imm_32bit_store
+ jmp_short:
+ mov ah,al
+ mov al,0EBh
+ stos word [edi]
+ jmp instruction_assembled
+ jmp_imm_16bit:
+ call get_address_word_value
+ cmp [code_type],16
+ je jmp_imm_16bit_prefix_ok
+ mov byte [edi],66h
+ inc edi
+ jmp_imm_16bit_prefix_ok:
+ call calculate_jump_offset
+ cwde
+ cdq
+ call check_for_short_jump
+ jc jmp_short
+ cmp [value_type],0
+ jne invalid_use_of_symbol
+ mov edx,eax
+ dec edx
+ mov al,[base_code]
+ stos byte [edi]
+ mov eax,edx
+ stos word [edi]
+ jmp instruction_assembled
+ calculate_jump_offset:
+ add edi,2
+ mov ebp,[addressing_space]
+ call calculate_relative_offset
+ sub edi,2
+ ret
+ check_for_short_jump:
+ cmp [jump_type],1
+ je forced_short
+ ja no_short_jump
+ cmp [base_code],0E8h
+ je no_short_jump
+ cmp [value_type],0
+ jne no_short_jump
+ cmp eax,80h
+ jb short_jump
+ cmp eax,-80h
+ jae short_jump
+ no_short_jump:
+ clc
+ ret
+ forced_short:
+ cmp [base_code],0E8h
+ je illegal_instruction
+ cmp [next_pass_needed],0
+ jne jmp_short_value_type_ok
+ cmp [value_type],0
+ jne invalid_use_of_symbol
+ jmp_short_value_type_ok:
+ cmp eax,-80h
+ jae short_jump
+ cmp eax,80h
+ jae jump_out_of_range
+ short_jump:
+ stc
+ ret
+ jump_out_of_range:
+ cmp [error_line],0
+ jne instruction_assembled
+ mov eax,[current_line]
+ mov [error_line],eax
+ mov [error],relative_jump_out_of_range
+ jmp instruction_assembled
+ jmp_far:
+ cmp [jump_type],2
+ je invalid_operand
+ cmp [code_type],64
+ je illegal_instruction
+ mov al,[extended_code]
+ mov [base_code],al
+ call get_word_value
+ push eax
+ inc esi
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_operand
+ mov al,[value_type]
+ push eax [symbol_identifier]
+ cmp byte [esi],'.'
+ je invalid_value
+ mov al,[operand_size]
+ cmp al,4
+ je jmp_far_16bit
+ cmp al,6
+ je jmp_far_32bit
+ or al,al
+ jnz invalid_operand_size
+ cmp [code_type],16
+ jne jmp_far_32bit
+ jmp_far_16bit:
+ call get_word_value
+ mov ebx,eax
+ call operand_16bit
+ call store_instruction_code
+ mov ax,bx
+ call mark_relocation
+ stos word [edi]
+ jmp_far_segment:
+ pop [symbol_identifier] eax
+ mov [value_type],al
+ pop eax
+ call mark_relocation
+ stos word [edi]
+ jmp instruction_assembled
+ jmp_far_32bit:
+ call get_dword_value
+ mov ebx,eax
+ call operand_32bit
+ call store_instruction_code
+ mov eax,ebx
+ call mark_relocation
+ stos dword [edi]
+ jmp jmp_far_segment
+conditional_jump:
+ mov [base_code],al
+ lods byte [esi]
+ call get_jump_operator
+ cmp [jump_type],3
+ je invalid_operand
+ call get_size_operator
+ cmp al,'('
+ jne invalid_operand
+ cmp byte [esi],'.'
+ je invalid_value
+ mov al,[operand_size]
+ cmp al,2
+ je conditional_jump_16bit
+ cmp al,4
+ je conditional_jump_32bit
+ cmp al,8
+ je conditional_jump_64bit
+ or al,al
+ jnz invalid_operand_size
+ cmp [code_type],16
+ je conditional_jump_16bit
+ cmp [code_type],64
+ je conditional_jump_64bit
+ conditional_jump_32bit:
+ cmp [code_type],64
+ je invalid_operand_size
+ call get_address_dword_value
+ cmp [code_type],16
+ jne conditional_jump_32bit_prefix_ok
+ mov byte [edi],66h
+ inc edi
+ conditional_jump_32bit_prefix_ok:
+ call calculate_jump_offset
+ cdq
+ call check_for_short_jump
+ jc conditional_jump_short
+ conditional_jump_32bit_store:
+ mov edx,eax
+ sub edx,4
+ jno conditional_jump_32bit_range_ok
+ cmp [code_type],64
+ je relative_jump_out_of_range
+ conditional_jump_32bit_range_ok:
+ mov ah,[base_code]
+ add ah,10h
+ mov al,0Fh
+ stos word [edi]
+ mov eax,edx
+ call mark_relocation
+ stos dword [edi]
+ jmp instruction_assembled
+ conditional_jump_64bit:
+ cmp [code_type],64
+ jne invalid_operand_size
+ call get_address_qword_value
+ call calculate_jump_offset
+ mov ecx,edx
+ cdq
+ cmp edx,ecx
+ jne relative_jump_out_of_range
+ call check_for_short_jump
+ jnc conditional_jump_32bit_store
+ conditional_jump_short:
+ mov ah,al
+ mov al,[base_code]
+ stos word [edi]
+ jmp instruction_assembled
+ conditional_jump_16bit:
+ call get_address_word_value
+ cmp [code_type],16
+ je conditional_jump_16bit_prefix_ok
+ mov byte [edi],66h
+ inc edi
+ conditional_jump_16bit_prefix_ok:
+ call calculate_jump_offset
+ cwde
+ cdq
+ call check_for_short_jump
+ jc conditional_jump_short
+ cmp [value_type],0
+ jne invalid_use_of_symbol
+ mov edx,eax
+ sub dx,2
+ mov ah,[base_code]
+ add ah,10h
+ mov al,0Fh
+ stos word [edi]
+ mov eax,edx
+ stos word [edi]
+ jmp instruction_assembled
+loop_instruction_16bit:
+ cmp [code_type],64
+ je illegal_instruction
+ cmp [code_type],16
+ je loop_instruction
+ mov [operand_prefix],67h
+ jmp loop_instruction
+loop_instruction_32bit:
+ cmp [code_type],32
+ je loop_instruction
+ mov [operand_prefix],67h
+ jmp loop_instruction
+loop_instruction_64bit:
+ cmp [code_type],64
+ jne illegal_instruction
+loop_instruction:
+ mov [base_code],al
+ lods byte [esi]
+ call get_jump_operator
+ cmp [jump_type],1
+ ja invalid_operand
+ call get_size_operator
+ cmp al,'('
+ jne invalid_operand
+ cmp byte [esi],'.'
+ je invalid_value
+ mov al,[operand_size]
+ cmp al,2
+ je loop_jump_16bit
+ cmp al,4
+ je loop_jump_32bit
+ cmp al,8
+ je loop_jump_64bit
+ or al,al
+ jnz invalid_operand_size
+ cmp [code_type],16
+ je loop_jump_16bit
+ cmp [code_type],64
+ je loop_jump_64bit
+ loop_jump_32bit:
+ cmp [code_type],64
+ je invalid_operand_size
+ call get_address_dword_value
+ cmp [code_type],16
+ jne loop_jump_32bit_prefix_ok
+ mov byte [edi],66h
+ inc edi
+ loop_jump_32bit_prefix_ok:
+ call loop_counter_size
+ call calculate_jump_offset
+ cdq
+ make_loop_jump:
+ call check_for_short_jump
+ jc conditional_jump_short
+ scas word [edi]
+ jmp jump_out_of_range
+ loop_counter_size:
+ cmp [operand_prefix],0
+ je loop_counter_size_ok
+ push eax
+ mov al,[operand_prefix]
+ stos byte [edi]
+ pop eax
+ loop_counter_size_ok:
+ ret
+ loop_jump_64bit:
+ cmp [code_type],64
+ jne invalid_operand_size
+ call get_address_qword_value
+ call loop_counter_size
+ call calculate_jump_offset
+ mov ecx,edx
+ cdq
+ cmp edx,ecx
+ jne relative_jump_out_of_range
+ jmp make_loop_jump
+ loop_jump_16bit:
+ call get_address_word_value
+ cmp [code_type],16
+ je loop_jump_16bit_prefix_ok
+ mov byte [edi],66h
+ inc edi
+ loop_jump_16bit_prefix_ok:
+ call loop_counter_size
+ call calculate_jump_offset
+ cwde
+ cdq
+ jmp make_loop_jump
+
+movs_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ cmp [segment_register],1
+ ja invalid_address
+ push ebx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ pop edx
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ mov al,dh
+ mov ah,bh
+ shr al,4
+ shr ah,4
+ cmp al,ah
+ jne address_sizes_do_not_agree
+ and bh,111b
+ and dh,111b
+ cmp bh,6
+ jne invalid_address
+ cmp dh,7
+ jne invalid_address
+ cmp al,2
+ je movs_address_16bit
+ cmp al,4
+ je movs_address_32bit
+ cmp [code_type],64
+ jne invalid_address_size
+ jmp movs_store
+ movs_address_32bit:
+ call address_32bit_prefix
+ jmp movs_store
+ movs_address_16bit:
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ movs_store:
+ xor ebx,ebx
+ call store_segment_prefix_if_necessary
+ mov al,0A4h
+ movs_check_size:
+ mov bl,[operand_size]
+ cmp bl,1
+ je simple_instruction
+ inc al
+ cmp bl,2
+ je simple_instruction_16bit
+ cmp bl,4
+ je simple_instruction_32bit
+ cmp bl,8
+ je simple_instruction_64bit
+ or bl,bl
+ jnz invalid_operand_size
+ call recoverable_unknown_size
+ jmp simple_instruction
+lods_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ cmp bh,26h
+ je lods_address_16bit
+ cmp bh,46h
+ je lods_address_32bit
+ cmp bh,86h
+ jne invalid_address
+ cmp [code_type],64
+ jne invalid_address_size
+ jmp lods_store
+ lods_address_32bit:
+ call address_32bit_prefix
+ jmp lods_store
+ lods_address_16bit:
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ lods_store:
+ xor ebx,ebx
+ call store_segment_prefix_if_necessary
+ mov al,0ACh
+ jmp movs_check_size
+stos_instruction:
+ mov [base_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ cmp bh,27h
+ je stos_address_16bit
+ cmp bh,47h
+ je stos_address_32bit
+ cmp bh,87h
+ jne invalid_address
+ cmp [code_type],64
+ jne invalid_address_size
+ jmp stos_store
+ stos_address_32bit:
+ call address_32bit_prefix
+ jmp stos_store
+ stos_address_16bit:
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ stos_store:
+ cmp [segment_register],1
+ ja invalid_address
+ mov al,[base_code]
+ jmp movs_check_size
+cmps_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ mov al,[segment_register]
+ push eax ebx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ pop edx eax
+ cmp [segment_register],1
+ ja invalid_address
+ mov [segment_register],al
+ mov al,dh
+ mov ah,bh
+ shr al,4
+ shr ah,4
+ cmp al,ah
+ jne address_sizes_do_not_agree
+ and bh,111b
+ and dh,111b
+ cmp bh,7
+ jne invalid_address
+ cmp dh,6
+ jne invalid_address
+ cmp al,2
+ je cmps_address_16bit
+ cmp al,4
+ je cmps_address_32bit
+ cmp [code_type],64
+ jne invalid_address_size
+ jmp cmps_store
+ cmps_address_32bit:
+ call address_32bit_prefix
+ jmp cmps_store
+ cmps_address_16bit:
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ cmps_store:
+ xor ebx,ebx
+ call store_segment_prefix_if_necessary
+ mov al,0A6h
+ jmp movs_check_size
+ins_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ cmp bh,27h
+ je ins_address_16bit
+ cmp bh,47h
+ je ins_address_32bit
+ cmp bh,87h
+ jne invalid_address
+ cmp [code_type],64
+ jne invalid_address_size
+ jmp ins_store
+ ins_address_32bit:
+ call address_32bit_prefix
+ jmp ins_store
+ ins_address_16bit:
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ ins_store:
+ cmp [segment_register],1
+ ja invalid_address
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,22h
+ jne invalid_operand
+ mov al,6Ch
+ ins_check_size:
+ cmp [operand_size],8
+ jne movs_check_size
+ jmp invalid_operand_size
+outs_instruction:
+ lods byte [esi]
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,22h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ cmp bh,26h
+ je outs_address_16bit
+ cmp bh,46h
+ je outs_address_32bit
+ cmp bh,86h
+ jne invalid_address
+ cmp [code_type],64
+ jne invalid_address_size
+ jmp outs_store
+ outs_address_32bit:
+ call address_32bit_prefix
+ jmp outs_store
+ outs_address_16bit:
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ outs_store:
+ xor ebx,ebx
+ call store_segment_prefix_if_necessary
+ mov al,6Eh
+ jmp ins_check_size
+xlat_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ or eax,eax
+ jnz invalid_address
+ or bl,ch
+ jnz invalid_address
+ cmp bh,23h
+ je xlat_address_16bit
+ cmp bh,43h
+ je xlat_address_32bit
+ cmp bh,83h
+ jne invalid_address
+ cmp [code_type],64
+ jne invalid_address_size
+ jmp xlat_store
+ xlat_address_32bit:
+ call address_32bit_prefix
+ jmp xlat_store
+ xlat_address_16bit:
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ xlat_store:
+ call store_segment_prefix_if_necessary
+ mov al,0D7h
+ cmp [operand_size],1
+ jbe simple_instruction
+ jmp invalid_operand_size
+
+pm_word_instruction:
+ mov ah,al
+ shr ah,4
+ and al,111b
+ mov [base_code],0Fh
+ mov [extended_code],ah
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je pm_reg
+ pm_mem:
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,2
+ je pm_mem_store
+ or al,al
+ jnz invalid_operand_size
+ pm_mem_store:
+ jmp instruction_ready
+ pm_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ cmp ah,2
+ jne invalid_operand_size
+ jmp nomem_instruction_ready
+pm_store_word_instruction:
+ mov ah,al
+ shr ah,4
+ and al,111b
+ mov [base_code],0Fh
+ mov [extended_code],ah
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne pm_mem
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ call operand_autodetect
+ jmp nomem_instruction_ready
+lgdt_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],1
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,6
+ je lgdt_mem_48bit
+ cmp al,10
+ je lgdt_mem_80bit
+ or al,al
+ jnz invalid_operand_size
+ jmp lgdt_mem_store
+ lgdt_mem_80bit:
+ cmp [code_type],64
+ jne illegal_instruction
+ jmp lgdt_mem_store
+ lgdt_mem_48bit:
+ cmp [code_type],64
+ je illegal_instruction
+ cmp [postbyte_register],2
+ jb lgdt_mem_store
+ call operand_32bit
+ lgdt_mem_store:
+ jmp instruction_ready
+lar_instruction:
+ mov [extended_code],al
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ xor al,al
+ xchg al,[operand_size]
+ call operand_autodetect
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je lar_reg_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz lar_reg_mem
+ cmp al,2
+ jne invalid_operand_size
+ lar_reg_mem:
+ jmp instruction_ready
+ lar_reg_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ah,2
+ jne invalid_operand_size
+ mov bl,al
+ jmp nomem_instruction_ready
+invlpg_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],1
+ mov [postbyte_register],7
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ jmp instruction_ready
+swapgs_instruction:
+ cmp [code_type],64
+ jne illegal_instruction
+rdtscp_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],1
+ mov [postbyte_register],7
+ mov bl,al
+ jmp nomem_instruction_ready
+
+basic_486_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je basic_486_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ push edx ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ mov al,ah
+ cmp al,1
+ je basic_486_mem_reg_8bit
+ call operand_autodetect
+ inc [extended_code]
+ basic_486_mem_reg_8bit:
+ jmp instruction_ready
+ basic_486_reg:
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov bl,[postbyte_register]
+ mov [postbyte_register],al
+ mov al,ah
+ cmp al,1
+ je basic_486_reg_reg_8bit
+ call operand_autodetect
+ inc [extended_code]
+ basic_486_reg_reg_8bit:
+ jmp nomem_instruction_ready
+bswap_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ test al,1000b
+ jz bswap_reg_code_ok
+ or [rex_prefix],41h
+ and al,111b
+ bswap_reg_code_ok:
+ add al,0C8h
+ mov [extended_code],al
+ mov [base_code],0Fh
+ cmp ah,8
+ je bswap_reg64
+ cmp ah,4
+ jne invalid_operand_size
+ call operand_32bit
+ call store_instruction_code
+ jmp instruction_assembled
+ bswap_reg64:
+ call operand_64bit
+ call store_instruction_code
+ jmp instruction_assembled
+cmpxchgx_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],0C7h
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov ah,1
+ xchg [postbyte_register],ah
+ mov al,[operand_size]
+ or al,al
+ jz cmpxchgx_size_ok
+ cmp al,ah
+ jne invalid_operand_size
+ cmpxchgx_size_ok:
+ cmp ah,16
+ jne cmpxchgx_store
+ call operand_64bit
+ cmpxchgx_store:
+ jmp instruction_ready
+nop_instruction:
+ mov ah,[esi]
+ cmp ah,10h
+ je extended_nop
+ cmp ah,11h
+ je extended_nop
+ cmp ah,'['
+ je extended_nop
+ stos byte [edi]
+ jmp instruction_assembled
+ extended_nop:
+ mov [base_code],0Fh
+ mov [extended_code],1Fh
+ mov [postbyte_register],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je extended_nop_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz extended_nop_store
+ call operand_autodetect
+ extended_nop_store:
+ jmp instruction_ready
+ extended_nop_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ call operand_autodetect
+ jmp nomem_instruction_ready
+
+basic_fpu_instruction:
+ mov [postbyte_register],al
+ mov [base_code],0D8h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je basic_fpu_streg
+ cmp al,'['
+ je basic_fpu_mem
+ dec esi
+ mov ah,[postbyte_register]
+ cmp ah,2
+ jb invalid_operand
+ cmp ah,3
+ ja invalid_operand
+ mov bl,1
+ jmp nomem_instruction_ready
+ basic_fpu_mem:
+ call get_address
+ mov al,[operand_size]
+ cmp al,4
+ je basic_fpu_mem_32bit
+ cmp al,8
+ je basic_fpu_mem_64bit
+ or al,al
+ jnz invalid_operand_size
+ call recoverable_unknown_size
+ basic_fpu_mem_32bit:
+ jmp instruction_ready
+ basic_fpu_mem_64bit:
+ mov [base_code],0DCh
+ jmp instruction_ready
+ basic_fpu_streg:
+ lods byte [esi]
+ call convert_fpu_register
+ mov bl,al
+ mov ah,[postbyte_register]
+ cmp ah,2
+ je basic_fpu_single_streg
+ cmp ah,3
+ je basic_fpu_single_streg
+ or al,al
+ jz basic_fpu_st0
+ test ah,110b
+ jz basic_fpu_streg_st0
+ xor [postbyte_register],1
+ basic_fpu_streg_st0:
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_fpu_register
+ or al,al
+ jnz invalid_operand
+ mov [base_code],0DCh
+ jmp nomem_instruction_ready
+ basic_fpu_st0:
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_fpu_register
+ mov bl,al
+ basic_fpu_single_streg:
+ mov [base_code],0D8h
+ jmp nomem_instruction_ready
+simple_fpu_instruction:
+ mov ah,al
+ or ah,11000000b
+ mov al,0D9h
+ stos word [edi]
+ jmp instruction_assembled
+fi_instruction:
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,2
+ je fi_mem_16bit
+ cmp al,4
+ je fi_mem_32bit
+ or al,al
+ jnz invalid_operand_size
+ call recoverable_unknown_size
+ fi_mem_32bit:
+ mov [base_code],0DAh
+ jmp instruction_ready
+ fi_mem_16bit:
+ mov [base_code],0DEh
+ jmp instruction_ready
+fld_instruction:
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je fld_streg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,4
+ je fld_mem_32bit
+ cmp al,8
+ je fld_mem_64bit
+ cmp al,10
+ je fld_mem_80bit
+ or al,al
+ jnz invalid_operand_size
+ call recoverable_unknown_size
+ fld_mem_32bit:
+ mov [base_code],0D9h
+ jmp instruction_ready
+ fld_mem_64bit:
+ mov [base_code],0DDh
+ jmp instruction_ready
+ fld_mem_80bit:
+ mov al,[postbyte_register]
+ cmp al,0
+ je fld_mem_80bit_store
+ dec [postbyte_register]
+ cmp al,3
+ je fld_mem_80bit_store
+ jmp invalid_operand_size
+ fld_mem_80bit_store:
+ add [postbyte_register],5
+ mov [base_code],0DBh
+ jmp instruction_ready
+ fld_streg:
+ lods byte [esi]
+ call convert_fpu_register
+ mov bl,al
+ cmp [postbyte_register],2
+ jae fst_streg
+ mov [base_code],0D9h
+ jmp nomem_instruction_ready
+ fst_streg:
+ mov [base_code],0DDh
+ jmp nomem_instruction_ready
+fild_instruction:
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,2
+ je fild_mem_16bit
+ cmp al,4
+ je fild_mem_32bit
+ cmp al,8
+ je fild_mem_64bit
+ or al,al
+ jnz invalid_operand_size
+ call recoverable_unknown_size
+ fild_mem_32bit:
+ mov [base_code],0DBh
+ jmp instruction_ready
+ fild_mem_16bit:
+ mov [base_code],0DFh
+ jmp instruction_ready
+ fild_mem_64bit:
+ mov al,[postbyte_register]
+ cmp al,1
+ je fisttp_64bit_store
+ jb fild_mem_64bit_store
+ dec [postbyte_register]
+ cmp al,3
+ je fild_mem_64bit_store
+ jmp invalid_operand_size
+ fild_mem_64bit_store:
+ add [postbyte_register],5
+ mov [base_code],0DFh
+ jmp instruction_ready
+ fisttp_64bit_store:
+ mov [base_code],0DDh
+ jmp instruction_ready
+fbld_instruction:
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz fbld_mem_80bit
+ cmp al,10
+ je fbld_mem_80bit
+ jmp invalid_operand_size
+ fbld_mem_80bit:
+ mov [base_code],0DFh
+ jmp instruction_ready
+faddp_instruction:
+ mov [postbyte_register],al
+ mov [base_code],0DEh
+ mov edx,esi
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je faddp_streg
+ mov esi,edx
+ mov bl,1
+ jmp nomem_instruction_ready
+ faddp_streg:
+ lods byte [esi]
+ call convert_fpu_register
+ mov bl,al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_fpu_register
+ or al,al
+ jnz invalid_operand
+ jmp nomem_instruction_ready
+fcompp_instruction:
+ mov ax,0D9DEh
+ stos word [edi]
+ jmp instruction_assembled
+fucompp_instruction:
+ mov ax,0E9DAh
+ stos word [edi]
+ jmp instruction_assembled
+fxch_instruction:
+ mov dx,01D9h
+ jmp fpu_single_operand
+ffreep_instruction:
+ mov dx,00DFh
+ jmp fpu_single_operand
+ffree_instruction:
+ mov dl,0DDh
+ mov dh,al
+ fpu_single_operand:
+ mov ebx,esi
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je fpu_streg
+ or dh,dh
+ jz invalid_operand
+ mov esi,ebx
+ shl dh,3
+ or dh,11000001b
+ mov ax,dx
+ stos word [edi]
+ jmp instruction_assembled
+ fpu_streg:
+ lods byte [esi]
+ call convert_fpu_register
+ shl dh,3
+ or dh,al
+ or dh,11000000b
+ mov ax,dx
+ stos word [edi]
+ jmp instruction_assembled
+
+fstenv_instruction:
+ mov byte [edi],9Bh
+ inc edi
+fldenv_instruction:
+ mov [base_code],0D9h
+ jmp fpu_mem
+fstenv_instruction_16bit:
+ mov byte [edi],9Bh
+ inc edi
+fldenv_instruction_16bit:
+ call operand_16bit
+ jmp fldenv_instruction
+fstenv_instruction_32bit:
+ mov byte [edi],9Bh
+ inc edi
+fldenv_instruction_32bit:
+ call operand_32bit
+ jmp fldenv_instruction
+fsave_instruction_32bit:
+ mov byte [edi],9Bh
+ inc edi
+fnsave_instruction_32bit:
+ call operand_32bit
+ jmp fnsave_instruction
+fsave_instruction_16bit:
+ mov byte [edi],9Bh
+ inc edi
+fnsave_instruction_16bit:
+ call operand_16bit
+ jmp fnsave_instruction
+fsave_instruction:
+ mov byte [edi],9Bh
+ inc edi
+fnsave_instruction:
+ mov [base_code],0DDh
+ fpu_mem:
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],0
+ jne invalid_operand_size
+ jmp instruction_ready
+fstcw_instruction:
+ mov byte [edi],9Bh
+ inc edi
+fldcw_instruction:
+ mov [postbyte_register],al
+ mov [base_code],0D9h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz fldcw_mem_16bit
+ cmp al,2
+ je fldcw_mem_16bit
+ jmp invalid_operand_size
+ fldcw_mem_16bit:
+ jmp instruction_ready
+fstsw_instruction:
+ mov al,9Bh
+ stos byte [edi]
+fnstsw_instruction:
+ mov [base_code],0DDh
+ mov [postbyte_register],7
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je fstsw_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz fstsw_mem_16bit
+ cmp al,2
+ je fstsw_mem_16bit
+ jmp invalid_operand_size
+ fstsw_mem_16bit:
+ jmp instruction_ready
+ fstsw_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ax,0200h
+ jne invalid_operand
+ mov ax,0E0DFh
+ stos word [edi]
+ jmp instruction_assembled
+finit_instruction:
+ mov byte [edi],9Bh
+ inc edi
+fninit_instruction:
+ mov ah,al
+ mov al,0DBh
+ stos word [edi]
+ jmp instruction_assembled
+fcmov_instruction:
+ mov dh,0DAh
+ jmp fcomi_streg
+fcomi_instruction:
+ mov dh,0DBh
+ jmp fcomi_streg
+fcomip_instruction:
+ mov dh,0DFh
+ fcomi_streg:
+ mov dl,al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_fpu_register
+ mov ah,al
+ cmp byte [esi],','
+ je fcomi_st0_streg
+ add ah,dl
+ mov al,dh
+ stos word [edi]
+ jmp instruction_assembled
+ fcomi_st0_streg:
+ or ah,ah
+ jnz invalid_operand
+ inc esi
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_fpu_register
+ mov ah,al
+ add ah,dl
+ mov al,dh
+ stos word [edi]
+ jmp instruction_assembled
+
+basic_mmx_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ mmx_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ call make_mmx_prefix
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je mmx_mmreg_mmreg
+ cmp al,'['
+ jne invalid_operand
+ mmx_mmreg_mem:
+ call get_address
+ jmp instruction_ready
+ mmx_mmreg_mmreg:
+ lods byte [esi]
+ call convert_mmx_register
+ mov bl,al
+ jmp nomem_instruction_ready
+mmx_bit_shift_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ call make_mmx_prefix
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je mmx_mmreg_mmreg
+ cmp al,'('
+ je mmx_ps_mmreg_imm8
+ cmp al,'['
+ je mmx_mmreg_mem
+ jmp invalid_operand
+ mmx_ps_mmreg_imm8:
+ call get_byte_value
+ mov byte [value],al
+ test [operand_size],not 1
+ jnz invalid_value
+ mov bl,[extended_code]
+ mov al,bl
+ shr bl,4
+ and al,1111b
+ add al,70h
+ mov [extended_code],al
+ sub bl,0Ch
+ shl bl,1
+ xchg bl,[postbyte_register]
+ call store_nomem_instruction
+ mov al,byte [value]
+ stos byte [edi]
+ jmp instruction_assembled
+pmovmskb_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ cmp ah,4
+ je pmovmskb_reg_size_ok
+ cmp [code_type],64
+ jne invalid_operand_size
+ cmp ah,8
+ jnz invalid_operand_size
+ pmovmskb_reg_size_ok:
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ mov bl,al
+ call make_mmx_prefix
+ cmp [extended_code],0C5h
+ je mmx_nomem_imm8
+ jmp nomem_instruction_ready
+ mmx_imm8:
+ push ebx ecx edx
+ xor cl,cl
+ xchg cl,[operand_size]
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ test ah,not 1
+ jnz invalid_operand_size
+ mov [operand_size],cl
+ cmp al,'('
+ jne invalid_operand
+ call get_byte_value
+ mov byte [value],al
+ pop edx ecx ebx
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ mmx_nomem_imm8:
+ call store_nomem_instruction
+ call append_imm8
+ jmp instruction_assembled
+ append_imm8:
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ test ah,not 1
+ jnz invalid_operand_size
+ cmp al,'('
+ jne invalid_operand
+ call get_byte_value
+ stosb
+ ret
+pinsrw_instruction:
+ mov [extended_code],al
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ call make_mmx_prefix
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je pinsrw_mmreg_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],0
+ je mmx_imm8
+ cmp [operand_size],2
+ jne invalid_operand_size
+ jmp mmx_imm8
+ pinsrw_mmreg_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ah,4
+ jne invalid_operand_size
+ mov bl,al
+ jmp mmx_nomem_imm8
+pshufw_instruction:
+ mov [mmx_size],8
+ mov [opcode_prefix],al
+ jmp pshuf_instruction
+pshufd_instruction:
+ mov [mmx_size],16
+ mov [opcode_prefix],al
+ pshuf_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],70h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,[mmx_size]
+ jne invalid_operand_size
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je pshuf_mmreg_mmreg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ jmp mmx_imm8
+ pshuf_mmreg_mmreg:
+ lods byte [esi]
+ call convert_mmx_register
+ mov bl,al
+ jmp mmx_nomem_imm8
+movd_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],7Eh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movd_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ test [operand_size],not 4
+ jnz invalid_operand_size
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ call make_mmx_prefix
+ mov [postbyte_register],al
+ jmp instruction_ready
+ movd_reg:
+ lods byte [esi]
+ cmp al,0B0h
+ jae movd_mmreg
+ call convert_register
+ cmp ah,4
+ jne invalid_operand_size
+ mov [operand_size],0
+ mov bl,al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ mov [postbyte_register],al
+ call make_mmx_prefix
+ jmp nomem_instruction_ready
+ movd_mmreg:
+ mov [extended_code],6Eh
+ call convert_mmx_register
+ call make_mmx_prefix
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movd_mmreg_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ test [operand_size],not 4
+ jnz invalid_operand_size
+ jmp instruction_ready
+ movd_mmreg_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ah,4
+ jne invalid_operand_size
+ mov bl,al
+ jmp nomem_instruction_ready
+ make_mmx_prefix:
+ cmp [vex_required],0
+ jne mmx_prefix_for_vex
+ cmp [operand_size],16
+ jne no_mmx_prefix
+ mov [operand_prefix],66h
+ no_mmx_prefix:
+ ret
+ mmx_prefix_for_vex:
+ cmp [operand_size],16
+ jne invalid_operand
+ mov [opcode_prefix],66h
+ ret
+movq_instruction:
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movq_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ test [operand_size],not 8
+ jnz invalid_operand_size
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ mov [postbyte_register],al
+ cmp ah,16
+ je movq_mem_xmmreg
+ mov [extended_code],7Fh
+ jmp instruction_ready
+ movq_mem_xmmreg:
+ mov [extended_code],0D6h
+ mov [opcode_prefix],66h
+ jmp instruction_ready
+ movq_reg:
+ lods byte [esi]
+ cmp al,0B0h
+ jae movq_mmreg
+ call convert_register
+ cmp ah,8
+ jne invalid_operand_size
+ mov bl,al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call convert_mmx_register
+ mov [postbyte_register],al
+ call make_mmx_prefix
+ mov [extended_code],7Eh
+ call operand_64bit
+ jmp nomem_instruction_ready
+ movq_mmreg:
+ call convert_mmx_register
+ mov [postbyte_register],al
+ mov [extended_code],6Fh
+ mov [mmx_size],ah
+ cmp ah,16
+ jne movq_mmreg_
+ mov [extended_code],7Eh
+ mov [opcode_prefix],0F3h
+ movq_mmreg_:
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movq_mmreg_reg
+ call get_address
+ test [operand_size],not 8
+ jnz invalid_operand_size
+ jmp instruction_ready
+ movq_mmreg_reg:
+ lods byte [esi]
+ cmp al,0B0h
+ jae movq_mmreg_mmreg
+ mov [operand_size],0
+ call convert_register
+ cmp ah,8
+ jne invalid_operand_size
+ mov [extended_code],6Eh
+ mov [opcode_prefix],0
+ mov bl,al
+ cmp [mmx_size],16
+ jne movq_mmreg_reg_store
+ mov [opcode_prefix],66h
+ movq_mmreg_reg_store:
+ call operand_64bit
+ jmp nomem_instruction_ready
+ movq_mmreg_mmreg:
+ call convert_mmx_register
+ cmp ah,[mmx_size]
+ jne invalid_operand_size
+ mov bl,al
+ jmp nomem_instruction_ready
+movdq_instruction:
+ mov [opcode_prefix],al
+ mov [base_code],0Fh
+ mov [extended_code],6Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movdq_mmreg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ mov [extended_code],7Fh
+ jmp instruction_ready
+ movdq_mmreg:
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je movdq_mmreg_mmreg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ jmp instruction_ready
+ movdq_mmreg_mmreg:
+ lods byte [esi]
+ call convert_xmm_register
+ mov bl,al
+ jmp nomem_instruction_ready
+lddqu_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ push eax
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ pop eax
+ mov [postbyte_register],al
+ mov [opcode_prefix],0F2h
+ mov [base_code],0Fh
+ mov [extended_code],0F0h
+ jmp instruction_ready
+
+movdq2q_instruction:
+ mov [opcode_prefix],0F2h
+ mov [mmx_size],8
+ jmp movq2dq_
+movq2dq_instruction:
+ mov [opcode_prefix],0F3h
+ mov [mmx_size],16
+ movq2dq_:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,[mmx_size]
+ jne invalid_operand_size
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ xor [mmx_size],8+16
+ cmp ah,[mmx_size]
+ jne invalid_operand_size
+ mov bl,al
+ mov [base_code],0Fh
+ mov [extended_code],0D6h
+ jmp nomem_instruction_ready
+
+sse_ps_instruction_imm8:
+ mov [immediate_size],1
+sse_ps_instruction:
+ mov [mmx_size],16
+ jmp sse_instruction
+sse_pd_instruction_imm8:
+ mov [immediate_size],1
+sse_pd_instruction:
+ mov [mmx_size],16
+ mov [opcode_prefix],66h
+ jmp sse_instruction
+sse_ss_instruction:
+ mov [mmx_size],4
+ mov [opcode_prefix],0F3h
+ jmp sse_instruction
+sse_sd_instruction:
+ mov [mmx_size],8
+ mov [opcode_prefix],0F2h
+ jmp sse_instruction
+cmp_pd_instruction:
+ mov [opcode_prefix],66h
+cmp_ps_instruction:
+ mov [mmx_size],16
+ mov byte [value],al
+ mov al,0C2h
+ jmp sse_instruction
+cmp_ss_instruction:
+ mov [mmx_size],4
+ mov [opcode_prefix],0F3h
+ jmp cmp_sx_instruction
+cmpsd_instruction:
+ mov al,0A7h
+ mov ah,[esi]
+ or ah,ah
+ jz simple_instruction_32bit
+ cmp ah,0Fh
+ je simple_instruction_32bit
+ mov al,-1
+cmp_sd_instruction:
+ mov [mmx_size],8
+ mov [opcode_prefix],0F2h
+ cmp_sx_instruction:
+ mov byte [value],al
+ mov al,0C2h
+ jmp sse_instruction
+comiss_instruction:
+ mov [mmx_size],4
+ jmp sse_instruction
+comisd_instruction:
+ mov [mmx_size],8
+ mov [opcode_prefix],66h
+ jmp sse_instruction
+cvtdq2pd_instruction:
+ mov [opcode_prefix],0F3h
+cvtps2pd_instruction:
+ mov [mmx_size],8
+ jmp sse_instruction
+cvtpd2dq_instruction:
+ mov [mmx_size],16
+ mov [opcode_prefix],0F2h
+ jmp sse_instruction
+movshdup_instruction:
+ mov [mmx_size],16
+ mov [opcode_prefix],0F3h
+sse_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ sse_xmmreg:
+ lods byte [esi]
+ call convert_xmm_register
+ sse_reg:
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je sse_xmmreg_xmmreg
+ sse_reg_mem:
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],0
+ je sse_mem_size_ok
+ mov al,[mmx_size]
+ cmp [operand_size],al
+ jne invalid_operand_size
+ sse_mem_size_ok:
+ mov al,[extended_code]
+ mov ah,[supplemental_code]
+ cmp al,0C2h
+ je sse_cmp_mem_ok
+ cmp ax,443Ah
+ je sse_cmp_mem_ok
+ cmp [immediate_size],1
+ je mmx_imm8
+ cmp [immediate_size],-1
+ jne sse_ok
+ call take_additional_xmm0
+ mov [immediate_size],0
+ sse_ok:
+ jmp instruction_ready
+ sse_cmp_mem_ok:
+ cmp byte [value],-1
+ je mmx_imm8
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ sse_xmmreg_xmmreg:
+ cmp [operand_prefix],66h
+ jne sse_xmmreg_xmmreg_ok
+ cmp [extended_code],12h
+ je invalid_operand
+ cmp [extended_code],16h
+ je invalid_operand
+ sse_xmmreg_xmmreg_ok:
+ lods byte [esi]
+ call convert_xmm_register
+ mov bl,al
+ mov al,[extended_code]
+ mov ah,[supplemental_code]
+ cmp al,0C2h
+ je sse_cmp_nomem_ok
+ cmp ax,443Ah
+ je sse_cmp_nomem_ok
+ cmp [immediate_size],1
+ je mmx_nomem_imm8
+ cmp [immediate_size],-1
+ jne sse_nomem_ok
+ call take_additional_xmm0
+ mov [immediate_size],0
+ sse_nomem_ok:
+ jmp nomem_instruction_ready
+ sse_cmp_nomem_ok:
+ cmp byte [value],-1
+ je mmx_nomem_imm8
+ call store_nomem_instruction
+ mov al,byte [value]
+ stosb
+ jmp instruction_assembled
+ take_additional_xmm0:
+ cmp byte [esi],','
+ jne additional_xmm0_ok
+ inc esi
+ lods byte [esi]
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ test al,al
+ jnz invalid_operand
+ additional_xmm0_ok:
+ ret
+
+pslldq_instruction:
+ mov [postbyte_register],al
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],73h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov bl,al
+ jmp mmx_nomem_imm8
+movpd_instruction:
+ mov [opcode_prefix],66h
+movps_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ mov [mmx_size],16
+ jmp sse_mov_instruction
+movss_instruction:
+ mov [mmx_size],4
+ mov [opcode_prefix],0F3h
+ jmp sse_movs
+movsd_instruction:
+ mov al,0A5h
+ mov ah,[esi]
+ or ah,ah
+ jz simple_instruction_32bit
+ cmp ah,0Fh
+ je simple_instruction_32bit
+ mov [mmx_size],8
+ mov [opcode_prefix],0F2h
+ sse_movs:
+ mov [base_code],0Fh
+ mov [extended_code],10h
+ jmp sse_mov_instruction
+sse_mov_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je sse_xmmreg
+ sse_mem:
+ cmp al,'['
+ jne invalid_operand
+ inc [extended_code]
+ call get_address
+ cmp [operand_size],0
+ je sse_mem_xmmreg
+ mov al,[mmx_size]
+ cmp [operand_size],al
+ jne invalid_operand_size
+ mov [operand_size],0
+ sse_mem_xmmreg:
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ jmp instruction_ready
+movlpd_instruction:
+ mov [opcode_prefix],66h
+movlps_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ mov [mmx_size],8
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne sse_mem
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ jmp sse_reg_mem
+movhlps_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ mov [mmx_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je sse_xmmreg_xmmreg_ok
+ jmp invalid_operand
+maskmovq_instruction:
+ mov cl,8
+ jmp maskmov_instruction
+maskmovdqu_instruction:
+ mov cl,16
+ mov [opcode_prefix],66h
+ maskmov_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],0F7h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,cl
+ jne invalid_operand_size
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ mov bl,al
+ jmp nomem_instruction_ready
+movmskpd_instruction:
+ mov [opcode_prefix],66h
+movmskps_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],50h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ cmp ah,4
+ je movmskps_reg_ok
+ cmp ah,8
+ jne invalid_operand_size
+ cmp [code_type],64
+ jne invalid_operand
+ movmskps_reg_ok:
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je sse_xmmreg_xmmreg_ok
+ jmp invalid_operand
+
+cvtpi2pd_instruction:
+ mov [opcode_prefix],66h
+cvtpi2ps_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je cvtpi_xmmreg_xmmreg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],0
+ je cvtpi_size_ok
+ cmp [operand_size],8
+ jne invalid_operand_size
+ cvtpi_size_ok:
+ jmp instruction_ready
+ cvtpi_xmmreg_xmmreg:
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,8
+ jne invalid_operand_size
+ mov bl,al
+ jmp nomem_instruction_ready
+cvtsi2ss_instruction:
+ mov [opcode_prefix],0F3h
+ jmp cvtsi_instruction
+cvtsi2sd_instruction:
+ mov [opcode_prefix],0F2h
+ cvtsi_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ cvtsi_xmmreg:
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je cvtsi_xmmreg_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],0
+ je cvtsi_size_ok
+ cmp [operand_size],4
+ je cvtsi_size_ok
+ cmp [operand_size],8
+ jne invalid_operand_size
+ call operand_64bit
+ cvtsi_size_ok:
+ jmp instruction_ready
+ cvtsi_xmmreg_reg:
+ lods byte [esi]
+ call convert_register
+ cmp ah,4
+ je cvtsi_xmmreg_reg_store
+ cmp ah,8
+ jne invalid_operand_size
+ call operand_64bit
+ cvtsi_xmmreg_reg_store:
+ mov bl,al
+ jmp nomem_instruction_ready
+cvtps2pi_instruction:
+ mov [mmx_size],8
+ jmp cvtpd_instruction
+cvtpd2pi_instruction:
+ mov [opcode_prefix],66h
+ mov [mmx_size],16
+ cvtpd_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,8
+ jne invalid_operand_size
+ mov [operand_size],0
+ jmp sse_reg
+cvtss2si_instruction:
+ mov [opcode_prefix],0F3h
+ mov [mmx_size],4
+ jmp cvt2si_instruction
+cvtsd2si_instruction:
+ mov [opcode_prefix],0F2h
+ mov [mmx_size],8
+ cvt2si_instruction:
+ mov [extended_code],al
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [operand_size],0
+ cmp ah,4
+ je sse_reg
+ cmp ah,8
+ jne invalid_operand_size
+ call operand_64bit
+ jmp sse_reg
+
+ssse3_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],38h
+ mov [supplemental_code],al
+ jmp mmx_instruction
+palignr_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],3Ah
+ mov [supplemental_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ call make_mmx_prefix
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je palignr_mmreg_mmreg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ jmp mmx_imm8
+ palignr_mmreg_mmreg:
+ lods byte [esi]
+ call convert_mmx_register
+ mov bl,al
+ jmp mmx_nomem_imm8
+amd3dnow_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],0Fh
+ mov byte [value],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,8
+ jne invalid_operand_size
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je amd3dnow_mmreg_mmreg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ call store_instruction_with_imm8
+ jmp instruction_assembled
+ amd3dnow_mmreg_mmreg:
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,8
+ jne invalid_operand_size
+ mov bl,al
+ call store_nomem_instruction
+ mov al,byte [value]
+ stos byte [edi]
+ jmp instruction_assembled
+
+sse4_instruction_38_xmm0:
+ mov [immediate_size],-1
+sse4_instruction_38:
+ mov [mmx_size],16
+ mov [opcode_prefix],66h
+ mov [supplemental_code],al
+ mov al,38h
+ jmp sse_instruction
+sse4_ss_instruction_3a_imm8:
+ mov [immediate_size],1
+ mov [mmx_size],4
+ jmp sse4_instruction_3a_setup
+sse4_sd_instruction_3a_imm8:
+ mov [immediate_size],1
+ mov [mmx_size],8
+ jmp sse4_instruction_3a_setup
+sse4_instruction_3a_imm8:
+ mov [immediate_size],1
+ mov [mmx_size],16
+ sse4_instruction_3a_setup:
+ mov [opcode_prefix],66h
+ mov [supplemental_code],al
+ mov al,3Ah
+ jmp sse_instruction
+pclmulqdq_instruction:
+ mov byte [value],al
+ mov [mmx_size],16
+ mov al,44h
+ jmp sse4_instruction_3a_setup
+extractps_instruction:
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],3Ah
+ mov [supplemental_code],17h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je extractps_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],4
+ je extractps_size_ok
+ cmp [operand_size],0
+ jne invalid_operand_size
+ extractps_size_ok:
+ push edx ebx ecx
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ jmp mmx_imm8
+ extractps_reg:
+ lods byte [esi]
+ call convert_register
+ push eax
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ pop ebx
+ mov al,bh
+ cmp al,4
+ je mmx_nomem_imm8
+ cmp al,8
+ jne invalid_operand_size
+ call operand_64bit
+ jmp mmx_nomem_imm8
+insertps_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ insertps_xmmreg:
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],3Ah
+ mov [supplemental_code],21h
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je insertps_xmmreg_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],4
+ je insertps_size_ok
+ cmp [operand_size],0
+ jne invalid_operand_size
+ insertps_size_ok:
+ jmp mmx_imm8
+ insertps_xmmreg_reg:
+ lods byte [esi]
+ call convert_mmx_register
+ mov bl,al
+ jmp mmx_nomem_imm8
+pextrq_instruction:
+ mov [mmx_size],8
+ jmp pextr_instruction
+pextrd_instruction:
+ mov [mmx_size],4
+ jmp pextr_instruction
+pextrw_instruction:
+ mov [mmx_size],2
+ jmp pextr_instruction
+pextrb_instruction:
+ mov [mmx_size],1
+ pextr_instruction:
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],3Ah
+ mov [supplemental_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je pextr_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[mmx_size]
+ cmp al,[operand_size]
+ je pextr_size_ok
+ cmp [operand_size],0
+ jne invalid_operand_size
+ pextr_size_ok:
+ cmp al,8
+ jne pextr_prefix_ok
+ call operand_64bit
+ pextr_prefix_ok:
+ push edx ebx ecx
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ jmp mmx_imm8
+ pextr_reg:
+ lods byte [esi]
+ call convert_register
+ cmp [mmx_size],4
+ ja pextrq_reg
+ cmp ah,4
+ je pextr_reg_size_ok
+ cmp [code_type],64
+ jne pextr_invalid_size
+ cmp ah,8
+ je pextr_reg_size_ok
+ pextr_invalid_size:
+ jmp invalid_operand_size
+ pextrq_reg:
+ cmp ah,8
+ jne pextr_invalid_size
+ call operand_64bit
+ pextr_reg_size_ok:
+ mov [operand_size],0
+ push eax
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ mov ebx,eax
+ pop eax
+ mov [postbyte_register],al
+ mov al,ah
+ cmp [mmx_size],2
+ jne pextr_reg_store
+ mov [opcode_prefix],0
+ mov [extended_code],0C5h
+ call make_mmx_prefix
+ jmp mmx_nomem_imm8
+ pextr_reg_store:
+ cmp bh,16
+ jne invalid_operand_size
+ xchg bl,[postbyte_register]
+ call operand_autodetect
+ jmp mmx_nomem_imm8
+pinsrb_instruction:
+ mov [mmx_size],1
+ jmp pinsr_instruction
+pinsrd_instruction:
+ mov [mmx_size],4
+ jmp pinsr_instruction
+pinsrq_instruction:
+ mov [mmx_size],8
+ call operand_64bit
+ pinsr_instruction:
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],3Ah
+ mov [supplemental_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ pinsr_xmmreg:
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je pinsr_xmmreg_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],0
+ je mmx_imm8
+ mov al,[mmx_size]
+ cmp al,[operand_size]
+ je mmx_imm8
+ jmp invalid_operand_size
+ pinsr_xmmreg_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ cmp [mmx_size],8
+ je pinsrq_xmmreg_reg
+ cmp ah,4
+ je mmx_nomem_imm8
+ jmp invalid_operand_size
+ pinsrq_xmmreg_reg:
+ cmp ah,8
+ je mmx_nomem_imm8
+ jmp invalid_operand_size
+pmovsxbw_instruction:
+ mov [mmx_size],8
+ jmp pmovsx_instruction
+pmovsxbd_instruction:
+ mov [mmx_size],4
+ jmp pmovsx_instruction
+pmovsxbq_instruction:
+ mov [mmx_size],2
+ jmp pmovsx_instruction
+pmovsxwd_instruction:
+ mov [mmx_size],8
+ jmp pmovsx_instruction
+pmovsxwq_instruction:
+ mov [mmx_size],4
+ jmp pmovsx_instruction
+pmovsxdq_instruction:
+ mov [mmx_size],8
+ pmovsx_instruction:
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],38h
+ mov [supplemental_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je pmovsx_xmmreg_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ cmp [operand_size],0
+ je instruction_ready
+ mov al,[mmx_size]
+ cmp al,[operand_size]
+ jne invalid_operand_size
+ jmp instruction_ready
+ pmovsx_xmmreg_reg:
+ lods byte [esi]
+ call convert_xmm_register
+ mov bl,al
+ jmp nomem_instruction_ready
+
+fxsave_instruction_64bit:
+ call operand_64bit
+fxsave_instruction:
+ mov [extended_code],0AEh
+ mov [base_code],0Fh
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov ah,[operand_size]
+ or ah,ah
+ jz fxsave_size_ok
+ mov al,[postbyte_register]
+ cmp al,111b
+ je clflush_size_check
+ cmp al,10b
+ jb invalid_operand_size
+ cmp al,11b
+ ja invalid_operand_size
+ cmp ah,4
+ jne invalid_operand_size
+ jmp fxsave_size_ok
+ clflush_size_check:
+ cmp ah,1
+ jne invalid_operand_size
+ fxsave_size_ok:
+ jmp instruction_ready
+prefetch_instruction:
+ mov [extended_code],18h
+ prefetch_mem_8bit:
+ mov [base_code],0Fh
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ or ah,ah
+ jz prefetch_size_ok
+ cmp ah,1
+ jne invalid_operand_size
+ prefetch_size_ok:
+ call get_address
+ jmp instruction_ready
+amd_prefetch_instruction:
+ mov [extended_code],0Dh
+ jmp prefetch_mem_8bit
+fence_instruction:
+ mov bl,al
+ mov ax,0AE0Fh
+ stos word [edi]
+ mov al,bl
+ stos byte [edi]
+ jmp instruction_assembled
+pause_instruction:
+ mov ax,90F3h
+ stos word [edi]
+ jmp instruction_assembled
+movntq_instruction:
+ mov [mmx_size],8
+ jmp movnt_instruction
+movntpd_instruction:
+ mov [opcode_prefix],66h
+movntps_instruction:
+ mov [mmx_size],16
+ movnt_instruction:
+ mov [extended_code],al
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_mmx_register
+ cmp ah,[mmx_size]
+ jne invalid_operand_size
+ mov [postbyte_register],al
+ jmp instruction_ready
+
+movntsd_instruction:
+ mov [opcode_prefix],0F2h
+ mov [mmx_size],8
+ jmp movnts_instruction
+movntss_instruction:
+ mov [opcode_prefix],0F3h
+ mov [mmx_size],4
+ movnts_instruction:
+ mov [extended_code],al
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ cmp al,[mmx_size]
+ je movnts_size_ok
+ test al,al
+ jnz invalid_operand_size
+ movnts_size_ok:
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ jmp instruction_ready
+
+movnti_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ cmp ah,4
+ je movnti_store
+ cmp ah,8
+ jne invalid_operand_size
+ call operand_64bit
+ movnti_store:
+ mov [postbyte_register],al
+ jmp instruction_ready
+monitor_instruction:
+ mov [postbyte_register],al
+ cmp byte [esi],0
+ je monitor_instruction_store
+ cmp byte [esi],0Fh
+ je monitor_instruction_store
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ cmp ax,0400h
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ cmp ax,0401h
+ jne invalid_operand
+ cmp [postbyte_register],0C8h
+ jne monitor_instruction_store
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ cmp ax,0402h
+ jne invalid_operand
+ monitor_instruction_store:
+ mov ax,010Fh
+ stos word [edi]
+ mov al,[postbyte_register]
+ stos byte [edi]
+ jmp instruction_assembled
+movntdqa_instruction:
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],38h
+ mov [supplemental_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ jmp instruction_ready
+
+extrq_instruction:
+ mov [opcode_prefix],66h
+ mov [base_code],0Fh
+ mov [extended_code],78h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je extrq_xmmreg_xmmreg
+ test ah,not 1
+ jnz invalid_operand_size
+ cmp al,'('
+ jne invalid_operand
+ xor bl,bl
+ xchg bl,[postbyte_register]
+ call store_nomem_instruction
+ call get_byte_value
+ stosb
+ call append_imm8
+ jmp instruction_assembled
+ extrq_xmmreg_xmmreg:
+ inc [extended_code]
+ lods byte [esi]
+ call convert_xmm_register
+ mov bl,al
+ jmp nomem_instruction_ready
+insertq_instruction:
+ mov [opcode_prefix],0F2h
+ mov [base_code],0Fh
+ mov [extended_code],78h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov [postbyte_register],al
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_xmm_register
+ mov bl,al
+ cmp byte [esi],','
+ je insertq_with_imm
+ inc [extended_code]
+ jmp nomem_instruction_ready
+ insertq_with_imm:
+ call store_nomem_instruction
+ call append_imm8
+ call append_imm8
+ jmp instruction_assembled
+
+crc32_instruction:
+ mov [opcode_prefix],0F2h
+ mov [base_code],0Fh
+ mov [extended_code],38h
+ mov [supplemental_code],0F0h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ cmp ah,8
+ je crc32_reg64
+ cmp ah,4
+ jne invalid_operand
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je crc32_reg32_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ test al,al
+ jz crc32_unknown_size
+ cmp al,1
+ je crc32_reg32_mem_store
+ cmp al,4
+ ja invalid_operand_size
+ inc [supplemental_code]
+ call operand_autodetect
+ crc32_reg32_mem_store:
+ jmp instruction_ready
+ crc32_unknown_size:
+ call recoverable_unknown_size
+ jmp crc32_reg32_mem_store
+ crc32_reg32_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ cmp al,1
+ je crc32_reg32_reg_store
+ cmp al,4
+ ja invalid_operand_size
+ inc [supplemental_code]
+ call operand_autodetect
+ crc32_reg32_reg_store:
+ jmp nomem_instruction_ready
+ crc32_reg64:
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ mov [operand_size],0
+ call operand_64bit
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je crc32_reg64_reg
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov ah,[operand_size]
+ mov al,8
+ test ah,ah
+ jz crc32_unknown_size
+ cmp ah,1
+ je crc32_reg32_mem_store
+ cmp ah,al
+ jne invalid_operand_size
+ inc [supplemental_code]
+ jmp crc32_reg32_mem_store
+ crc32_reg64_reg:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,8
+ cmp ah,1
+ je crc32_reg32_reg_store
+ cmp ah,al
+ jne invalid_operand_size
+ inc [supplemental_code]
+ jmp crc32_reg32_reg_store
+popcnt_instruction:
+ mov [opcode_prefix],0F3h
+ jmp bs_instruction
+movbe_instruction:
+ mov [supplemental_code],al
+ mov [extended_code],38h
+ mov [base_code],0Fh
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ je movbe_mem
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_argument
+ call get_address
+ mov al,[operand_size]
+ call operand_autodetect
+ jmp instruction_ready
+ movbe_mem:
+ inc [supplemental_code]
+ call get_address
+ push edx ebx ecx
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ pop ecx ebx edx
+ mov al,[operand_size]
+ call operand_autodetect
+ jmp instruction_ready
+adx_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],38h
+ mov [supplemental_code],0F6h
+ mov [operand_prefix],al
+ call get_reg_mem
+ jc adx_reg_reg
+ mov al,[operand_size]
+ cmp al,4
+ je instruction_ready
+ cmp al,8
+ jne invalid_operand_size
+ call operand_64bit
+ jmp instruction_ready
+ adx_reg_reg:
+ cmp ah,4
+ je nomem_instruction_ready
+ cmp ah,8
+ jne invalid_operand_size
+ call operand_64bit
+ jmp nomem_instruction_ready
+
+simple_vmx_instruction:
+ mov ah,al
+ mov al,0Fh
+ stos byte [edi]
+ mov al,1
+ stos word [edi]
+ jmp instruction_assembled
+vmclear_instruction:
+ mov [opcode_prefix],66h
+ jmp vmx_instruction
+vmxon_instruction:
+ mov [opcode_prefix],0F3h
+vmx_instruction:
+ mov [postbyte_register],al
+ mov [extended_code],0C7h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz vmx_size_ok
+ cmp al,8
+ jne invalid_operand_size
+ vmx_size_ok:
+ mov [base_code],0Fh
+ jmp instruction_ready
+vmread_instruction:
+ mov [extended_code],78h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je vmread_nomem
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ call vmread_check_size
+ jmp vmx_size_ok
+ vmread_nomem:
+ lods byte [esi]
+ call convert_register
+ push eax
+ call vmread_check_size
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ call vmread_check_size
+ pop ebx
+ mov [base_code],0Fh
+ jmp nomem_instruction_ready
+ vmread_check_size:
+ cmp [code_type],64
+ je vmread_long
+ cmp [operand_size],4
+ jne invalid_operand_size
+ ret
+ vmread_long:
+ cmp [operand_size],8
+ jne invalid_operand_size
+ ret
+vmwrite_instruction:
+ mov [extended_code],79h
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ je vmwrite_nomem
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ call vmread_check_size
+ jmp vmx_size_ok
+ vmwrite_nomem:
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov [base_code],0Fh
+ jmp nomem_instruction_ready
+vmx_inv_instruction:
+ mov [opcode_prefix],66h
+ mov [extended_code],38h
+ mov [supplemental_code],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov [postbyte_register],al
+ call vmread_check_size
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,'['
+ jne invalid_operand
+ call get_address
+ mov al,[operand_size]
+ or al,al
+ jz vmx_size_ok
+ cmp al,16
+ jne invalid_operand_size
+ jmp vmx_size_ok
+simple_svm_instruction:
+ push eax
+ mov [base_code],0Fh
+ mov [extended_code],1
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ or al,al
+ jnz invalid_operand
+ simple_svm_detect_size:
+ cmp ah,2
+ je simple_svm_16bit
+ cmp ah,4
+ je simple_svm_32bit
+ cmp [code_type],64
+ jne invalid_operand_size
+ jmp simple_svm_store
+ simple_svm_16bit:
+ cmp [code_type],16
+ je simple_svm_store
+ cmp [code_type],64
+ je invalid_operand_size
+ jmp prefixed_svm_store
+ simple_svm_32bit:
+ cmp [code_type],32
+ je simple_svm_store
+ prefixed_svm_store:
+ mov al,67h
+ stos byte [edi]
+ simple_svm_store:
+ call store_instruction_code
+ pop eax
+ stos byte [edi]
+ jmp instruction_assembled
+skinit_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ cmp ax,0400h
+ jne invalid_operand
+ mov al,0DEh
+ jmp simple_vmx_instruction
+invlpga_instruction:
+ push eax
+ mov [base_code],0Fh
+ mov [extended_code],1
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ or al,al
+ jnz invalid_operand
+ mov bl,ah
+ mov [operand_size],0
+ lods byte [esi]
+ cmp al,','
+ jne invalid_operand
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ cmp ax,0401h
+ jne invalid_operand
+ mov ah,bl
+ jmp simple_svm_detect_size
+
+rdrand_instruction:
+ mov [base_code],0Fh
+ mov [extended_code],0C7h
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ call operand_autodetect
+ jmp nomem_instruction_ready
+rdfsbase_instruction:
+ cmp [code_type],64
+ jne illegal_instruction
+ mov [opcode_prefix],0F3h
+ mov [base_code],0Fh
+ mov [extended_code],0AEh
+ mov [postbyte_register],al
+ lods byte [esi]
+ call get_size_operator
+ cmp al,10h
+ jne invalid_operand
+ lods byte [esi]
+ call convert_register
+ mov bl,al
+ mov al,ah
+ cmp ah,2
+ je invalid_operand_size
+ call operand_autodetect
+ jmp nomem_instruction_ready
+
+xabort_instruction:
+ lods byte [esi]
+ call get_size_operator
+ cmp ah,1
+ ja invalid_operand_size
+ cmp al,'('
+ jne invalid_operand
+ call get_byte_value
+ mov dl,al
+ mov ax,0F8C6h
+ stos word [edi]
+ mov al,dl
+ stos byte [edi]
+ jmp instruction_assembled
+xbegin_instruction:
+ lods byte [esi]
+ cmp al,'('
+ jne invalid_operand
+ mov al,[code_type]
+ cmp al,64
+ je xbegin_64bit
+ cmp al,32
+ je xbegin_32bit
+ xbegin_16bit:
+ call get_address_word_value
+ add edi,4
+ mov ebp,[addressing_space]
+ call calculate_relative_offset
+ sub edi,4
+ shl eax,16
+ mov ax,0F8C7h
+ stos dword [edi]
+ jmp instruction_assembled
+ xbegin_32bit:
+ call get_address_dword_value
+ jmp xbegin_address_ok
+ xbegin_64bit:
+ call get_address_qword_value
+ xbegin_address_ok:
+ add edi,5
+ mov ebp,[addressing_space]
+ call calculate_relative_offset
+ sub edi,5
+ mov edx,eax
+ cwde
+ cmp eax,edx
+ jne xbegin_rel32
+ mov al,66h
+ stos byte [edi]
+ mov eax,edx
+ shl eax,16
+ mov ax,0F8C7h
+ stos dword [edi]
+ jmp instruction_assembled
+ xbegin_rel32:
+ sub edx,1
+ jno xbegin_rel32_ok
+ cmp [code_type],64
+ je relative_jump_out_of_range
+ xbegin_rel32_ok:
+ mov ax,0F8C7h
+ stos word [edi]
+ mov eax,edx
+ stos dword [edi]
+ jmp instruction_assembled
+
+convert_register:
+ mov ah,al
+ shr ah,4
+ and al,0Fh
+ cmp ah,8
+ je match_register_size
+ cmp ah,4
+ ja invalid_operand
+ cmp ah,1
+ ja match_register_size
+ cmp al,4
+ jb match_register_size
+ or ah,ah
+ jz high_byte_register
+ or [rex_prefix],40h
+ match_register_size:
+ cmp ah,[operand_size]
+ je register_size_ok
+ cmp [operand_size],0
+ jne operand_sizes_do_not_match
+ mov [operand_size],ah
+ register_size_ok:
+ ret
+ high_byte_register:
+ mov ah,1
+ or [rex_prefix],80h
+ jmp match_register_size
+convert_fpu_register:
+ mov ah,al
+ shr ah,4
+ and al,111b
+ cmp ah,10
+ jne invalid_operand
+ jmp match_register_size
+convert_mmx_register:
+ mov ah,al
+ shr ah,4
+ cmp ah,0Ch
+ je xmm_register
+ ja invalid_operand
+ and al,111b
+ cmp ah,0Bh
+ jne invalid_operand
+ mov ah,8
+ cmp [vex_required],0
+ jne invalid_operand
+ jmp match_register_size
+ xmm_register:
+ and al,0Fh
+ mov ah,16
+ cmp al,8
+ jb match_register_size
+ cmp [code_type],64
+ jne invalid_operand
+ jmp match_register_size
+convert_xmm_register:
+ mov ah,al
+ shr ah,4
+ cmp ah,0Ch
+ je xmm_register
+ jmp invalid_operand
+get_size_operator:
+ xor ah,ah
+ cmp al,11h
+ jne no_size_operator
+ mov [size_declared],1
+ lods word [esi]
+ xchg al,ah
+ mov [size_override],1
+ cmp ah,[operand_size]
+ je size_operator_ok
+ cmp [operand_size],0
+ jne operand_sizes_do_not_match
+ mov [operand_size],ah
+ size_operator_ok:
+ ret
+ no_size_operator:
+ mov [size_declared],0
+ cmp al,'['
+ jne size_operator_ok
+ mov [size_override],0
+ ret
+get_jump_operator:
+ mov [jump_type],0
+ cmp al,12h
+ jne jump_operator_ok
+ lods word [esi]
+ mov [jump_type],al
+ mov al,ah
+ jump_operator_ok:
+ ret
+get_address:
+ mov [segment_register],0
+ mov [address_size],0
+ mov [free_address_range],0
+ mov al,[code_type]
+ shr al,3
+ mov [value_size],al
+ mov al,[esi]
+ and al,11110000b
+ cmp al,60h
+ jne get_size_prefix
+ lods byte [esi]
+ sub al,60h
+ mov [segment_register],al
+ mov al,[esi]
+ and al,11110000b
+ get_size_prefix:
+ cmp al,70h
+ jne address_size_prefix_ok
+ lods byte [esi]
+ sub al,70h
+ cmp al,2
+ jb invalid_address_size
+ cmp al,8
+ ja invalid_address_size
+ mov [address_size],al
+ mov [value_size],al
+ address_size_prefix_ok:
+ call calculate_address
+ cmp byte [esi-1],']'
+ jne invalid_address
+ mov [address_high],edx
+ mov edx,eax
+ cmp [code_type],64
+ jne address_ok
+ or bx,bx
+ jnz address_ok
+ test ch,0Fh
+ jnz address_ok
+ calculate_relative_address:
+ mov edx,[address_symbol]
+ mov [symbol_identifier],edx
+ mov edx,[address_high]
+ mov ebp,[addressing_space]
+ call calculate_relative_offset
+ mov [address_high],edx
+ cdq
+ cmp edx,[address_high]
+ je address_high_ok
+ call recoverable_overflow
+ address_high_ok:
+ mov edx,eax
+ ror ecx,16
+ mov cl,[value_type]
+ rol ecx,16
+ mov bx,0FF00h
+ address_ok:
+ ret
+operand_16bit:
+ cmp [code_type],16
+ je size_prefix_ok
+ mov [operand_prefix],66h
+ ret
+operand_32bit:
+ cmp [code_type],16
+ jne size_prefix_ok
+ mov [operand_prefix],66h
+ size_prefix_ok:
+ ret
+operand_64bit:
+ cmp [code_type],64
+ jne illegal_instruction
+ or [rex_prefix],48h
+ ret
+operand_autodetect:
+ cmp al,2
+ je operand_16bit
+ cmp al,4
+ je operand_32bit
+ cmp al,8
+ je operand_64bit
+ jmp invalid_operand_size
+store_segment_prefix_if_necessary:
+ mov al,[segment_register]
+ or al,al
+ jz segment_prefix_ok
+ cmp al,4
+ ja segment_prefix_386
+ cmp [code_type],64
+ je segment_prefix_ok
+ cmp al,3
+ je ss_prefix
+ jb segment_prefix_86
+ cmp bl,25h
+ je segment_prefix_86
+ cmp bh,25h
+ je segment_prefix_86
+ cmp bh,45h
+ je segment_prefix_86
+ cmp bh,44h
+ je segment_prefix_86
+ ret
+ ss_prefix:
+ cmp bl,25h
+ je segment_prefix_ok
+ cmp bh,25h
+ je segment_prefix_ok
+ cmp bh,45h
+ je segment_prefix_ok
+ cmp bh,44h
+ je segment_prefix_ok
+ jmp segment_prefix_86
+store_segment_prefix:
+ mov al,[segment_register]
+ or al,al
+ jz segment_prefix_ok
+ cmp al,5
+ jae segment_prefix_386
+ segment_prefix_86:
+ dec al
+ shl al,3
+ add al,26h
+ stos byte [edi]
+ jmp segment_prefix_ok
+ segment_prefix_386:
+ add al,64h-5
+ stos byte [edi]
+ segment_prefix_ok:
+ ret
+store_instruction_code:
+ cmp [vex_required],0
+ jne store_vex_instruction_code
+ mov al,[operand_prefix]
+ or al,al
+ jz operand_prefix_ok
+ stos byte [edi]
+ operand_prefix_ok:
+ mov al,[opcode_prefix]
+ or al,al
+ jz opcode_prefix_ok
+ stos byte [edi]
+ opcode_prefix_ok:
+ mov al,[rex_prefix]
+ test al,40h
+ jz rex_prefix_ok
+ cmp [code_type],64
+ jne invalid_operand
+ test al,0B0h
+ jnz disallowed_combination_of_registers
+ stos byte [edi]
+ rex_prefix_ok:
+ mov al,[base_code]
+ stos byte [edi]
+ cmp al,0Fh
+ jne instruction_code_ok
+ store_extended_code:
+ mov al,[extended_code]
+ stos byte [edi]
+ cmp al,38h
+ je store_supplemental_code
+ cmp al,3Ah
+ je store_supplemental_code
+ instruction_code_ok:
+ ret
+ store_supplemental_code:
+ mov al,[supplemental_code]
+ stos byte [edi]
+ ret
+store_nomem_instruction:
+ test [postbyte_register],1000b
+ jz nomem_reg_code_ok
+ or [rex_prefix],44h
+ and [postbyte_register],111b
+ nomem_reg_code_ok:
+ test bl,1000b
+ jz nomem_rm_code_ok
+ or [rex_prefix],41h
+ and bl,111b
+ nomem_rm_code_ok:
+ call store_instruction_code
+ mov al,[postbyte_register]
+ shl al,3
+ or al,bl
+ or al,11000000b
+ stos byte [edi]
+ ret
+store_instruction:
+ mov [current_offset],edi
+ test [postbyte_register],1000b
+ jz reg_code_ok
+ or [rex_prefix],44h
+ and [postbyte_register],111b
+ reg_code_ok:
+ cmp [code_type],64
+ jne address_value_ok
+ xor eax,eax
+ bt edx,31
+ sbb eax,[address_high]
+ jz address_value_ok
+ cmp [address_high],0
+ jne address_value_out_of_range
+ test ch,44h
+ jnz address_value_ok
+ test bx,8080h
+ jz address_value_ok
+ address_value_out_of_range:
+ call recoverable_overflow
+ address_value_ok:
+ call store_segment_prefix_if_necessary
+ test [vex_required],4
+ jnz address_vsib
+ or bx,bx
+ jz address_immediate
+ cmp bx,0F800h
+ je address_rip_based
+ cmp bx,0F400h
+ je address_eip_based
+ cmp bx,0FF00h
+ je address_relative
+ mov al,bl
+ or al,bh
+ and al,11110000b
+ cmp al,80h
+ je postbyte_64bit
+ cmp al,40h
+ je postbyte_32bit
+ cmp al,20h
+ jne invalid_address
+ cmp [code_type],64
+ je invalid_address_size
+ call address_16bit_prefix
+ call store_instruction_code
+ cmp bl,bh
+ jbe determine_16bit_address
+ xchg bl,bh
+ determine_16bit_address:
+ cmp bx,2600h
+ je address_si
+ cmp bx,2700h
+ je address_di
+ cmp bx,2300h
+ je address_bx
+ cmp bx,2500h
+ je address_bp
+ cmp bx,2625h
+ je address_bp_si
+ cmp bx,2725h
+ je address_bp_di
+ cmp bx,2723h
+ je address_bx_di
+ cmp bx,2623h
+ jne invalid_address
+ address_bx_si:
+ xor al,al
+ jmp postbyte_16bit
+ address_bx_di:
+ mov al,1
+ jmp postbyte_16bit
+ address_bp_si:
+ mov al,10b
+ jmp postbyte_16bit
+ address_bp_di:
+ mov al,11b
+ jmp postbyte_16bit
+ address_si:
+ mov al,100b
+ jmp postbyte_16bit
+ address_di:
+ mov al,101b
+ jmp postbyte_16bit
+ address_bx:
+ mov al,111b
+ jmp postbyte_16bit
+ address_bp:
+ mov al,110b
+ postbyte_16bit:
+ test ch,22h
+ jnz address_16bit_value
+ or ch,ch
+ jnz address_sizes_do_not_agree
+ cmp edx,10000h
+ jge value_out_of_range
+ cmp edx,-8000h
+ jl value_out_of_range
+ or dx,dx
+ jz address
+ cmp dx,80h
+ jb address_8bit_value
+ cmp dx,-80h
+ jae address_8bit_value
+ address_16bit_value:
+ or al,10000000b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ mov eax,edx
+ stos word [edi]
+ ret
+ address_8bit_value:
+ or al,01000000b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ mov al,dl
+ stos byte [edi]
+ cmp dx,80h
+ jge value_out_of_range
+ cmp dx,-80h
+ jl value_out_of_range
+ ret
+ address:
+ cmp al,110b
+ je address_8bit_value
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ ret
+ address_vsib:
+ mov al,bl
+ shr al,4
+ cmp al,0Ch
+ je vector_index_ok
+ cmp al,0Dh
+ jne invalid_address
+ vector_index_ok:
+ mov al,bh
+ shr al,4
+ cmp al,4
+ je postbyte_32bit
+ cmp [code_type],64
+ je address_prefix_ok
+ test al,al
+ jnz invalid_address
+ postbyte_32bit:
+ call address_32bit_prefix
+ jmp address_prefix_ok
+ postbyte_64bit:
+ cmp [code_type],64
+ jne invalid_address_size
+ address_prefix_ok:
+ cmp bl,44h
+ je invalid_address
+ cmp bl,84h
+ je invalid_address
+ test bh,1000b
+ jz base_code_ok
+ or [rex_prefix],41h
+ base_code_ok:
+ test bl,1000b
+ jz index_code_ok
+ or [rex_prefix],42h
+ index_code_ok:
+ call store_instruction_code
+ or cl,cl
+ jz only_base_register
+ base_and_index:
+ mov al,100b
+ xor ah,ah
+ cmp cl,1
+ je scale_ok
+ cmp cl,2
+ je scale_1
+ cmp cl,4
+ je scale_2
+ or ah,11000000b
+ jmp scale_ok
+ scale_2:
+ or ah,10000000b
+ jmp scale_ok
+ scale_1:
+ or ah,01000000b
+ scale_ok:
+ or bh,bh
+ jz only_index_register
+ and bl,111b
+ shl bl,3
+ or ah,bl
+ and bh,111b
+ or ah,bh
+ sib_ready:
+ test ch,44h
+ jnz sib_address_32bit_value
+ test ch,88h
+ jnz sib_address_32bit_value
+ or ch,ch
+ jnz address_sizes_do_not_agree
+ cmp bh,5
+ je address_value
+ or edx,edx
+ jz sib_address
+ address_value:
+ cmp edx,80h
+ jb sib_address_8bit_value
+ cmp edx,-80h
+ jae sib_address_8bit_value
+ sib_address_32bit_value:
+ or al,10000000b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos word [edi]
+ jmp store_address_32bit_value
+ sib_address_8bit_value:
+ or al,01000000b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos word [edi]
+ mov al,dl
+ stos byte [edi]
+ cmp edx,80h
+ jge value_out_of_range
+ cmp edx,-80h
+ jl value_out_of_range
+ ret
+ sib_address:
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos word [edi]
+ ret
+ only_index_register:
+ or ah,101b
+ and bl,111b
+ shl bl,3
+ or ah,bl
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos word [edi]
+ test ch,44h
+ jnz store_address_32bit_value
+ test ch,88h
+ jnz store_address_32bit_value
+ or ch,ch
+ jnz invalid_address_size
+ jmp store_address_32bit_value
+ zero_index_register:
+ mov bl,4
+ mov cl,1
+ jmp base_and_index
+ only_base_register:
+ mov al,bh
+ and al,111b
+ cmp al,4
+ je zero_index_register
+ test ch,44h
+ jnz simple_address_32bit_value
+ test ch,88h
+ jnz simple_address_32bit_value
+ or ch,ch
+ jnz address_sizes_do_not_agree
+ or edx,edx
+ jz simple_address
+ cmp edx,80h
+ jb simple_address_8bit_value
+ cmp edx,-80h
+ jae simple_address_8bit_value
+ simple_address_32bit_value:
+ or al,10000000b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ jmp store_address_32bit_value
+ simple_address_8bit_value:
+ or al,01000000b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ mov al,dl
+ stos byte [edi]
+ cmp edx,80h
+ jge value_out_of_range
+ cmp edx,-80h
+ jl value_out_of_range
+ ret
+ simple_address:
+ cmp al,5
+ je simple_address_8bit_value
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ ret
+ address_immediate:
+ cmp [code_type],64
+ je address_immediate_sib
+ test ch,44h
+ jnz address_immediate_32bit
+ test ch,88h
+ jnz address_immediate_32bit
+ test ch,22h
+ jnz address_immediate_16bit
+ or ch,ch
+ jnz invalid_address_size
+ cmp [code_type],16
+ je addressing_16bit
+ address_immediate_32bit:
+ call address_32bit_prefix
+ call store_instruction_code
+ store_immediate_address:
+ mov al,101b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ store_address_32bit_value:
+ test ch,0F0h
+ jz address_32bit_relocation_ok
+ mov eax,ecx
+ shr eax,16
+ cmp al,4
+ jne address_32bit_relocation
+ mov al,2
+ address_32bit_relocation:
+ xchg [value_type],al
+ mov ebx,[address_symbol]
+ xchg ebx,[symbol_identifier]
+ call mark_relocation
+ mov [value_type],al
+ mov [symbol_identifier],ebx
+ address_32bit_relocation_ok:
+ mov eax,edx
+ stos dword [edi]
+ ret
+ store_address_64bit_value:
+ test ch,0F0h
+ jz address_64bit_relocation_ok
+ mov eax,ecx
+ shr eax,16
+ xchg [value_type],al
+ mov ebx,[address_symbol]
+ xchg ebx,[symbol_identifier]
+ call mark_relocation
+ mov [value_type],al
+ mov [symbol_identifier],ebx
+ address_64bit_relocation_ok:
+ mov eax,edx
+ stos dword [edi]
+ mov eax,[address_high]
+ stos dword [edi]
+ ret
+ address_immediate_sib:
+ test ch,44h
+ jnz address_immediate_sib_32bit
+ test ch,not 88h
+ jnz invalid_address_size
+ address_immediate_sib_store:
+ call store_instruction_code
+ mov al,100b
+ mov ah,100101b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos word [edi]
+ jmp store_address_32bit_value
+ address_immediate_sib_32bit:
+ test ecx,0FF0000h
+ jnz address_immediate_sib_nosignextend
+ test edx,80000000h
+ jz address_immediate_sib_store
+ address_immediate_sib_nosignextend:
+ call address_32bit_prefix
+ jmp address_immediate_sib_store
+ address_eip_based:
+ mov al,67h
+ stos byte [edi]
+ address_rip_based:
+ cmp [code_type],64
+ jne invalid_address
+ call store_instruction_code
+ jmp store_immediate_address
+ address_relative:
+ call store_instruction_code
+ movzx eax,[immediate_size]
+ add eax,edi
+ sub eax,[current_offset]
+ add eax,5
+ sub edx,eax
+ jo value_out_of_range
+ mov al,101b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ shr ecx,16
+ xchg [value_type],cl
+ mov ebx,[address_symbol]
+ xchg ebx,[symbol_identifier]
+ mov eax,edx
+ call mark_relocation
+ mov [value_type],cl
+ mov [symbol_identifier],ebx
+ stos dword [edi]
+ ret
+ addressing_16bit:
+ cmp edx,10000h
+ jge address_immediate_32bit
+ cmp edx,-8000h
+ jl address_immediate_32bit
+ movzx edx,dx
+ address_immediate_16bit:
+ call address_16bit_prefix
+ call store_instruction_code
+ mov al,110b
+ mov cl,[postbyte_register]
+ shl cl,3
+ or al,cl
+ stos byte [edi]
+ mov eax,edx
+ stos word [edi]
+ cmp edx,10000h
+ jge value_out_of_range
+ cmp edx,-8000h
+ jl value_out_of_range
+ ret
+ address_16bit_prefix:
+ cmp [code_type],16
+ je instruction_prefix_ok
+ mov al,67h
+ stos byte [edi]
+ ret
+ address_32bit_prefix:
+ cmp [code_type],32
+ je instruction_prefix_ok
+ mov al,67h
+ stos byte [edi]
+ instruction_prefix_ok:
+ ret
+store_instruction_with_imm8:
+ mov [immediate_size],1
+ call store_instruction
+ mov al,byte [value]
+ stos byte [edi]
+ ret
+store_instruction_with_imm16:
+ mov [immediate_size],2
+ call store_instruction
+ mov ax,word [value]
+ call mark_relocation
+ stos word [edi]
+ ret
+store_instruction_with_imm32:
+ mov [immediate_size],4
+ call store_instruction
+ mov eax,dword [value]
+ call mark_relocation
+ stos dword [edi]
+ ret
diff --git a/samples/C#/Index.cshtml b/samples/C#/Index.cshtml
new file mode 100644
index 00000000..f7aa29c6
--- /dev/null
+++ b/samples/C#/Index.cshtml
@@ -0,0 +1,45 @@
+@{
+ ViewBag.Title = "Home Page";
+}
+@section featured {
+
+
+
+ @ViewBag.Title.
+ @ViewBag.Message
+
+
+ To learn more about ASP.NET MVC visit
+ http://asp.net/mvc.
+ The page features videos, tutorials, and samples to help you get the most from ASP.NET MVC.
+ If you have any questions about ASP.NET MVC visit
+ our forums.
+
+
+
+}
+We suggest the following:
+
+ -
+
Getting Started
+ ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
+ enables a clean separation of concerns and that gives you full control over markup
+ for enjoyable, agile development. ASP.NET MVC includes many features that enable
+ fast, TDD-friendly development for creating sophisticated applications that use
+ the latest web standards.
+ Learn more…
+
+
+ -
+
Add NuGet packages and jump-start your coding
+ NuGet makes it easy to install and update free libraries and tools.
+ Learn more…
+
+
+ -
+
Find Web Hosting
+ You can easily find a web hosting company that offers the right mix of features
+ and price for your applications.
+ Learn more…
+
+
diff --git a/samples/C#/Program.cs b/samples/C#/Program.cs
new file mode 100644
index 00000000..20e24850
--- /dev/null
+++ b/samples/C#/Program.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace LittleSampleApp
+{
+ ///
+ /// Just what it says on the tin. A little sample application for Linguist to try out.
+ ///
+ ///
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.WriteLine("Hello, I am a little sample application to test GitHub's Linguist module.");
+ Console.WriteLine("I also include a Razor MVC file just to prove it handles cshtml files now.");
+ }
+ }
+}
diff --git a/samples/C++/CsvStreamer.h b/samples/C++/CsvStreamer.h
new file mode 100644
index 00000000..b15e648d
--- /dev/null
+++ b/samples/C++/CsvStreamer.h
@@ -0,0 +1,42 @@
+#pragma once
+#include
+#include
+#include
+#include "util.h"
+
+using namespace std;
+
+
+#define DEFAULT_DELIMITER ','
+
+
+class CsvStreamer
+{
+ private:
+ ofstream file; // File output stream
+ vector row_buffer; // Buffer which stores a row's data before being flushed/written
+ int fields; // Number of fields (columns)
+ long rows; // Number of rows (records) including header row
+ char delimiter; // Delimiter character; comma by default
+ string sanitize(string); // Returns a string ready for output into the file
+
+ public:
+ CsvStreamer(); // Empty CSV streamer... be sure to open the file before writing!
+ CsvStreamer(string, char); // Same as open(string, char)...
+ CsvStreamer(string); // Opens an output CSV file given a file path/name
+ ~CsvStreamer(); // Ensures the output file is closed and saved
+ void open(string); // Opens an output CSV file given a file path/name (default delimiter)
+ void open(string, char); // Opens an output CSV file given a file path/name and a delimiting character (default comma)
+ void add_field(string); // If still on first line, adds a new field to the header row
+ void save_fields(); // Call this to save the header row; all new writes should be through append()
+ void append(string); // Appends the current row with this data for the next field; quoted only if needed (leading/trailing spaces are trimmed)
+ void append(string, bool); // Like append(string) but can specify whether to trim spaces at either end of the data (false to keep spaces)
+ void append(float); // Appends the current row with this number
+ void append(double); // Appends the current row with this number
+ void append(long); // Appends the current row with this number
+ void append(int); // Appends the current row with this number
+ void writeln(); // Flushes what was in the row buffer into the file (writes the row)
+ void close(); // Saves and closes the file
+ int field_count(); // Gets the number of fields (columns)
+ long row_count(); // Gets the number of records (rows) -- NOT including the header row
+};
diff --git a/samples/C++/Field.h b/samples/C++/Field.h
new file mode 100644
index 00000000..201be118
--- /dev/null
+++ b/samples/C++/Field.h
@@ -0,0 +1,32 @@
+/*****************************************************************************
+* Dwarf Mine - The 13-11 Benchmark
+*
+* Copyright (c) 2013 Bünger, Thomas; Kieschnick, Christian; Kusber,
+* Michael; Lohse, Henning; Wuttke, Nikolai; Xylander, Oliver; Yao, Gary;
+* Zimmermann, Florian
+*
+* Permission is hereby granted, free of charge, to any person obtaining
+* a copy of this software and associated documentation files (the
+* "Software"), to deal in the Software without restriction, including
+* without limitation the rights to use, copy, modify, merge, publish,
+* distribute, sublicense, and/or sell copies of the Software, and to
+* permit persons to whom the Software is furnished to do so, subject to
+* the following conditions:
+*
+* The above copyright notice and this permission notice shall be
+* included in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*****************************************************************************/
+
+#pragma once
+
+enum Field { Free, Black, White, Illegal };
+
+typedef Field Player;
diff --git a/samples/C++/Math.inl b/samples/C++/Math.inl
new file mode 100644
index 00000000..194370a3
--- /dev/null
+++ b/samples/C++/Math.inl
@@ -0,0 +1,530 @@
+/*
+===========================================================================
+The Open Game Libraries.
+Copyright (C) 2007-2010 Lusito Software
+
+Author: Santo Pfingsten (TTK-Bandit)
+Purpose: Math namespace
+-----------------------------------------
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
+===========================================================================
+*/
+
+#ifndef __OG_MATH_INL__
+#define __OG_MATH_INL__
+
+namespace og {
+
+/*
+==============================================================================
+
+ Math
+
+==============================================================================
+*/
+
+/*
+================
+Math::Abs
+================
+*/
+OG_INLINE int Math::Abs( int i ) {
+#if 1
+ if ( i & 0x80000000 )
+ return 0x80000000 - (i & MASK_SIGNED);
+ return i;
+#else
+ int y = x >> 31;
+ return ( ( x ^ y ) - y );
+#endif
+}
+
+/*
+================
+Math::Fabs
+================
+*/
+OG_INLINE float Math::Fabs( float f ) {
+#if 1
+ uInt *pf = reinterpret_cast(&f);
+ *(pf) &= MASK_SIGNED;
+ return f;
+#else
+ return fabsf( f );
+#endif
+}
+
+/*
+================
+Math::Round
+================
+*/
+OG_INLINE float Math::Round( float f ) {
+ return floorf( f + 0.5f );
+}
+
+/*
+================
+Math::Floor
+================
+*/
+OG_INLINE float Math::Floor( float f ) {
+ return floorf( f );
+}
+
+/*
+================
+Math::Ceil
+================
+*/
+OG_INLINE float Math::Ceil( float f ) {
+ return ceilf( f );
+}
+
+/*
+================
+Math::Ftoi
+
+ok since this is SSE, why should the other ftoi be the faster one ?
+and: we might need to add a check for SSE extensions..
+because sse isn't *really* faster (I actually read that GCC does not handle
+SSE extensions perfectly. I'll find the link and send it to you when you're online)
+================
+*/
+OG_INLINE int Math::Ftoi( float f ) {
+ //! @todo needs testing
+ // note: sse function cvttss2si
+#if OG_ASM_MSVC
+ int i;
+#if defined(OG_FTOI_USE_SSE)
+ if( SysInfo::cpu.general.SSE ) {
+ __asm cvttss2si eax, f
+ __asm mov i, eax
+ return i;
+ } else
+#endif
+ {
+ __asm fld f
+ __asm fistp i
+ //__asm mov eax, i // do we need this ? O_o
+ }
+ return i;
+#elif OG_ASM_GNU
+ int i;
+#if defined(OG_FTOI_USE_SSE)
+ if( SysInfo::cpu.general.SSE ) {
+ __asm__ __volatile__( "cvttss2si %1 \n\t"
+ : "=m" (i)
+ : "m" (f)
+ );
+ } else
+#endif
+ {
+ __asm__ __volatile__( "flds %1 \n\t"
+ "fistpl %0 \n\t"
+ : "=m" (i)
+ : "m" (f)
+ );
+ }
+ return i;
+#else
+ // we use c++ cast instead of c cast (not sure why id did that)
+ return static_cast(f);
+#endif
+}
+
+/*
+================
+Math::FtoiFast
+================
+*/
+OG_INLINE int Math::FtoiFast( float f ) {
+#if OG_ASM_MSVC
+ int i;
+ __asm fld f
+ __asm fistp i
+ //__asm mov eax, i // do we need this ? O_o
+ return i;
+#elif OG_ASM_GNU
+ int i;
+ __asm__ __volatile__( "flds %1 \n\t"
+ "fistpl %0 \n\t"
+ : "=m" (i)
+ : "m" (f)
+ );
+ return i;
+#else
+ // we use c++ cast instead of c cast (not sure why id did that)
+ return static_cast(f);
+#endif
+}
+
+/*
+================
+Math::Ftol
+================
+*/
+OG_INLINE long Math::Ftol( float f ) {
+#if OG_ASM_MSVC
+ long i;
+ __asm fld f
+ __asm fistp i
+ //__asm mov eax, i // do we need this ? O_o
+ return i;
+#elif OG_ASM_GNU
+ long i;
+ __asm__ __volatile__( "flds %1 \n\t"
+ "fistpl %0 \n\t"
+ : "=m" (i)
+ : "m" (f)
+ );
+ return i;
+#else
+ // we use c++ cast instead of c cast (not sure why id did that)
+ return static_cast(f);
+#endif
+}
+
+/*
+================
+Math::Sign
+================
+*/
+OG_INLINE float Math::Sign( float f ) {
+ if ( f > 0.0f )
+ return 1.0f;
+ if ( f < 0.0f )
+ return -1.0f;
+ return 0.0f;
+}
+
+/*
+================
+Math::Fmod
+================
+*/
+OG_INLINE float Math::Fmod( float numerator, float denominator ) {
+ return fmodf( numerator, denominator );
+}
+
+/*
+================
+Math::Modf
+================
+*/
+OG_INLINE float Math::Modf( float f, float& i ) {
+ return modff( f, &i );
+}
+OG_INLINE float Math::Modf( float f ) {
+ float i;
+ return modff( f, &i );
+}
+
+/*
+================
+Math::Sqrt
+================
+*/
+OG_INLINE float Math::Sqrt( float f ) {
+ return sqrtf( f );
+}
+
+/*
+================
+Math::InvSqrt
+
+Cannot be 0.0f
+================
+*/
+OG_INLINE float Math::InvSqrt( float f ) {
+ OG_ASSERT( f != 0.0f );
+ return 1.0f / sqrtf( f );
+}
+
+/*
+================
+Math::RSqrt
+
+Can be 0.0f
+================
+*/
+OG_INLINE float Math::RSqrt( float f ) {
+ float g = 0.5f * f;
+ int i = *reinterpret_cast(&f);
+
+ // do a guess
+ i = 0x5f375a86 - ( i>>1 );
+ f = *reinterpret_cast(&i);
+
+ // Newtons calculation
+ f = f * ( 1.5f - g * f * f );
+ return f;
+}
+
+/*
+================
+Math::Log/Log2/Log10
+
+Log of 0 is bad.
+I've also heard you're not really
+supposed to do log of negatives, yet
+they work fine.
+================
+*/
+OG_INLINE float Math::Log( float f ) {
+ OG_ASSERT( f != 0.0f );
+ return logf( f );
+}
+OG_INLINE float Math::Log2( float f ) {
+ OG_ASSERT( f != 0.0f );
+ return INV_LN_2 * logf( f );
+}
+OG_INLINE float Math::Log10( float f ) {
+ OG_ASSERT( f != 0.0f );
+ return INV_LN_10 * logf( f );
+}
+
+/*
+================
+Math::Pow
+================
+*/
+OG_INLINE float Math::Pow( float base, float exp ) {
+ return powf( base, exp );
+}
+
+/*
+================
+Math::Exp
+================
+*/
+OG_INLINE float Math::Exp( float f ) {
+ return expf( f );
+}
+
+/*
+================
+Math::IsPowerOfTwo
+================
+*/
+OG_INLINE bool Math::IsPowerOfTwo( int x ) {
+ // This is the faster of the two known methods
+ // with the x > 0 check moved to the beginning
+ return x > 0 && ( x & ( x - 1 ) ) == 0;
+}
+
+/*
+================
+Math::HigherPowerOfTwo
+================
+*/
+OG_INLINE int Math::HigherPowerOfTwo( int x ) {
+ x--;
+ x |= x >> 1;
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+ return x + 1;
+}
+
+/*
+================
+Math::LowerPowerOfTwo
+================
+*/
+OG_INLINE int Math::LowerPowerOfTwo( int x ) {
+ return HigherPowerOfTwo( x ) >> 1;
+}
+
+/*
+================
+Math::FloorPowerOfTwo
+================
+*/
+OG_INLINE int Math::FloorPowerOfTwo( int x ) {
+ return IsPowerOfTwo( x ) ? x : LowerPowerOfTwo( x );
+}
+
+/*
+================
+Math::CeilPowerOfTwo
+================
+*/
+OG_INLINE int Math::CeilPowerOfTwo( int x ) {
+ return IsPowerOfTwo( x ) ? x : HigherPowerOfTwo( x );
+}
+
+/*
+================
+Math::ClosestPowerOfTwo
+================
+*/
+OG_INLINE int Math::ClosestPowerOfTwo( int x ) {
+ if ( IsPowerOfTwo( x ) )
+ return x;
+ int high = HigherPowerOfTwo( x );
+ int low = high >> 1;
+ return ((high-x) < (x-low)) ? high : low;
+}
+
+/*
+================
+Math::Digits
+================
+*/
+OG_INLINE int Math::Digits( int x ) {
+ int digits = 1;
+ int step = 10;
+ while (step <= x) {
+ digits++;
+ step *= 10;
+ }
+ return digits;
+}
+
+/*
+================
+Math::Sin/ASin
+================
+*/
+OG_INLINE float Math::Sin( float f ) {
+ return sinf( f );
+}
+OG_INLINE float Math::ASin( float f ) {
+ if ( f <= -1.0f )
+ return -HALF_PI;
+ if ( f >= 1.0f )
+ return HALF_PI;
+ return asinf( f );
+}
+
+/*
+================
+Math::Cos/ACos
+================
+*/
+OG_INLINE float Math::Cos( float f ) {
+ return cosf( f );
+}
+OG_INLINE float Math::ACos( float f ) {
+ if ( f <= -1.0f )
+ return PI;
+ if ( f >= 1.0f )
+ return 0.0f;
+ return acosf( f );
+}
+
+/*
+================
+Math::Tan/ATan
+================
+*/
+OG_INLINE float Math::Tan( float f ) {
+ return tanf( f );
+}
+OG_INLINE float Math::ATan( float f ) {
+ return atanf( f );
+}
+OG_INLINE float Math::ATan( float f1, float f2 ) {
+ return atan2f( f1, f2 );
+}
+
+/*
+================
+Math::SinCos
+================
+*/
+OG_INLINE void Math::SinCos( float f, float &s, float &c ) {
+#if OG_ASM_MSVC
+ // sometimes assembler is just waaayy faster
+ _asm {
+ fld f
+ fsincos
+ mov ecx, c
+ mov edx, s
+ fstp dword ptr [ecx]
+ fstp dword ptr [edx]
+ }
+#elif OG_ASM_GNU
+ asm ("fsincos" : "=t" (c), "=u" (s) : "0" (f));
+#else
+ s = Sin(f);
+ c = Sqrt( 1.0f - s * s ); // faster than calling Cos(f)
+#endif
+}
+
+/*
+================
+Math::Deg2Rad
+================
+*/
+OG_INLINE float Math::Deg2Rad( float f ) {
+ return f * DEG_TO_RAD;
+}
+
+/*
+================
+Math::Rad2Deg
+================
+*/
+OG_INLINE float Math::Rad2Deg( float f ) {
+ return f * RAD_TO_DEG;
+}
+
+/*
+================
+Math::Square
+================
+*/
+OG_INLINE float Math::Square( float v ) {
+ return v * v;
+}
+
+/*
+================
+Math::Cube
+================
+*/
+OG_INLINE float Math::Cube( float v ) {
+ return v * v * v;
+}
+
+/*
+================
+Math::Sec2Ms
+================
+*/
+OG_INLINE int Math::Sec2Ms( int sec ) {
+ return sec * 1000;
+}
+
+/*
+================
+Math::Ms2Sec
+================
+*/
+OG_INLINE int Math::Ms2Sec( int ms ) {
+ return FtoiFast( ms * 0.001f );
+}
+
+}
+
+#endif
diff --git a/samples/C++/Types.h b/samples/C++/Types.h
new file mode 100644
index 00000000..e2675538
--- /dev/null
+++ b/samples/C++/Types.h
@@ -0,0 +1,32 @@
+/*****************************************************************************
+* Dwarf Mine - The 13-11 Benchmark
+*
+* Copyright (c) 2013 Bünger, Thomas; Kieschnick, Christian; Kusber,
+* Michael; Lohse, Henning; Wuttke, Nikolai; Xylander, Oliver; Yao, Gary;
+* Zimmermann, Florian
+*
+* Permission is hereby granted, free of charge, to any person obtaining
+* a copy of this software and associated documentation files (the
+* "Software"), to deal in the Software without restriction, including
+* without limitation the rights to use, copy, modify, merge, publish,
+* distribute, sublicense, and/or sell copies of the Software, and to
+* permit persons to whom the Software is furnished to do so, subject to
+* the following conditions:
+*
+* The above copyright notice and this permission notice shall be
+* included in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*****************************************************************************/
+
+#pragma once
+
+#include
+
+typedef uint32_t smallPrime_t;
diff --git a/samples/C++/bcm2835.h b/samples/C++/bcm2835.h
new file mode 100644
index 00000000..e5330933
--- /dev/null
+++ b/samples/C++/bcm2835.h
@@ -0,0 +1,1129 @@
+// bcm2835.h
+//
+// C and C++ support for Broadcom BCM 2835 as used in Raspberry Pi
+//
+// Author: Mike McCauley
+// Copyright (C) 2011-2013 Mike McCauley
+// $Id: bcm2835.h,v 1.8 2013/02/15 22:06:09 mikem Exp mikem $
+//
+/// \mainpage C library for Broadcom BCM 2835 as used in Raspberry Pi
+///
+/// This is a C library for Raspberry Pi (RPi). It provides access to
+/// GPIO and other IO functions on the Broadcom BCM 2835 chip,
+/// allowing access to the GPIO pins on the
+/// 26 pin IDE plug on the RPi board so you can control and interface with various external devices.
+///
+/// It provides functions for reading digital inputs and setting digital outputs, using SPI and I2C,
+/// and for accessing the system timers.
+/// Pin event detection is supported by polling (interrupts are not supported).
+///
+/// It is C++ compatible, and installs as a header file and non-shared library on
+/// any Linux-based distro (but clearly is no use except on Raspberry Pi or another board with
+/// BCM 2835).
+///
+/// The version of the package that this documentation refers to can be downloaded
+/// from http://www.airspayce.com/mikem/bcm2835/bcm2835-1.26.tar.gz
+/// You can find the latest version at http://www.airspayce.com/mikem/bcm2835
+///
+/// Several example programs are provided.
+///
+/// Based on data in http://elinux.org/RPi_Low-level_peripherals and
+/// http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
+/// and http://www.scribd.com/doc/101830961/GPIO-Pads-Control2
+///
+/// You can also find online help and discussion at http://groups.google.com/group/bcm2835
+/// Please use that group for all questions and discussions on this topic.
+/// Do not contact the author directly, unless it is to discuss commercial licensing.
+///
+/// Tested on debian6-19-04-2012, 2012-07-15-wheezy-raspbian and Occidentalisv01
+/// CAUTION: it has been observed that when detect enables such as bcm2835_gpio_len()
+/// are used and the pin is pulled LOW
+/// it can cause temporary hangs on 2012-07-15-wheezy-raspbian and Occidentalisv01.
+/// Reason for this is not yet determined, but suspect that an interrupt handler is
+/// hitting a hard loop on those OSs.
+/// If you must use bcm2835_gpio_len() and friends, make sure you disable the pins with
+/// bcm2835_gpio_cler_len() and friends after use.
+///
+/// \par Installation
+///
+/// This library consists of a single non-shared library and header file, which will be
+/// installed in the usual places by make install
+///
+/// \code
+/// # download the latest version of the library, say bcm2835-1.xx.tar.gz, then:
+/// tar zxvf bcm2835-1.xx.tar.gz
+/// cd bcm2835-1.xx
+/// ./configure
+/// make
+/// sudo make check
+/// sudo make install
+/// \endcode
+///
+/// \par Physical Addresses
+///
+/// The functions bcm2835_peri_read(), bcm2835_peri_write() and bcm2835_peri_set_bits()
+/// are low level peripheral register access functions. They are designed to use
+/// physical addresses as described in section 1.2.3 ARM physical addresses
+/// of the BCM2835 ARM Peripherals manual.
+/// Physical addresses range from 0x20000000 to 0x20FFFFFF for peripherals. The bus
+/// addresses for peripherals are set up to map onto the peripheral bus address range starting at
+/// 0x7E000000. Thus a peripheral advertised in the manual at bus address 0x7Ennnnnn is available at
+/// physical address 0x20nnnnnn.
+///
+/// The base address of the various peripheral registers are available with the following
+/// externals:
+/// bcm2835_gpio
+/// bcm2835_pwm
+/// bcm2835_clk
+/// bcm2835_pads
+/// bcm2835_spio0
+/// bcm2835_st
+/// bcm2835_bsc0
+/// bcm2835_bsc1
+///
+/// \par Pin Numbering
+///
+/// The GPIO pin numbering as used by RPi is different to and inconsistent with the underlying
+/// BCM 2835 chip pin numbering. http://elinux.org/RPi_BCM2835_GPIOs
+///
+/// RPi has a 26 pin IDE header that provides access to some of the GPIO pins on the BCM 2835,
+/// as well as power and ground pins. Not all GPIO pins on the BCM 2835 are available on the
+/// IDE header.
+///
+/// RPi Version 2 also has a P5 connector with 4 GPIO pins, 5V, 3.3V and Gnd.
+///
+/// The functions in this library are designed to be passed the BCM 2835 GPIO pin number and _not_
+/// the RPi pin number. There are symbolic definitions for each of the available pins
+/// that you should use for convenience. See \ref RPiGPIOPin.
+///
+/// \par SPI Pins
+///
+/// The bcm2835_spi_* functions allow you to control the BCM 2835 SPI0 interface,
+/// allowing you to send and received data by SPI (Serial Peripheral Interface).
+/// For more information about SPI, see http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus
+///
+/// When bcm2835_spi_begin() is called it changes the bahaviour of the SPI interface pins from their
+/// default GPIO behaviour in order to support SPI. While SPI is in use, you will not be able
+/// to control the state of the SPI pins through the usual bcm2835_spi_gpio_write().
+/// When bcm2835_spi_end() is called, the SPI pins will all revert to inputs, and can then be
+/// configured and controled with the usual bcm2835_gpio_* calls.
+///
+/// The Raspberry Pi GPIO pins used for SPI are:
+///
+/// - P1-19 (MOSI)
+/// - P1-21 (MISO)
+/// - P1-23 (CLK)
+/// - P1-24 (CE0)
+/// - P1-26 (CE1)
+///
+/// \par I2C Pins
+///
+/// The bcm2835_i2c_* functions allow you to control the BCM 2835 BSC interface,
+/// allowing you to send and received data by I2C ("eye-squared cee"; generically referred to as "two-wire interface") .
+/// For more information about I?C, see http://en.wikipedia.org/wiki/I%C2%B2C
+///
+/// The Raspberry Pi V2 GPIO pins used for I2C are:
+///
+/// - P1-03 (SDA)
+/// - P1-05 (SLC)
+///
+/// \par Real Time performance constraints
+///
+/// The bcm2835 is a library for user programs (i.e. they run in 'userland').
+/// Such programs are not part of the kernel and are usually
+/// subject to paging and swapping by the kernel while it does other things besides running your program.
+/// This means that you should not expect to get real-time performance or
+/// real-time timing constraints from such programs. In particular, there is no guarantee that the
+/// bcm2835_delay() and bcm2835_delayMicroseconds() will return after exactly the time requested.
+/// In fact, depending on other activity on the host, IO etc, you might get significantly longer delay times
+/// than the one you asked for. So please dont expect to get exactly the time delay you request.
+///
+/// Arjan reports that you can prevent swapping on Linux with the following code fragment:
+///
+/// \code
+/// struct sched_param sp;
+/// memset(&sp, 0, sizeof(sp));
+/// sp.sched_priority = sched_get_priority_max(SCHED_FIFO);
+/// sched_setscheduler(0, SCHED_FIFO, &sp);
+/// mlockall(MCL_CURRENT | MCL_FUTURE);
+/// \endcode
+///
+/// \par Open Source Licensing GPL V2
+///
+/// This is the appropriate option if you want to share the source code of your
+/// application with everyone you distribute it to, and you also want to give them
+/// the right to share who uses it. If you wish to use this software under Open
+/// Source Licensing, you must contribute all your source code to the open source
+/// community in accordance with the GPL Version 2 when your application is
+/// distributed. See http://www.gnu.org/copyleft/gpl.html and COPYING
+///
+/// \par Acknowledgements
+///
+/// Some of this code has been inspired by Dom and Gert.
+/// The I2C code has been inspired by Alan Barr.
+///
+/// \par Revision History
+///
+/// \version 1.0 Initial release
+/// \version 1.1 Minor bug fixes
+/// \version 1.2 Added support for SPI
+/// \version 1.3 Added bcm2835_spi_transfern()
+/// \version 1.4 Fixed a problem that prevented SPI CE1 being used. Reported by David Robinson.
+/// \version 1.5 Added bcm2835_close() to deinit the library. Suggested by C?sar Ortiz
+/// \version 1.6 Document testing on 2012-07-15-wheezy-raspbian and Occidentalisv01
+/// Functions bcm2835_gpio_ren(), bcm2835_gpio_fen(), bcm2835_gpio_hen()
+/// bcm2835_gpio_len(), bcm2835_gpio_aren() and bcm2835_gpio_afen() now
+/// changes only the pin specified. Other pins that were already previously
+/// enabled stay enabled.
+/// Added bcm2835_gpio_clr_ren(), bcm2835_gpio_clr_fen(), bcm2835_gpio_clr_hen()
+/// bcm2835_gpio_clr_len(), bcm2835_gpio_clr_aren(), bcm2835_gpio_clr_afen()
+/// to clear the enable for individual pins, suggested by Andreas Sundstrom.
+/// \version 1.7 Added bcm2835_spi_transfernb to support different buffers for read and write.
+/// \version 1.8 Improvements to read barrier, as suggested by maddin.
+/// \version 1.9 Improvements contributed by mikew:
+/// I noticed that it was mallocing memory for the mmaps on /dev/mem.
+/// It's not necessary to do that, you can just mmap the file directly,
+/// so I've removed the mallocs (and frees).
+/// I've also modified delayMicroseconds() to use nanosleep() for long waits,
+/// and a busy wait on a high resolution timer for the rest. This is because
+/// I've found that calling nanosleep() takes at least 100-200 us.
+/// You need to link using '-lrt' using this version.
+/// I've added some unsigned casts to the debug prints to silence compiler
+/// warnings I was getting, fixed some typos, and changed the value of
+/// BCM2835_PAD_HYSTERESIS_ENABLED to 0x08 as per Gert van Loo's doc at
+/// http://www.scribd.com/doc/101830961/GPIO-Pads-Control2
+/// Also added a define for the passwrd value that Gert says is needed to
+/// change pad control settings.
+/// \version 1.10 Changed the names of the delay functions to bcm2835_delay()
+/// and bcm2835_delayMicroseconds() to prevent collisions with wiringPi.
+/// Macros to map delay()-> bcm2835_delay() and
+/// Macros to map delayMicroseconds()-> bcm2835_delayMicroseconds(), which
+/// can be disabled by defining BCM2835_NO_DELAY_COMPATIBILITY
+/// \version 1.11 Fixed incorrect link to download file
+/// \version 1.12 New GPIO pin definitions for RPi version 2 (which has a different GPIO mapping)
+/// \version 1.13 New GPIO pin definitions for RPi version 2 plug P5
+/// Hardware base pointers are now available (after initialisation) externally as bcm2835_gpio
+/// bcm2835_pwm bcm2835_clk bcm2835_pads bcm2835_spi0.
+/// \version 1.14 Now compiles even if CLOCK_MONOTONIC_RAW is not available, uses CLOCK_MONOTONIC instead.
+/// Fixed errors in documentation of SPI divider frequencies based on 250MHz clock.
+/// Reported by Ben Simpson.
+/// \version 1.15 Added bcm2835_close() to end of examples as suggested by Mark Wolfe.
+/// \version 1.16 Added bcm2835_gpio_set_multi, bcm2835_gpio_clr_multi and bcm2835_gpio_write_multi
+/// to allow a mask of pins to be set all at once. Requested by Sebastian Loncar.
+/// \version 1.17 Added bcm2835_gpio_write_mask. Requested by Sebastian Loncar.
+/// \version 1.18 Added bcm2835_i2c_* functions. Changes to bcm2835_delayMicroseconds:
+/// now uses the RPi system timer counter, instead of clock_gettime, for improved accuracy.
+/// No need to link with -lrt now. Contributed by Arjan van Vught.
+/// \version 1.19 Removed inlines added by previous patch since they don't seem to work everywhere.
+/// Reported by olly.
+/// \version 1.20 Patch from Mark Dootson to close /dev/mem after access to the peripherals has been granted.
+/// \version 1.21 delayMicroseconds is now not susceptible to 32 bit timer overruns.
+/// Patch courtesy Jeremy Mortis.
+/// \version 1.22 Fixed incorrect definition of BCM2835_GPFEN0 which broke the ability to set
+/// falling edge events. Reported by Mark Dootson.
+/// \version 1.23 Added bcm2835_i2c_set_baudrate and bcm2835_i2c_read_register_rs.
+/// Improvements to bcm2835_i2c_read and bcm2835_i2c_write functions
+/// to fix ocasional reads not completing. Patched by Mark Dootson.
+/// \version 1.24 Mark Dootson p[atched a problem with his previously submitted code
+/// under high load from other processes.
+/// \version 1.25 Updated author and distribution location details to airspayce.com
+/// \version 1.26 Added missing unmapmem for pads in bcm2835_close to prevent a memory leak.
+/// Reported by Hartmut Henkel.
+/// \author Mike McCauley (mikem@airspayce.com) DO NOT CONTACT THE AUTHOR DIRECTLY: USE THE LISTS
+
+
+
+// Defines for BCM2835
+#ifndef BCM2835_H
+#define BCM2835_H
+
+#include
+
+/// \defgroup constants Constants for passing to and from library functions
+/// The values here are designed to be passed to various functions in the bcm2835 library.
+/// @{
+
+
+/// This means pin HIGH, true, 3.3volts on a pin.
+#define HIGH 0x1
+/// This means pin LOW, false, 0volts on a pin.
+#define LOW 0x0
+
+/// Speed of the core clock core_clk
+#define BCM2835_CORE_CLK_HZ 250000000 ///< 250 MHz
+
+// Physical addresses for various peripheral register sets
+/// Base Physical Address of the BCM 2835 peripheral registers
+#define BCM2835_PERI_BASE 0x20000000
+/// Base Physical Address of the System Timer registers
+#define BCM2835_ST_BASE (BCM2835_PERI_BASE + 0x3000)
+/// Base Physical Address of the Pads registers
+#define BCM2835_GPIO_PADS (BCM2835_PERI_BASE + 0x100000)
+/// Base Physical Address of the Clock/timer registers
+#define BCM2835_CLOCK_BASE (BCM2835_PERI_BASE + 0x101000)
+/// Base Physical Address of the GPIO registers
+#define BCM2835_GPIO_BASE (BCM2835_PERI_BASE + 0x200000)
+/// Base Physical Address of the SPI0 registers
+#define BCM2835_SPI0_BASE (BCM2835_PERI_BASE + 0x204000)
+/// Base Physical Address of the BSC0 registers
+#define BCM2835_BSC0_BASE (BCM2835_PERI_BASE + 0x205000)
+/// Base Physical Address of the PWM registers
+#define BCM2835_GPIO_PWM (BCM2835_PERI_BASE + 0x20C000)
+ /// Base Physical Address of the BSC1 registers
+#define BCM2835_BSC1_BASE (BCM2835_PERI_BASE + 0x804000)
+
+
+/// Base of the ST (System Timer) registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_st;
+
+/// Base of the GPIO registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_gpio;
+
+/// Base of the PWM registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_pwm;
+
+/// Base of the CLK registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_clk;
+
+/// Base of the PADS registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_pads;
+
+/// Base of the SPI0 registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_spi0;
+
+/// Base of the BSC0 registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_bsc0;
+
+/// Base of the BSC1 registers.
+/// Available after bcm2835_init has been called
+extern volatile uint32_t *bcm2835_bsc1;
+
+/// Size of memory page on RPi
+#define BCM2835_PAGE_SIZE (4*1024)
+/// Size of memory block on RPi
+#define BCM2835_BLOCK_SIZE (4*1024)
+
+
+// Defines for GPIO
+// The BCM2835 has 54 GPIO pins.
+// BCM2835 data sheet, Page 90 onwards.
+/// GPIO register offsets from BCM2835_GPIO_BASE. Offsets into the GPIO Peripheral block in bytes per 6.1 Register View
+#define BCM2835_GPFSEL0 0x0000 ///< GPIO Function Select 0
+#define BCM2835_GPFSEL1 0x0004 ///< GPIO Function Select 1
+#define BCM2835_GPFSEL2 0x0008 ///< GPIO Function Select 2
+#define BCM2835_GPFSEL3 0x000c ///< GPIO Function Select 3
+#define BCM2835_GPFSEL4 0x0010 ///< GPIO Function Select 4
+#define BCM2835_GPFSEL5 0x0014 ///< GPIO Function Select 5
+#define BCM2835_GPSET0 0x001c ///< GPIO Pin Output Set 0
+#define BCM2835_GPSET1 0x0020 ///< GPIO Pin Output Set 1
+#define BCM2835_GPCLR0 0x0028 ///< GPIO Pin Output Clear 0
+#define BCM2835_GPCLR1 0x002c ///< GPIO Pin Output Clear 1
+#define BCM2835_GPLEV0 0x0034 ///< GPIO Pin Level 0
+#define BCM2835_GPLEV1 0x0038 ///< GPIO Pin Level 1
+#define BCM2835_GPEDS0 0x0040 ///< GPIO Pin Event Detect Status 0
+#define BCM2835_GPEDS1 0x0044 ///< GPIO Pin Event Detect Status 1
+#define BCM2835_GPREN0 0x004c ///< GPIO Pin Rising Edge Detect Enable 0
+#define BCM2835_GPREN1 0x0050 ///< GPIO Pin Rising Edge Detect Enable 1
+#define BCM2835_GPFEN0 0x0058 ///< GPIO Pin Falling Edge Detect Enable 0
+#define BCM2835_GPFEN1 0x005c ///< GPIO Pin Falling Edge Detect Enable 1
+#define BCM2835_GPHEN0 0x0064 ///< GPIO Pin High Detect Enable 0
+#define BCM2835_GPHEN1 0x0068 ///< GPIO Pin High Detect Enable 1
+#define BCM2835_GPLEN0 0x0070 ///< GPIO Pin Low Detect Enable 0
+#define BCM2835_GPLEN1 0x0074 ///< GPIO Pin Low Detect Enable 1
+#define BCM2835_GPAREN0 0x007c ///< GPIO Pin Async. Rising Edge Detect 0
+#define BCM2835_GPAREN1 0x0080 ///< GPIO Pin Async. Rising Edge Detect 1
+#define BCM2835_GPAFEN0 0x0088 ///< GPIO Pin Async. Falling Edge Detect 0
+#define BCM2835_GPAFEN1 0x008c ///< GPIO Pin Async. Falling Edge Detect 1
+#define BCM2835_GPPUD 0x0094 ///< GPIO Pin Pull-up/down Enable
+#define BCM2835_GPPUDCLK0 0x0098 ///< GPIO Pin Pull-up/down Enable Clock 0
+#define BCM2835_GPPUDCLK1 0x009c ///< GPIO Pin Pull-up/down Enable Clock 1
+
+/// \brief bcm2835PortFunction
+/// Port function select modes for bcm2835_gpio_fsel()
+typedef enum
+{
+ BCM2835_GPIO_FSEL_INPT = 0b000, ///< Input
+ BCM2835_GPIO_FSEL_OUTP = 0b001, ///< Output
+ BCM2835_GPIO_FSEL_ALT0 = 0b100, ///< Alternate function 0
+ BCM2835_GPIO_FSEL_ALT1 = 0b101, ///< Alternate function 1
+ BCM2835_GPIO_FSEL_ALT2 = 0b110, ///< Alternate function 2
+ BCM2835_GPIO_FSEL_ALT3 = 0b111, ///< Alternate function 3
+ BCM2835_GPIO_FSEL_ALT4 = 0b011, ///< Alternate function 4
+ BCM2835_GPIO_FSEL_ALT5 = 0b010, ///< Alternate function 5
+ BCM2835_GPIO_FSEL_MASK = 0b111 ///< Function select bits mask
+} bcm2835FunctionSelect;
+
+/// \brief bcm2835PUDControl
+/// Pullup/Pulldown defines for bcm2835_gpio_pud()
+typedef enum
+{
+ BCM2835_GPIO_PUD_OFF = 0b00, ///< Off ? disable pull-up/down
+ BCM2835_GPIO_PUD_DOWN = 0b01, ///< Enable Pull Down control
+ BCM2835_GPIO_PUD_UP = 0b10 ///< Enable Pull Up control
+} bcm2835PUDControl;
+
+/// Pad control register offsets from BCM2835_GPIO_PADS
+#define BCM2835_PADS_GPIO_0_27 0x002c ///< Pad control register for pads 0 to 27
+#define BCM2835_PADS_GPIO_28_45 0x0030 ///< Pad control register for pads 28 to 45
+#define BCM2835_PADS_GPIO_46_53 0x0034 ///< Pad control register for pads 46 to 53
+
+/// Pad Control masks
+#define BCM2835_PAD_PASSWRD (0x5A << 24) ///< Password to enable setting pad mask
+#define BCM2835_PAD_SLEW_RATE_UNLIMITED 0x10 ///< Slew rate unlimited
+#define BCM2835_PAD_HYSTERESIS_ENABLED 0x08 ///< Hysteresis enabled
+#define BCM2835_PAD_DRIVE_2mA 0x00 ///< 2mA drive current
+#define BCM2835_PAD_DRIVE_4mA 0x01 ///< 4mA drive current
+#define BCM2835_PAD_DRIVE_6mA 0x02 ///< 6mA drive current
+#define BCM2835_PAD_DRIVE_8mA 0x03 ///< 8mA drive current
+#define BCM2835_PAD_DRIVE_10mA 0x04 ///< 10mA drive current
+#define BCM2835_PAD_DRIVE_12mA 0x05 ///< 12mA drive current
+#define BCM2835_PAD_DRIVE_14mA 0x06 ///< 14mA drive current
+#define BCM2835_PAD_DRIVE_16mA 0x07 ///< 16mA drive current
+
+/// \brief bcm2835PadGroup
+/// Pad group specification for bcm2835_gpio_pad()
+typedef enum
+{
+ BCM2835_PAD_GROUP_GPIO_0_27 = 0, ///< Pad group for GPIO pads 0 to 27
+ BCM2835_PAD_GROUP_GPIO_28_45 = 1, ///< Pad group for GPIO pads 28 to 45
+ BCM2835_PAD_GROUP_GPIO_46_53 = 2 ///< Pad group for GPIO pads 46 to 53
+} bcm2835PadGroup;
+
+/// \brief GPIO Pin Numbers
+///
+/// Here we define Raspberry Pin GPIO pins on P1 in terms of the underlying BCM GPIO pin numbers.
+/// These can be passed as a pin number to any function requiring a pin.
+/// Not all pins on the RPi 26 bin IDE plug are connected to GPIO pins
+/// and some can adopt an alternate function.
+/// RPi version 2 has some slightly different pinouts, and these are values RPI_V2_*.
+/// At bootup, pins 8 and 10 are set to UART0_TXD, UART0_RXD (ie the alt0 function) respectively
+/// When SPI0 is in use (ie after bcm2835_spi_begin()), pins 19, 21, 23, 24, 26 are dedicated to SPI
+/// and cant be controlled independently
+typedef enum
+{
+ RPI_GPIO_P1_03 = 0, ///< Version 1, Pin P1-03
+ RPI_GPIO_P1_05 = 1, ///< Version 1, Pin P1-05
+ RPI_GPIO_P1_07 = 4, ///< Version 1, Pin P1-07
+ RPI_GPIO_P1_08 = 14, ///< Version 1, Pin P1-08, defaults to alt function 0 UART0_TXD
+ RPI_GPIO_P1_10 = 15, ///< Version 1, Pin P1-10, defaults to alt function 0 UART0_RXD
+ RPI_GPIO_P1_11 = 17, ///< Version 1, Pin P1-11
+ RPI_GPIO_P1_12 = 18, ///< Version 1, Pin P1-12
+ RPI_GPIO_P1_13 = 21, ///< Version 1, Pin P1-13
+ RPI_GPIO_P1_15 = 22, ///< Version 1, Pin P1-15
+ RPI_GPIO_P1_16 = 23, ///< Version 1, Pin P1-16
+ RPI_GPIO_P1_18 = 24, ///< Version 1, Pin P1-18
+ RPI_GPIO_P1_19 = 10, ///< Version 1, Pin P1-19, MOSI when SPI0 in use
+ RPI_GPIO_P1_21 = 9, ///< Version 1, Pin P1-21, MISO when SPI0 in use
+ RPI_GPIO_P1_22 = 25, ///< Version 1, Pin P1-22
+ RPI_GPIO_P1_23 = 11, ///< Version 1, Pin P1-23, CLK when SPI0 in use
+ RPI_GPIO_P1_24 = 8, ///< Version 1, Pin P1-24, CE0 when SPI0 in use
+ RPI_GPIO_P1_26 = 7, ///< Version 1, Pin P1-26, CE1 when SPI0 in use
+
+ // RPi Version 2
+ RPI_V2_GPIO_P1_03 = 2, ///< Version 2, Pin P1-03
+ RPI_V2_GPIO_P1_05 = 3, ///< Version 2, Pin P1-05
+ RPI_V2_GPIO_P1_07 = 4, ///< Version 2, Pin P1-07
+ RPI_V2_GPIO_P1_08 = 14, ///< Version 2, Pin P1-08, defaults to alt function 0 UART0_TXD
+ RPI_V2_GPIO_P1_10 = 15, ///< Version 2, Pin P1-10, defaults to alt function 0 UART0_RXD
+ RPI_V2_GPIO_P1_11 = 17, ///< Version 2, Pin P1-11
+ RPI_V2_GPIO_P1_12 = 18, ///< Version 2, Pin P1-12
+ RPI_V2_GPIO_P1_13 = 27, ///< Version 2, Pin P1-13
+ RPI_V2_GPIO_P1_15 = 22, ///< Version 2, Pin P1-15
+ RPI_V2_GPIO_P1_16 = 23, ///< Version 2, Pin P1-16
+ RPI_V2_GPIO_P1_18 = 24, ///< Version 2, Pin P1-18
+ RPI_V2_GPIO_P1_19 = 10, ///< Version 2, Pin P1-19, MOSI when SPI0 in use
+ RPI_V2_GPIO_P1_21 = 9, ///< Version 2, Pin P1-21, MISO when SPI0 in use
+ RPI_V2_GPIO_P1_22 = 25, ///< Version 2, Pin P1-22
+ RPI_V2_GPIO_P1_23 = 11, ///< Version 2, Pin P1-23, CLK when SPI0 in use
+ RPI_V2_GPIO_P1_24 = 8, ///< Version 2, Pin P1-24, CE0 when SPI0 in use
+ RPI_V2_GPIO_P1_26 = 7, ///< Version 2, Pin P1-26, CE1 when SPI0 in use
+
+ // RPi Version 2, new plug P5
+ RPI_V2_GPIO_P5_03 = 28, ///< Version 2, Pin P5-03
+ RPI_V2_GPIO_P5_04 = 29, ///< Version 2, Pin P5-04
+ RPI_V2_GPIO_P5_05 = 30, ///< Version 2, Pin P5-05
+ RPI_V2_GPIO_P5_06 = 31, ///< Version 2, Pin P5-06
+
+} RPiGPIOPin;
+
+// Defines for SPI
+// GPIO register offsets from BCM2835_SPI0_BASE.
+// Offsets into the SPI Peripheral block in bytes per 10.5 SPI Register Map
+#define BCM2835_SPI0_CS 0x0000 ///< SPI Master Control and Status
+#define BCM2835_SPI0_FIFO 0x0004 ///< SPI Master TX and RX FIFOs
+#define BCM2835_SPI0_CLK 0x0008 ///< SPI Master Clock Divider
+#define BCM2835_SPI0_DLEN 0x000c ///< SPI Master Data Length
+#define BCM2835_SPI0_LTOH 0x0010 ///< SPI LOSSI mode TOH
+#define BCM2835_SPI0_DC 0x0014 ///< SPI DMA DREQ Controls
+
+// Register masks for SPI0_CS
+#define BCM2835_SPI0_CS_LEN_LONG 0x02000000 ///< Enable Long data word in Lossi mode if DMA_LEN is set
+#define BCM2835_SPI0_CS_DMA_LEN 0x01000000 ///< Enable DMA mode in Lossi mode
+#define BCM2835_SPI0_CS_CSPOL2 0x00800000 ///< Chip Select 2 Polarity
+#define BCM2835_SPI0_CS_CSPOL1 0x00400000 ///< Chip Select 1 Polarity
+#define BCM2835_SPI0_CS_CSPOL0 0x00200000 ///< Chip Select 0 Polarity
+#define BCM2835_SPI0_CS_RXF 0x00100000 ///< RXF - RX FIFO Full
+#define BCM2835_SPI0_CS_RXR 0x00080000 ///< RXR RX FIFO needs Reading ( full)
+#define BCM2835_SPI0_CS_TXD 0x00040000 ///< TXD TX FIFO can accept Data
+#define BCM2835_SPI0_CS_RXD 0x00020000 ///< RXD RX FIFO contains Data
+#define BCM2835_SPI0_CS_DONE 0x00010000 ///< Done transfer Done
+#define BCM2835_SPI0_CS_TE_EN 0x00008000 ///< Unused
+#define BCM2835_SPI0_CS_LMONO 0x00004000 ///< Unused
+#define BCM2835_SPI0_CS_LEN 0x00002000 ///< LEN LoSSI enable
+#define BCM2835_SPI0_CS_REN 0x00001000 ///< REN Read Enable
+#define BCM2835_SPI0_CS_ADCS 0x00000800 ///< ADCS Automatically Deassert Chip Select
+#define BCM2835_SPI0_CS_INTR 0x00000400 ///< INTR Interrupt on RXR
+#define BCM2835_SPI0_CS_INTD 0x00000200 ///< INTD Interrupt on Done
+#define BCM2835_SPI0_CS_DMAEN 0x00000100 ///< DMAEN DMA Enable
+#define BCM2835_SPI0_CS_TA 0x00000080 ///< Transfer Active
+#define BCM2835_SPI0_CS_CSPOL 0x00000040 ///< Chip Select Polarity
+#define BCM2835_SPI0_CS_CLEAR 0x00000030 ///< Clear FIFO Clear RX and TX
+#define BCM2835_SPI0_CS_CLEAR_RX 0x00000020 ///< Clear FIFO Clear RX
+#define BCM2835_SPI0_CS_CLEAR_TX 0x00000010 ///< Clear FIFO Clear TX
+#define BCM2835_SPI0_CS_CPOL 0x00000008 ///< Clock Polarity
+#define BCM2835_SPI0_CS_CPHA 0x00000004 ///< Clock Phase
+#define BCM2835_SPI0_CS_CS 0x00000003 ///< Chip Select
+
+/// \brief bcm2835SPIBitOrder SPI Bit order
+/// Specifies the SPI data bit ordering for bcm2835_spi_setBitOrder()
+typedef enum
+{
+ BCM2835_SPI_BIT_ORDER_LSBFIRST = 0, ///< LSB First
+ BCM2835_SPI_BIT_ORDER_MSBFIRST = 1 ///< MSB First
+}bcm2835SPIBitOrder;
+
+/// \brief SPI Data mode
+/// Specify the SPI data mode to be passed to bcm2835_spi_setDataMode()
+typedef enum
+{
+ BCM2835_SPI_MODE0 = 0, ///< CPOL = 0, CPHA = 0
+ BCM2835_SPI_MODE1 = 1, ///< CPOL = 0, CPHA = 1
+ BCM2835_SPI_MODE2 = 2, ///< CPOL = 1, CPHA = 0
+ BCM2835_SPI_MODE3 = 3, ///< CPOL = 1, CPHA = 1
+}bcm2835SPIMode;
+
+/// \brief bcm2835SPIChipSelect
+/// Specify the SPI chip select pin(s)
+typedef enum
+{
+ BCM2835_SPI_CS0 = 0, ///< Chip Select 0
+ BCM2835_SPI_CS1 = 1, ///< Chip Select 1
+ BCM2835_SPI_CS2 = 2, ///< Chip Select 2 (ie pins CS1 and CS2 are asserted)
+ BCM2835_SPI_CS_NONE = 3, ///< No CS, control it yourself
+} bcm2835SPIChipSelect;
+
+/// \brief bcm2835SPIClockDivider
+/// Specifies the divider used to generate the SPI clock from the system clock.
+/// Figures below give the divider, clock period and clock frequency.
+/// Clock divided is based on nominal base clock rate of 250MHz
+/// It is reported that (contrary to the documentation) any even divider may used.
+/// The frequencies shown for each divider have been confirmed by measurement
+typedef enum
+{
+ BCM2835_SPI_CLOCK_DIVIDER_65536 = 0, ///< 65536 = 262.144us = 3.814697260kHz
+ BCM2835_SPI_CLOCK_DIVIDER_32768 = 32768, ///< 32768 = 131.072us = 7.629394531kHz
+ BCM2835_SPI_CLOCK_DIVIDER_16384 = 16384, ///< 16384 = 65.536us = 15.25878906kHz
+ BCM2835_SPI_CLOCK_DIVIDER_8192 = 8192, ///< 8192 = 32.768us = 30/51757813kHz
+ BCM2835_SPI_CLOCK_DIVIDER_4096 = 4096, ///< 4096 = 16.384us = 61.03515625kHz
+ BCM2835_SPI_CLOCK_DIVIDER_2048 = 2048, ///< 2048 = 8.192us = 122.0703125kHz
+ BCM2835_SPI_CLOCK_DIVIDER_1024 = 1024, ///< 1024 = 4.096us = 244.140625kHz
+ BCM2835_SPI_CLOCK_DIVIDER_512 = 512, ///< 512 = 2.048us = 488.28125kHz
+ BCM2835_SPI_CLOCK_DIVIDER_256 = 256, ///< 256 = 1.024us = 976.5625MHz
+ BCM2835_SPI_CLOCK_DIVIDER_128 = 128, ///< 128 = 512ns = = 1.953125MHz
+ BCM2835_SPI_CLOCK_DIVIDER_64 = 64, ///< 64 = 256ns = 3.90625MHz
+ BCM2835_SPI_CLOCK_DIVIDER_32 = 32, ///< 32 = 128ns = 7.8125MHz
+ BCM2835_SPI_CLOCK_DIVIDER_16 = 16, ///< 16 = 64ns = 15.625MHz
+ BCM2835_SPI_CLOCK_DIVIDER_8 = 8, ///< 8 = 32ns = 31.25MHz
+ BCM2835_SPI_CLOCK_DIVIDER_4 = 4, ///< 4 = 16ns = 62.5MHz
+ BCM2835_SPI_CLOCK_DIVIDER_2 = 2, ///< 2 = 8ns = 125MHz, fastest you can get
+ BCM2835_SPI_CLOCK_DIVIDER_1 = 1, ///< 0 = 262.144us = 3.814697260kHz, same as 0/65536
+} bcm2835SPIClockDivider;
+
+// Defines for I2C
+// GPIO register offsets from BCM2835_BSC*_BASE.
+// Offsets into the BSC Peripheral block in bytes per 3.1 BSC Register Map
+#define BCM2835_BSC_C 0x0000 ///< BSC Master Control
+#define BCM2835_BSC_S 0x0004 ///< BSC Master Status
+#define BCM2835_BSC_DLEN 0x0008 ///< BSC Master Data Length
+#define BCM2835_BSC_A 0x000c ///< BSC Master Slave Address
+#define BCM2835_BSC_FIFO 0x0010 ///< BSC Master Data FIFO
+#define BCM2835_BSC_DIV 0x0014 ///< BSC Master Clock Divider
+#define BCM2835_BSC_DEL 0x0018 ///< BSC Master Data Delay
+#define BCM2835_BSC_CLKT 0x001c ///< BSC Master Clock Stretch Timeout
+
+// Register masks for BSC_C
+#define BCM2835_BSC_C_I2CEN 0x00008000 ///< I2C Enable, 0 = disabled, 1 = enabled
+#define BCM2835_BSC_C_INTR 0x00000400 ///< Interrupt on RX
+#define BCM2835_BSC_C_INTT 0x00000200 ///< Interrupt on TX
+#define BCM2835_BSC_C_INTD 0x00000100 ///< Interrupt on DONE
+#define BCM2835_BSC_C_ST 0x00000080 ///< Start transfer, 1 = Start a new transfer
+#define BCM2835_BSC_C_CLEAR_1 0x00000020 ///< Clear FIFO Clear
+#define BCM2835_BSC_C_CLEAR_2 0x00000010 ///< Clear FIFO Clear
+#define BCM2835_BSC_C_READ 0x00000001 ///< Read transfer
+
+// Register masks for BSC_S
+#define BCM2835_BSC_S_CLKT 0x00000200 ///< Clock stretch timeout
+#define BCM2835_BSC_S_ERR 0x00000100 ///< ACK error
+#define BCM2835_BSC_S_RXF 0x00000080 ///< RXF FIFO full, 0 = FIFO is not full, 1 = FIFO is full
+#define BCM2835_BSC_S_TXE 0x00000040 ///< TXE FIFO full, 0 = FIFO is not full, 1 = FIFO is full
+#define BCM2835_BSC_S_RXD 0x00000020 ///< RXD FIFO contains data
+#define BCM2835_BSC_S_TXD 0x00000010 ///< TXD FIFO can accept data
+#define BCM2835_BSC_S_RXR 0x00000008 ///< RXR FIFO needs reading (full)
+#define BCM2835_BSC_S_TXW 0x00000004 ///< TXW FIFO needs writing (full)
+#define BCM2835_BSC_S_DONE 0x00000002 ///< Transfer DONE
+#define BCM2835_BSC_S_TA 0x00000001 ///< Transfer Active
+
+#define BCM2835_BSC_FIFO_SIZE 16 ///< BSC FIFO size
+
+/// \brief bcm2835I2CClockDivider
+/// Specifies the divider used to generate the I2C clock from the system clock.
+/// Clock divided is based on nominal base clock rate of 250MHz
+typedef enum
+{
+ BCM2835_I2C_CLOCK_DIVIDER_2500 = 2500, ///< 2500 = 10us = 100 kHz
+ BCM2835_I2C_CLOCK_DIVIDER_626 = 626, ///< 622 = 2.504us = 399.3610 kHz
+ BCM2835_I2C_CLOCK_DIVIDER_150 = 150, ///< 150 = 60ns = 1.666 MHz (default at reset)
+ BCM2835_I2C_CLOCK_DIVIDER_148 = 148, ///< 148 = 59ns = 1.689 MHz
+} bcm2835I2CClockDivider;
+
+/// \brief bcm2835I2CReasonCodes
+/// Specifies the reason codes for the bcm2835_i2c_write and bcm2835_i2c_read functions.
+typedef enum
+{
+ BCM2835_I2C_REASON_OK = 0x00, ///< Success
+ BCM2835_I2C_REASON_ERROR_NACK = 0x01, ///< Received a NACK
+ BCM2835_I2C_REASON_ERROR_CLKT = 0x02, ///< Received Clock Stretch Timeout
+ BCM2835_I2C_REASON_ERROR_DATA = 0x04, ///< Not all data is sent / received
+} bcm2835I2CReasonCodes;
+
+// Defines for ST
+// GPIO register offsets from BCM2835_ST_BASE.
+// Offsets into the ST Peripheral block in bytes per 12.1 System Timer Registers
+// The System Timer peripheral provides four 32-bit timer channels and a single 64-bit free running counter.
+// BCM2835_ST_CLO is the System Timer Counter Lower bits register.
+// The system timer free-running counter lower register is a read-only register that returns the current value
+// of the lower 32-bits of the free running counter.
+// BCM2835_ST_CHI is the System Timer Counter Upper bits register.
+// The system timer free-running counter upper register is a read-only register that returns the current value
+// of the upper 32-bits of the free running counter.
+#define BCM2835_ST_CS 0x0000 ///< System Timer Control/Status
+#define BCM2835_ST_CLO 0x0004 ///< System Timer Counter Lower 32 bits
+#define BCM2835_ST_CHI 0x0008 ///< System Timer Counter Upper 32 bits
+
+/// @}
+
+
+// Defines for PWM
+#define BCM2835_PWM_CONTROL 0
+#define BCM2835_PWM_STATUS 1
+#define BCM2835_PWM0_RANGE 4
+#define BCM2835_PWM0_DATA 5
+#define BCM2835_PWM1_RANGE 8
+#define BCM2835_PWM1_DATA 9
+
+#define BCM2835_PWMCLK_CNTL 40
+#define BCM2835_PWMCLK_DIV 41
+
+#define BCM2835_PWM1_MS_MODE 0x8000 /// Run in MS mode
+#define BCM2835_PWM1_USEFIFO 0x2000 /// Data from FIFO
+#define BCM2835_PWM1_REVPOLAR 0x1000 /// Reverse polarity
+#define BCM2835_PWM1_OFFSTATE 0x0800 /// Ouput Off state
+#define BCM2835_PWM1_REPEATFF 0x0400 /// Repeat last value if FIFO empty
+#define BCM2835_PWM1_SERIAL 0x0200 /// Run in serial mode
+#define BCM2835_PWM1_ENABLE 0x0100 /// Channel Enable
+
+#define BCM2835_PWM0_MS_MODE 0x0080 /// Run in MS mode
+#define BCM2835_PWM0_USEFIFO 0x0020 /// Data from FIFO
+#define BCM2835_PWM0_REVPOLAR 0x0010 /// Reverse polarity
+#define BCM2835_PWM0_OFFSTATE 0x0008 /// Ouput Off state
+#define BCM2835_PWM0_REPEATFF 0x0004 /// Repeat last value if FIFO empty
+#define BCM2835_PWM0_SERIAL 0x0002 /// Run in serial mode
+#define BCM2835_PWM0_ENABLE 0x0001 /// Channel Enable
+
+// Historical name compatibility
+#ifndef BCM2835_NO_DELAY_COMPATIBILITY
+#define delay(x) bcm2835_delay(x)
+#define delayMicroseconds(x) bcm2835_delayMicroseconds(x)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /// \defgroup init Library initialisation and management
+ /// These functions allow you to intialise and control the bcm2835 library
+ /// @{
+
+ /// Initialise the library by opening /dev/mem and getting pointers to the
+ /// internal memory for BCM 2835 device registers. You must call this (successfully)
+ /// before calling any other
+ /// functions in this library (except bcm2835_set_debug).
+ /// If bcm2835_init() fails by returning 0,
+ /// calling any other function may result in crashes or other failures.
+ /// Prints messages to stderr in case of errors.
+ /// \return 1 if successful else 0
+ extern int bcm2835_init(void);
+
+ /// Close the library, deallocating any allocated memory and closing /dev/mem
+ /// \return 1 if successful else 0
+ extern int bcm2835_close(void);
+
+ /// Sets the debug level of the library.
+ /// A value of 1 prevents mapping to /dev/mem, and makes the library print out
+ /// what it would do, rather than accessing the GPIO registers.
+ /// A value of 0, the default, causes normal operation.
+ /// Call this before calling bcm2835_init();
+ /// \param[in] debug The new debug level. 1 means debug
+ extern void bcm2835_set_debug(uint8_t debug);
+
+ /// @} // end of init
+
+ /// \defgroup lowlevel Low level register access
+ /// These functions provide low level register access, and should not generally
+ /// need to be used
+ ///
+ /// @{
+
+ /// Reads 32 bit value from a peripheral address
+ /// The read is done twice, and is therefore always safe in terms of
+ /// manual section 1.3 Peripheral access precautions for correct memory ordering
+ /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc.
+ /// \return the value read from the 32 bit register
+ /// \sa Physical Addresses
+ extern uint32_t bcm2835_peri_read(volatile uint32_t* paddr);
+
+
+ /// Reads 32 bit value from a peripheral address without the read barrier
+ /// You should only use this when your code has previously called bcm2835_peri_read()
+ /// within the same peripheral, and no other peripheral access has occurred since.
+ /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc.
+ /// \return the value read from the 32 bit register
+ /// \sa Physical Addresses
+ extern uint32_t bcm2835_peri_read_nb(volatile uint32_t* paddr);
+
+
+ /// Writes 32 bit value from a peripheral address
+ /// The write is done twice, and is therefore always safe in terms of
+ /// manual section 1.3 Peripheral access precautions for correct memory ordering
+ /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc.
+ /// \param[in] value The 32 bit value to write
+ /// \sa Physical Addresses
+ extern void bcm2835_peri_write(volatile uint32_t* paddr, uint32_t value);
+
+ /// Writes 32 bit value from a peripheral address without the write barrier
+ /// You should only use this when your code has previously called bcm2835_peri_write()
+ /// within the same peripheral, and no other peripheral access has occurred since.
+ /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc.
+ /// \param[in] value The 32 bit value to write
+ /// \sa Physical Addresses
+ extern void bcm2835_peri_write_nb(volatile uint32_t* paddr, uint32_t value);
+
+ /// Alters a number of bits in a 32 peripheral regsiter.
+ /// It reads the current valu and then alters the bits deines as 1 in mask,
+ /// according to the bit value in value.
+ /// All other bits that are 0 in the mask are unaffected.
+ /// Use this to alter a subset of the bits in a register.
+ /// The write is done twice, and is therefore always safe in terms of
+ /// manual section 1.3 Peripheral access precautions for correct memory ordering
+ /// \param[in] paddr Physical address to read from. See BCM2835_GPIO_BASE etc.
+ /// \param[in] value The 32 bit value to write, masked in by mask.
+ /// \param[in] mask Bitmask that defines the bits that will be altered in the register.
+ /// \sa Physical Addresses
+ extern void bcm2835_peri_set_bits(volatile uint32_t* paddr, uint32_t value, uint32_t mask);
+ /// @} // end of lowlevel
+
+ /// \defgroup gpio GPIO register access
+ /// These functions allow you to control the GPIO interface. You can set the
+ /// function of each GPIO pin, read the input state and set the output state.
+ /// @{
+
+ /// Sets the Function Select register for the given pin, which configures
+ /// the pin as Input, Output or one of the 6 alternate functions.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from RPiGPIOPin.
+ /// \param[in] mode Mode to set the pin to, one of BCM2835_GPIO_FSEL_* from \ref bcm2835FunctionSelect
+ extern void bcm2835_gpio_fsel(uint8_t pin, uint8_t mode);
+
+ /// Sets the specified pin output to
+ /// HIGH.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ /// \sa bcm2835_gpio_write()
+ extern void bcm2835_gpio_set(uint8_t pin);
+
+ /// Sets the specified pin output to
+ /// LOW.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ /// \sa bcm2835_gpio_write()
+ extern void bcm2835_gpio_clr(uint8_t pin);
+
+ /// Sets any of the first 32 GPIO output pins specified in the mask to
+ /// HIGH.
+ /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05)
+ /// \sa bcm2835_gpio_write_multi()
+ extern void bcm2835_gpio_set_multi(uint32_t mask);
+
+ /// Sets any of the first 32 GPIO output pins specified in the mask to
+ /// LOW.
+ /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05)
+ /// \sa bcm2835_gpio_write_multi()
+ extern void bcm2835_gpio_clr_multi(uint32_t mask);
+
+ /// Reads the current level on the specified
+ /// pin and returns either HIGH or LOW. Works whether or not the pin
+ /// is an input or an output.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ /// \return the current level either HIGH or LOW
+ extern uint8_t bcm2835_gpio_lev(uint8_t pin);
+
+ /// Event Detect Status.
+ /// Tests whether the specified pin has detected a level or edge
+ /// as requested by bcm2835_gpio_ren(), bcm2835_gpio_fen(), bcm2835_gpio_hen(),
+ /// bcm2835_gpio_len(), bcm2835_gpio_aren(), bcm2835_gpio_afen().
+ /// Clear the flag for a given pin by calling bcm2835_gpio_set_eds(pin);
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ /// \return HIGH if the event detect status for th given pin is true.
+ extern uint8_t bcm2835_gpio_eds(uint8_t pin);
+
+ /// Sets the Event Detect Status register for a given pin to 1,
+ /// which has the effect of clearing the flag. Use this afer seeing
+ /// an Event Detect Status on the pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_set_eds(uint8_t pin);
+
+ /// Enable Rising Edge Detect Enable for the specified pin.
+ /// When a rising edge is detected, sets the appropriate pin in Event Detect Status.
+ /// The GPRENn registers use
+ /// synchronous edge detection. This means the input signal is sampled using the
+ /// system clock and then it is looking for a ?011? pattern on the sampled signal. This
+ /// has the effect of suppressing glitches.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_ren(uint8_t pin);
+
+ /// Disable Rising Edge Detect Enable for the specified pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_clr_ren(uint8_t pin);
+
+ /// Enable Falling Edge Detect Enable for the specified pin.
+ /// When a falling edge is detected, sets the appropriate pin in Event Detect Status.
+ /// The GPRENn registers use
+ /// synchronous edge detection. This means the input signal is sampled using the
+ /// system clock and then it is looking for a ?100? pattern on the sampled signal. This
+ /// has the effect of suppressing glitches.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_fen(uint8_t pin);
+
+ /// Disable Falling Edge Detect Enable for the specified pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_clr_fen(uint8_t pin);
+
+ /// Enable High Detect Enable for the specified pin.
+ /// When a HIGH level is detected on the pin, sets the appropriate pin in Event Detect Status.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_hen(uint8_t pin);
+
+ /// Disable High Detect Enable for the specified pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_clr_hen(uint8_t pin);
+
+ /// Enable Low Detect Enable for the specified pin.
+ /// When a LOW level is detected on the pin, sets the appropriate pin in Event Detect Status.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_len(uint8_t pin);
+
+ /// Disable Low Detect Enable for the specified pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_clr_len(uint8_t pin);
+
+ /// Enable Asynchronous Rising Edge Detect Enable for the specified pin.
+ /// When a rising edge is detected, sets the appropriate pin in Event Detect Status.
+ /// Asynchronous means the incoming signal is not sampled by the system clock. As such
+ /// rising edges of very short duration can be detected.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_aren(uint8_t pin);
+
+ /// Disable Asynchronous Rising Edge Detect Enable for the specified pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_clr_aren(uint8_t pin);
+
+ /// Enable Asynchronous Falling Edge Detect Enable for the specified pin.
+ /// When a falling edge is detected, sets the appropriate pin in Event Detect Status.
+ /// Asynchronous means the incoming signal is not sampled by the system clock. As such
+ /// falling edges of very short duration can be detected.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_afen(uint8_t pin);
+
+ /// Disable Asynchronous Falling Edge Detect Enable for the specified pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ extern void bcm2835_gpio_clr_afen(uint8_t pin);
+
+ /// Sets the Pull-up/down register for the given pin. This is
+ /// used with bcm2835_gpio_pudclk() to set the Pull-up/down resistor for the given pin.
+ /// However, it is usually more convenient to use bcm2835_gpio_set_pud().
+ /// \param[in] pud The desired Pull-up/down mode. One of BCM2835_GPIO_PUD_* from bcm2835PUDControl
+ /// \sa bcm2835_gpio_set_pud()
+ extern void bcm2835_gpio_pud(uint8_t pud);
+
+ /// Clocks the Pull-up/down value set earlier by bcm2835_gpio_pud() into the pin.
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ /// \param[in] on HIGH to clock the value from bcm2835_gpio_pud() into the pin.
+ /// LOW to remove the clock.
+ /// \sa bcm2835_gpio_set_pud()
+ extern void bcm2835_gpio_pudclk(uint8_t pin, uint8_t on);
+
+ /// Reads and returns the Pad Control for the given GPIO group.
+ /// \param[in] group The GPIO pad group number, one of BCM2835_PAD_GROUP_GPIO_*
+ /// \return Mask of bits from BCM2835_PAD_* from \ref bcm2835PadGroup
+ extern uint32_t bcm2835_gpio_pad(uint8_t group);
+
+ /// Sets the Pad Control for the given GPIO group.
+ /// \param[in] group The GPIO pad group number, one of BCM2835_PAD_GROUP_GPIO_*
+ /// \param[in] control Mask of bits from BCM2835_PAD_* from \ref bcm2835PadGroup
+ extern void bcm2835_gpio_set_pad(uint8_t group, uint32_t control);
+
+ /// Delays for the specified number of milliseconds.
+ /// Uses nanosleep(), and therefore does not use CPU until the time is up.
+ /// However, you are at the mercy of nanosleep(). From the manual for nanosleep():
+ /// If the interval specified in req is not an exact multiple of the granularity
+ /// underlying clock (see time(7)), then the interval will be
+ /// rounded up to the next multiple. Furthermore, after the sleep completes,
+ /// there may still be a delay before the CPU becomes free to once
+ /// again execute the calling thread.
+ /// \param[in] millis Delay in milliseconds
+ extern void bcm2835_delay (unsigned int millis);
+
+ /// Delays for the specified number of microseconds.
+ /// Uses a combination of nanosleep() and a busy wait loop on the BCM2835 system timers,
+ /// However, you are at the mercy of nanosleep(). From the manual for nanosleep():
+ /// If the interval specified in req is not an exact multiple of the granularity
+ /// underlying clock (see time(7)), then the interval will be
+ /// rounded up to the next multiple. Furthermore, after the sleep completes,
+ /// there may still be a delay before the CPU becomes free to once
+ /// again execute the calling thread.
+ /// For times less than about 450 microseconds, uses a busy wait on the System Timer.
+ /// It is reported that a delay of 0 microseconds on RaspberryPi will in fact
+ /// result in a delay of about 80 microseconds. Your mileage may vary.
+ /// \param[in] micros Delay in microseconds
+ extern void bcm2835_delayMicroseconds (uint64_t micros);
+
+ /// Sets the output state of the specified pin
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ /// \param[in] on HIGH sets the output to HIGH and LOW to LOW.
+ extern void bcm2835_gpio_write(uint8_t pin, uint8_t on);
+
+ /// Sets any of the first 32 GPIO output pins specified in the mask to the state given by on
+ /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05)
+ /// \param[in] on HIGH sets the output to HIGH and LOW to LOW.
+ extern void bcm2835_gpio_write_multi(uint32_t mask, uint8_t on);
+
+ /// Sets the first 32 GPIO output pins specified in the mask to the value given by value
+ /// \param[in] value values required for each bit masked in by mask, eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05)
+ /// \param[in] mask Mask of pins to affect. Use eg: (1 << RPI_GPIO_P1_03) | (1 << RPI_GPIO_P1_05)
+ extern void bcm2835_gpio_write_mask(uint32_t value, uint32_t mask);
+
+ /// Sets the Pull-up/down mode for the specified pin. This is more convenient than
+ /// clocking the mode in with bcm2835_gpio_pud() and bcm2835_gpio_pudclk().
+ /// \param[in] pin GPIO number, or one of RPI_GPIO_P1_* from \ref RPiGPIOPin.
+ /// \param[in] pud The desired Pull-up/down mode. One of BCM2835_GPIO_PUD_* from bcm2835PUDControl
+ extern void bcm2835_gpio_set_pud(uint8_t pin, uint8_t pud);
+
+ /// @}
+
+ /// \defgroup spi SPI access
+ /// These functions let you use SPI0 (Serial Peripheral Interface) to
+ /// interface with an external SPI device.
+ /// @{
+
+ /// Start SPI operations.
+ /// Forces RPi SPI0 pins P1-19 (MOSI), P1-21 (MISO), P1-23 (CLK), P1-24 (CE0) and P1-26 (CE1)
+ /// to alternate function ALT0, which enables those pins for SPI interface.
+ /// You should call bcm2835_spi_end() when all SPI funcitons are complete to return the pins to
+ /// their default functions
+ /// \sa bcm2835_spi_end()
+ extern void bcm2835_spi_begin(void);
+
+ /// End SPI operations.
+ /// SPI0 pins P1-19 (MOSI), P1-21 (MISO), P1-23 (CLK), P1-24 (CE0) and P1-26 (CE1)
+ /// are returned to their default INPUT behaviour.
+ extern void bcm2835_spi_end(void);
+
+ /// Sets the SPI bit order
+ /// NOTE: has no effect. Not supported by SPI0.
+ /// Defaults to
+ /// \param[in] order The desired bit order, one of BCM2835_SPI_BIT_ORDER_*,
+ /// see \ref bcm2835SPIBitOrder
+ extern void bcm2835_spi_setBitOrder(uint8_t order);
+
+ /// Sets the SPI clock divider and therefore the
+ /// SPI clock speed.
+ /// \param[in] divider The desired SPI clock divider, one of BCM2835_SPI_CLOCK_DIVIDER_*,
+ /// see \ref bcm2835SPIClockDivider
+ extern void bcm2835_spi_setClockDivider(uint16_t divider);
+
+ /// Sets the SPI data mode
+ /// Sets the clock polariy and phase
+ /// \param[in] mode The desired data mode, one of BCM2835_SPI_MODE*,
+ /// see \ref bcm2835SPIMode
+ extern void bcm2835_spi_setDataMode(uint8_t mode);
+
+ /// Sets the chip select pin(s)
+ /// When an bcm2835_spi_transfer() is made, the selected pin(s) will be asserted during the
+ /// transfer.
+ /// \param[in] cs Specifies the CS pins(s) that are used to activate the desired slave.
+ /// One of BCM2835_SPI_CS*, see \ref bcm2835SPIChipSelect
+ extern void bcm2835_spi_chipSelect(uint8_t cs);
+
+ /// Sets the chip select pin polarity for a given pin
+ /// When an bcm2835_spi_transfer() occurs, the currently selected chip select pin(s)
+ /// will be asserted to the
+ /// value given by active. When transfers are not happening, the chip select pin(s)
+ /// return to the complement (inactive) value.
+ /// \param[in] cs The chip select pin to affect
+ /// \param[in] active Whether the chip select pin is to be active HIGH
+ extern void bcm2835_spi_setChipSelectPolarity(uint8_t cs, uint8_t active);
+
+ /// Transfers one byte to and from the currently selected SPI slave.
+ /// Asserts the currently selected CS pins (as previously set by bcm2835_spi_chipSelect)
+ /// during the transfer.
+ /// Clocks the 8 bit value out on MOSI, and simultaneously clocks in data from MISO.
+ /// Returns the read data byte from the slave.
+ /// Uses polled transfer as per section 10.6.1 of the BCM 2835 ARM Peripherls manual
+ /// \param[in] value The 8 bit data byte to write to MOSI
+ /// \return The 8 bit byte simultaneously read from MISO
+ /// \sa bcm2835_spi_transfern()
+ extern uint8_t bcm2835_spi_transfer(uint8_t value);
+
+ /// Transfers any number of bytes to and from the currently selected SPI slave.
+ /// Asserts the currently selected CS pins (as previously set by bcm2835_spi_chipSelect)
+ /// during the transfer.
+ /// Clocks the len 8 bit bytes out on MOSI, and simultaneously clocks in data from MISO.
+ /// The data read read from the slave is placed into rbuf. rbuf must be at least len bytes long
+ /// Uses polled transfer as per section 10.6.1 of the BCM 2835 ARM Peripherls manual
+ /// \param[in] tbuf Buffer of bytes to send.
+ /// \param[out] rbuf Received bytes will by put in this buffer
+ /// \param[in] len Number of bytes in the tbuf buffer, and the number of bytes to send/received
+ /// \sa bcm2835_spi_transfer()
+ extern void bcm2835_spi_transfernb(char* tbuf, char* rbuf, uint32_t len);
+
+ /// Transfers any number of bytes to and from the currently selected SPI slave
+ /// using bcm2835_spi_transfernb.
+ /// The returned data from the slave replaces the transmitted data in the buffer.
+ /// \param[in,out] buf Buffer of bytes to send. Received bytes will replace the contents
+ /// \param[in] len Number of bytes int eh buffer, and the number of bytes to send/received
+ /// \sa bcm2835_spi_transfer()
+ extern void bcm2835_spi_transfern(char* buf, uint32_t len);
+
+ /// Transfers any number of bytes to the currently selected SPI slave.
+ /// Asserts the currently selected CS pins (as previously set by bcm2835_spi_chipSelect)
+ /// during the transfer.
+ /// \param[in] buf Buffer of bytes to send.
+ /// \param[in] len Number of bytes in the tbuf buffer, and the number of bytes to send
+ extern void bcm2835_spi_writenb(char* buf, uint32_t len);
+
+ /// @}
+
+ /// \defgroup i2c I2C access
+ /// These functions let you use I2C (The Broadcom Serial Control bus with the Philips
+ /// I2C bus/interface version 2.1 January 2000.) to interface with an external I2C device.
+ /// @{
+
+ /// Start I2C operations.
+ /// Forces RPi I2C pins P1-03 (SDA) and P1-05 (SCL)
+ /// to alternate function ALT0, which enables those pins for I2C interface.
+ /// You should call bcm2835_i2c_end() when all I2C functions are complete to return the pins to
+ /// their default functions
+ /// \sa bcm2835_i2c_end()
+ extern void bcm2835_i2c_begin(void);
+
+ /// End I2C operations.
+ /// I2C pins P1-03 (SDA) and P1-05 (SCL)
+ /// are returned to their default INPUT behaviour.
+ extern void bcm2835_i2c_end(void);
+
+ /// Sets the I2C slave address.
+ /// \param[in] addr The I2C slave address.
+ extern void bcm2835_i2c_setSlaveAddress(uint8_t addr);
+
+ /// Sets the I2C clock divider and therefore the I2C clock speed.
+ /// \param[in] divider The desired I2C clock divider, one of BCM2835_I2C_CLOCK_DIVIDER_*,
+ /// see \ref bcm2835I2CClockDivider
+ extern void bcm2835_i2c_setClockDivider(uint16_t divider);
+
+ /// Sets the I2C clock divider by converting the baudrate parameter to
+ /// the equivalent I2C clock divider. ( see \sa bcm2835_i2c_setClockDivider)
+ /// For the I2C standard 100khz you would set baudrate to 100000
+ /// The use of baudrate corresponds to its use in the I2C kernel device
+ /// driver. (Of course, bcm2835 has nothing to do with the kernel driver)
+ extern void bcm2835_i2c_set_baudrate(uint32_t baudrate);
+
+ /// Transfers any number of bytes to the currently selected I2C slave.
+ /// (as previously set by \sa bcm2835_i2c_setSlaveAddress)
+ /// \param[in] buf Buffer of bytes to send.
+ /// \param[in] len Number of bytes in the buf buffer, and the number of bytes to send.
+ /// \return reason see \ref bcm2835I2CReasonCodes
+ extern uint8_t bcm2835_i2c_write(const char * buf, uint32_t len);
+
+ /// Transfers any number of bytes from the currently selected I2C slave.
+ /// (as previously set by \sa bcm2835_i2c_setSlaveAddress)
+ /// \param[in] buf Buffer of bytes to receive.
+ /// \param[in] len Number of bytes in the buf buffer, and the number of bytes to received.
+ /// \return reason see \ref bcm2835I2CReasonCodes
+ extern uint8_t bcm2835_i2c_read(char* buf, uint32_t len);
+
+ /// Allows reading from I2C slaves that require a repeated start (without any prior stop)
+ /// to read after the required slave register has been set. For example, the popular
+ /// MPL3115A2 pressure and temperature sensor. Note that your device must support or
+ /// require this mode. If your device does not require this mode then the standard
+ /// combined:
+ /// \sa bcm2835_i2c_write
+ /// \sa bcm2835_i2c_read
+ /// are a better choice.
+ /// Will read from the slave previously set by \sa bcm2835_i2c_setSlaveAddress
+ /// \param[in] regaddr Buffer containing the slave register you wish to read from.
+ /// \param[in] buf Buffer of bytes to receive.
+ /// \param[in] len Number of bytes in the buf buffer, and the number of bytes to received.
+ /// \return reason see \ref bcm2835I2CReasonCodes
+ extern uint8_t bcm2835_i2c_read_register_rs(char* regaddr, char* buf, uint32_t len);
+
+ /// @}
+
+ /// \defgroup st System Timer access
+ /// Allows access to and delays using the System Timer Counter.
+ /// @{
+
+ /// Read the System Timer Counter register.
+ /// \return the value read from the System Timer Counter Lower 32 bits register
+ uint64_t bcm2835_st_read(void);
+
+ /// Delays for the specified number of microseconds with offset.
+ /// \param[in] offset_micros Offset in microseconds
+ /// \param[in] micros Delay in microseconds
+ extern void bcm2835_st_delay(uint64_t offset_micros, uint64_t micros);
+
+ /// @}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // BCM2835_H
+
+/// @example blink.c
+/// Blinks RPi GPIO pin 11 on and off
+
+/// @example input.c
+/// Reads the state of an RPi input pin
+
+/// @example event.c
+/// Shows how to use event detection on an input pin
+
+/// @example spi.c
+/// Shows how to use SPI interface to transfer a byte to and from an SPI device
+
+/// @example spin.c
+/// Shows how to use SPI interface to transfer a number of bytes to and from an SPI device
diff --git a/samples/C++/epoll_reactor.ipp b/samples/C++/epoll_reactor.ipp
new file mode 100644
index 00000000..5d592aff
--- /dev/null
+++ b/samples/C++/epoll_reactor.ipp
@@ -0,0 +1,664 @@
+//
+// detail/impl/epoll_reactor.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP
+#define BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include
+
+#if defined(BOOST_ASIO_HAS_EPOLL)
+
+#include
+#include
+#include
+#include
+#include
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+# include
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+#include
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+epoll_reactor::epoll_reactor(boost::asio::io_service& io_service)
+ : boost::asio::detail::service_base(io_service),
+ io_service_(use_service(io_service)),
+ mutex_(),
+ interrupter_(),
+ epoll_fd_(do_epoll_create()),
+ timer_fd_(do_timerfd_create()),
+ shutdown_(false)
+{
+ // Add the interrupter's descriptor to epoll.
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLET;
+ ev.data.ptr = &interrupter_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev);
+ interrupter_.interrupt();
+
+ // Add the timer descriptor to epoll.
+ if (timer_fd_ != -1)
+ {
+ ev.events = EPOLLIN | EPOLLERR;
+ ev.data.ptr = &timer_fd_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev);
+ }
+}
+
+epoll_reactor::~epoll_reactor()
+{
+ if (epoll_fd_ != -1)
+ close(epoll_fd_);
+ if (timer_fd_ != -1)
+ close(timer_fd_);
+}
+
+void epoll_reactor::shutdown_service()
+{
+ mutex::scoped_lock lock(mutex_);
+ shutdown_ = true;
+ lock.unlock();
+
+ op_queue ops;
+
+ while (descriptor_state* state = registered_descriptors_.first())
+ {
+ for (int i = 0; i < max_ops; ++i)
+ ops.push(state->op_queue_[i]);
+ state->shutdown_ = true;
+ registered_descriptors_.free(state);
+ }
+
+ timer_queues_.get_all_timers(ops);
+
+ io_service_.abandon_operations(ops);
+}
+
+void epoll_reactor::fork_service(boost::asio::io_service::fork_event fork_ev)
+{
+ if (fork_ev == boost::asio::io_service::fork_child)
+ {
+ if (epoll_fd_ != -1)
+ ::close(epoll_fd_);
+ epoll_fd_ = -1;
+ epoll_fd_ = do_epoll_create();
+
+ if (timer_fd_ != -1)
+ ::close(timer_fd_);
+ timer_fd_ = -1;
+ timer_fd_ = do_timerfd_create();
+
+ interrupter_.recreate();
+
+ // Add the interrupter's descriptor to epoll.
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLET;
+ ev.data.ptr = &interrupter_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, interrupter_.read_descriptor(), &ev);
+ interrupter_.interrupt();
+
+ // Add the timer descriptor to epoll.
+ if (timer_fd_ != -1)
+ {
+ ev.events = EPOLLIN | EPOLLERR;
+ ev.data.ptr = &timer_fd_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, timer_fd_, &ev);
+ }
+
+ update_timeout();
+
+ // Re-register all descriptors with epoll.
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ for (descriptor_state* state = registered_descriptors_.first();
+ state != 0; state = state->next_)
+ {
+ ev.events = state->registered_events_;
+ ev.data.ptr = state;
+ int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, state->descriptor_, &ev);
+ if (result != 0)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "epoll re-registration");
+ }
+ }
+ }
+}
+
+void epoll_reactor::init_task()
+{
+ io_service_.init_task();
+}
+
+int epoll_reactor::register_descriptor(socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data)
+{
+ descriptor_data = allocate_descriptor_state();
+
+ {
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ descriptor_data->reactor_ = this;
+ descriptor_data->descriptor_ = descriptor;
+ descriptor_data->shutdown_ = false;
+ }
+
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET;
+ descriptor_data->registered_events_ = ev.events;
+ ev.data.ptr = descriptor_data;
+ int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev);
+ if (result != 0)
+ return errno;
+
+ return 0;
+}
+
+int epoll_reactor::register_internal_descriptor(
+ int op_type, socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op)
+{
+ descriptor_data = allocate_descriptor_state();
+
+ {
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ descriptor_data->reactor_ = this;
+ descriptor_data->descriptor_ = descriptor;
+ descriptor_data->shutdown_ = false;
+ descriptor_data->op_queue_[op_type].push(op);
+ }
+
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLHUP | EPOLLPRI | EPOLLET;
+ descriptor_data->registered_events_ = ev.events;
+ ev.data.ptr = descriptor_data;
+ int result = epoll_ctl(epoll_fd_, EPOLL_CTL_ADD, descriptor, &ev);
+ if (result != 0)
+ return errno;
+
+ return 0;
+}
+
+void epoll_reactor::move_descriptor(socket_type,
+ epoll_reactor::per_descriptor_data& target_descriptor_data,
+ epoll_reactor::per_descriptor_data& source_descriptor_data)
+{
+ target_descriptor_data = source_descriptor_data;
+ source_descriptor_data = 0;
+}
+
+void epoll_reactor::start_op(int op_type, socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data, reactor_op* op,
+ bool is_continuation, bool allow_speculative)
+{
+ if (!descriptor_data)
+ {
+ op->ec_ = boost::asio::error::bad_descriptor;
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (descriptor_data->shutdown_)
+ {
+ post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (descriptor_data->op_queue_[op_type].empty())
+ {
+ if (allow_speculative
+ && (op_type != read_op
+ || descriptor_data->op_queue_[except_op].empty()))
+ {
+ if (op->perform())
+ {
+ descriptor_lock.unlock();
+ io_service_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+
+ if (op_type == write_op)
+ {
+ if ((descriptor_data->registered_events_ & EPOLLOUT) == 0)
+ {
+ epoll_event ev = { 0, { 0 } };
+ ev.events = descriptor_data->registered_events_ | EPOLLOUT;
+ ev.data.ptr = descriptor_data;
+ if (epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev) == 0)
+ {
+ descriptor_data->registered_events_ |= ev.events;
+ }
+ else
+ {
+ op->ec_ = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+ io_service_.post_immediate_completion(op, is_continuation);
+ return;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (op_type == write_op)
+ {
+ descriptor_data->registered_events_ |= EPOLLOUT;
+ }
+
+ epoll_event ev = { 0, { 0 } };
+ ev.events = descriptor_data->registered_events_;
+ ev.data.ptr = descriptor_data;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, descriptor, &ev);
+ }
+ }
+
+ descriptor_data->op_queue_[op_type].push(op);
+ io_service_.work_started();
+}
+
+void epoll_reactor::cancel_ops(socket_type,
+ epoll_reactor::per_descriptor_data& descriptor_data)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ op_queue ops;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ while (reactor_op* op = descriptor_data->op_queue_[i].front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ descriptor_data->op_queue_[i].pop();
+ ops.push(op);
+ }
+ }
+
+ descriptor_lock.unlock();
+
+ io_service_.post_deferred_completions(ops);
+}
+
+void epoll_reactor::deregister_descriptor(socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data, bool closing)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (!descriptor_data->shutdown_)
+ {
+ if (closing)
+ {
+ // The descriptor will be automatically removed from the epoll set when
+ // it is closed.
+ }
+ else
+ {
+ epoll_event ev = { 0, { 0 } };
+ epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev);
+ }
+
+ op_queue ops;
+ for (int i = 0; i < max_ops; ++i)
+ {
+ while (reactor_op* op = descriptor_data->op_queue_[i].front())
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ descriptor_data->op_queue_[i].pop();
+ ops.push(op);
+ }
+ }
+
+ descriptor_data->descriptor_ = -1;
+ descriptor_data->shutdown_ = true;
+
+ descriptor_lock.unlock();
+
+ free_descriptor_state(descriptor_data);
+ descriptor_data = 0;
+
+ io_service_.post_deferred_completions(ops);
+ }
+}
+
+void epoll_reactor::deregister_internal_descriptor(socket_type descriptor,
+ epoll_reactor::per_descriptor_data& descriptor_data)
+{
+ if (!descriptor_data)
+ return;
+
+ mutex::scoped_lock descriptor_lock(descriptor_data->mutex_);
+
+ if (!descriptor_data->shutdown_)
+ {
+ epoll_event ev = { 0, { 0 } };
+ epoll_ctl(epoll_fd_, EPOLL_CTL_DEL, descriptor, &ev);
+
+ op_queue ops;
+ for (int i = 0; i < max_ops; ++i)
+ ops.push(descriptor_data->op_queue_[i]);
+
+ descriptor_data->descriptor_ = -1;
+ descriptor_data->shutdown_ = true;
+
+ descriptor_lock.unlock();
+
+ free_descriptor_state(descriptor_data);
+ descriptor_data = 0;
+ }
+}
+
+void epoll_reactor::run(bool block, op_queue& ops)
+{
+ // This code relies on the fact that the task_io_service queues the reactor
+ // task behind all descriptor operations generated by this function. This
+ // means, that by the time we reach this point, any previously returned
+ // descriptor operations have already been dequeued. Therefore it is now safe
+ // for us to reuse and return them for the task_io_service to queue again.
+
+ // Calculate a timeout only if timerfd is not used.
+ int timeout;
+ if (timer_fd_ != -1)
+ timeout = block ? -1 : 0;
+ else
+ {
+ mutex::scoped_lock lock(mutex_);
+ timeout = block ? get_timeout() : 0;
+ }
+
+ // Block on the epoll descriptor.
+ epoll_event events[128];
+ int num_events = epoll_wait(epoll_fd_, events, 128, timeout);
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ bool check_timers = (timer_fd_ == -1);
+#else // defined(BOOST_ASIO_HAS_TIMERFD)
+ bool check_timers = true;
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+ // Dispatch the waiting events.
+ for (int i = 0; i < num_events; ++i)
+ {
+ void* ptr = events[i].data.ptr;
+ if (ptr == &interrupter_)
+ {
+ // No need to reset the interrupter since we're leaving the descriptor
+ // in a ready-to-read state and relying on edge-triggered notifications
+ // to make it so that we only get woken up when the descriptor's epoll
+ // registration is updated.
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ if (timer_fd_ == -1)
+ check_timers = true;
+#else // defined(BOOST_ASIO_HAS_TIMERFD)
+ check_timers = true;
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ }
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ else if (ptr == &timer_fd_)
+ {
+ check_timers = true;
+ }
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ else
+ {
+ // The descriptor operation doesn't count as work in and of itself, so we
+ // don't call work_started() here. This still allows the io_service to
+ // stop if the only remaining operations are descriptor operations.
+ descriptor_state* descriptor_data = static_cast(ptr);
+ descriptor_data->set_ready_events(events[i].events);
+ ops.push(descriptor_data);
+ }
+ }
+
+ if (check_timers)
+ {
+ mutex::scoped_lock common_lock(mutex_);
+ timer_queues_.get_ready_timers(ops);
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ if (timer_fd_ != -1)
+ {
+ itimerspec new_timeout;
+ itimerspec old_timeout;
+ int flags = get_timeout(new_timeout);
+ timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout);
+ }
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ }
+}
+
+void epoll_reactor::interrupt()
+{
+ epoll_event ev = { 0, { 0 } };
+ ev.events = EPOLLIN | EPOLLERR | EPOLLET;
+ ev.data.ptr = &interrupter_;
+ epoll_ctl(epoll_fd_, EPOLL_CTL_MOD, interrupter_.read_descriptor(), &ev);
+}
+
+int epoll_reactor::do_epoll_create()
+{
+#if defined(EPOLL_CLOEXEC)
+ int fd = epoll_create1(EPOLL_CLOEXEC);
+#else // defined(EPOLL_CLOEXEC)
+ int fd = -1;
+ errno = EINVAL;
+#endif // defined(EPOLL_CLOEXEC)
+
+ if (fd == -1 && (errno == EINVAL || errno == ENOSYS))
+ {
+ fd = epoll_create(epoll_size);
+ if (fd != -1)
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+ }
+
+ if (fd == -1)
+ {
+ boost::system::error_code ec(errno,
+ boost::asio::error::get_system_category());
+ boost::asio::detail::throw_error(ec, "epoll");
+ }
+
+ return fd;
+}
+
+int epoll_reactor::do_timerfd_create()
+{
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+# if defined(TFD_CLOEXEC)
+ int fd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC);
+# else // defined(TFD_CLOEXEC)
+ int fd = -1;
+ errno = EINVAL;
+# endif // defined(TFD_CLOEXEC)
+
+ if (fd == -1 && errno == EINVAL)
+ {
+ fd = timerfd_create(CLOCK_MONOTONIC, 0);
+ if (fd != -1)
+ ::fcntl(fd, F_SETFD, FD_CLOEXEC);
+ }
+
+ return fd;
+#else // defined(BOOST_ASIO_HAS_TIMERFD)
+ return -1;
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+}
+
+epoll_reactor::descriptor_state* epoll_reactor::allocate_descriptor_state()
+{
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ return registered_descriptors_.alloc();
+}
+
+void epoll_reactor::free_descriptor_state(epoll_reactor::descriptor_state* s)
+{
+ mutex::scoped_lock descriptors_lock(registered_descriptors_mutex_);
+ registered_descriptors_.free(s);
+}
+
+void epoll_reactor::do_add_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.insert(&queue);
+}
+
+void epoll_reactor::do_remove_timer_queue(timer_queue_base& queue)
+{
+ mutex::scoped_lock lock(mutex_);
+ timer_queues_.erase(&queue);
+}
+
+void epoll_reactor::update_timeout()
+{
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+ if (timer_fd_ != -1)
+ {
+ itimerspec new_timeout;
+ itimerspec old_timeout;
+ int flags = get_timeout(new_timeout);
+ timerfd_settime(timer_fd_, flags, &new_timeout, &old_timeout);
+ return;
+ }
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+ interrupt();
+}
+
+int epoll_reactor::get_timeout()
+{
+ // By default we will wait no longer than 5 minutes. This will ensure that
+ // any changes to the system clock are detected after no longer than this.
+ return timer_queues_.wait_duration_msec(5 * 60 * 1000);
+}
+
+#if defined(BOOST_ASIO_HAS_TIMERFD)
+int epoll_reactor::get_timeout(itimerspec& ts)
+{
+ ts.it_interval.tv_sec = 0;
+ ts.it_interval.tv_nsec = 0;
+
+ long usec = timer_queues_.wait_duration_usec(5 * 60 * 1000 * 1000);
+ ts.it_value.tv_sec = usec / 1000000;
+ ts.it_value.tv_nsec = usec ? (usec % 1000000) * 1000 : 1;
+
+ return usec ? 0 : TFD_TIMER_ABSTIME;
+}
+#endif // defined(BOOST_ASIO_HAS_TIMERFD)
+
+struct epoll_reactor::perform_io_cleanup_on_block_exit
+{
+ explicit perform_io_cleanup_on_block_exit(epoll_reactor* r)
+ : reactor_(r), first_op_(0)
+ {
+ }
+
+ ~perform_io_cleanup_on_block_exit()
+ {
+ if (first_op_)
+ {
+ // Post the remaining completed operations for invocation.
+ if (!ops_.empty())
+ reactor_->io_service_.post_deferred_completions(ops_);
+
+ // A user-initiated operation has completed, but there's no need to
+ // explicitly call work_finished() here. Instead, we'll take advantage of
+ // the fact that the task_io_service will call work_finished() once we
+ // return.
+ }
+ else
+ {
+ // No user-initiated operations have completed, so we need to compensate
+ // for the work_finished() call that the task_io_service will make once
+ // this operation returns.
+ reactor_->io_service_.work_started();
+ }
+ }
+
+ epoll_reactor* reactor_;
+ op_queue ops_;
+ operation* first_op_;
+};
+
+epoll_reactor::descriptor_state::descriptor_state()
+ : operation(&epoll_reactor::descriptor_state::do_complete)
+{
+}
+
+operation* epoll_reactor::descriptor_state::perform_io(uint32_t events)
+{
+ mutex_.lock();
+ perform_io_cleanup_on_block_exit io_cleanup(reactor_);
+ mutex::scoped_lock descriptor_lock(mutex_, mutex::scoped_lock::adopt_lock);
+
+ // Exception operations must be processed first to ensure that any
+ // out-of-band data is read before normal data.
+ static const int flag[max_ops] = { EPOLLIN, EPOLLOUT, EPOLLPRI };
+ for (int j = max_ops - 1; j >= 0; --j)
+ {
+ if (events & (flag[j] | EPOLLERR | EPOLLHUP))
+ {
+ while (reactor_op* op = op_queue_[j].front())
+ {
+ if (op->perform())
+ {
+ op_queue_[j].pop();
+ io_cleanup.ops_.push(op);
+ }
+ else
+ break;
+ }
+ }
+ }
+
+ // The first operation will be returned for completion now. The others will
+ // be posted for later by the io_cleanup object's destructor.
+ io_cleanup.first_op_ = io_cleanup.ops_.front();
+ io_cleanup.ops_.pop();
+ return io_cleanup.first_op_;
+}
+
+void epoll_reactor::descriptor_state::do_complete(
+ io_service_impl* owner, operation* base,
+ const boost::system::error_code& ec, std::size_t bytes_transferred)
+{
+ if (owner)
+ {
+ descriptor_state* descriptor_data = static_cast(base);
+ uint32_t events = static_cast(bytes_transferred);
+ if (operation* op = descriptor_data->perform_io(events))
+ {
+ op->complete(*owner, ec, 0);
+ }
+ }
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include
+
+#endif // defined(BOOST_ASIO_HAS_EPOLL)
+
+#endif // BOOST_ASIO_DETAIL_IMPL_EPOLL_REACTOR_IPP
diff --git a/samples/C++/libcanister.h b/samples/C++/libcanister.h
new file mode 100644
index 00000000..b7d82a52
--- /dev/null
+++ b/samples/C++/libcanister.h
@@ -0,0 +1,138 @@
+#ifndef LIBCANIH
+#define LIBCANIH
+#include
+#include
+#include
+#include
+
+#define int64 unsigned long long
+//#define DEBUG
+
+#ifdef DEBUG
+#define dout cout
+#else
+#define dout if (0) cerr
+#endif
+
+using namespace std;
+
+namespace libcanister
+{
+
+ //the canmem object is a generic memory container used commonly
+ //throughout the canister framework to hold memory of uncertain
+ //length which may or may not contain null bytes.
+ class canmem
+ {
+ public:
+ char* data; //the raw memory block
+ int size; //the absolute length of the block
+ canmem(); //creates an unallocated canmem
+ canmem(int allocsize); //creates an allocated, blank canmem of size
+ canmem(char* strdata); //automates the creation of zero-limited canmems
+ ~canmem(); //cleans up the canmem
+ void zeromem(); //overwrites this canmem
+ void fragmem(); //overwrites this canmem with fragment notation
+ void countlen(); //counts length of zero-limited strings and stores it in size
+ void trim(); //removes any nulls from the end of the string
+ static canmem null(); //returns a singleton null canmem
+
+ };
+
+ //contains information about the canister
+ class caninfo
+ {
+ public:
+ canmem path; //physical path
+ canmem internalname; //a name for the canister
+ int numfiles; //the number of files in the canister
+ };
+
+ //necessary for the use of this class as a type in canfile
+ class canister;
+
+ //this object holds the definition of a 'file' within the
+ //canister 'filesystem.'
+ class canfile
+ {
+ public:
+ libcanister::canister* parent; //the canister that holds this file
+ canmem path; //internal path ('filename')
+ canmem data; //the file's decompressed contents
+ int isfrag; //0 = probably not fragment, 1 = definitely a fragment (ignore)
+ int cfid; //'canfile id' -- a unique ID for this file
+ int64 dsize; //ondisk size (compressed form size)
+ int cachestate; //0 = not in memory, 1 = in memory, 2 = in memory and needs flush
+ //-1 = error, check the data for the message
+ void cache(); //pull the file from disk and cache it in memory
+ void cachedump(); //deletes the contents of this file from the memory cache after assuring the on disk copy is up to date
+ void cachedumpfinal(fstream& infile); //same as cachedump, but more efficient during closing procedures
+ void flush(); //updates the on disk copy, but retains the memory cache
+ };
+
+ //the primary class
+ //this defines and controls a single canister
+ class canister
+ {
+ //table of contents
+ //absolutely worthless to the control code in the canister
+ //but quite useful to programs using the API, as they may
+ //desire to enumerate the files in a canister for a user's
+ //use or for their own.
+ //contains a newline-delimited list of files in the container.
+ canfile TOC;
+ public:
+ caninfo info; //the general info about this canister
+
+ //the raw canfiles -- recommended that programs do not modify
+ //these files directly, but not enforced.
+ canfile* files;
+ bool readonly; //if true then no write routines will do anything
+
+ //maximum number of files to have in memory at any given
+ //time, change this to whatever suits your application.
+ int cachemax;
+ int cachecnt; //number of files in the cache (should not be modified)
+
+ //both initialize the canister from a physical location
+ canister (canmem fspath);
+ canister (char* fspath);
+
+ //destroys the canister (after flushing the modded buffers, of course)
+ ~canister();
+
+ //open the fspath
+ //does it exist?
+ // | --- yes --- opening it (return 1)
+ // | --- yes --- file is corrupted, halting (return -1)
+ // | --- no --- making a new one (return 0)
+ int open();
+
+ //close the canister, flush all buffers, clean up
+ int close();
+
+ //deletes the file at path inside this canister
+ int delFile(canmem path);
+
+ //pulls the contents of the file from disk or memory and returns it as a file
+ canfile getFile(canmem path);
+
+ //creates a file if it does not exist, otherwise overwrites
+ //returns whether operation succeeded
+ bool writeFile(canmem path, canmem data);
+ bool writeFile(canfile file);
+
+ //get the 'table of contents', a file containing a newline delimited
+ //list of the file paths in the container which have contents
+ canfile getTOC();
+
+ //brings the cache back within the cachemax limit
+ //important: sCFID is the safe CFID
+ //(the CFID of the file we want to avoid uncaching)
+ //really just used internally, but it can't do any harm.
+ void cacheclean(int sCFID, bool dFlush = false);
+ };
+
+}
+
+#endif
\ No newline at end of file
diff --git a/samples/C++/metrics.h b/samples/C++/metrics.h
new file mode 100644
index 00000000..b6da859d
--- /dev/null
+++ b/samples/C++/metrics.h
@@ -0,0 +1,92 @@
+// Copyright 2011 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef NINJA_METRICS_H_
+#define NINJA_METRICS_H_
+
+#include
+#include
+using namespace std;
+
+#include "util.h" // For int64_t.
+
+/// The Metrics module is used for the debug mode that dumps timing stats of
+/// various actions. To use, see METRIC_RECORD below.
+
+/// A single metrics we're tracking, like "depfile load time".
+struct Metric {
+ string name;
+ /// Number of times we've hit the code path.
+ int count;
+ /// Total time (in micros) we've spent on the code path.
+ int64_t sum;
+};
+
+
+/// A scoped object for recording a metric across the body of a function.
+/// Used by the METRIC_RECORD macro.
+struct ScopedMetric {
+ explicit ScopedMetric(Metric* metric);
+ ~ScopedMetric();
+
+private:
+ Metric* metric_;
+ /// Timestamp when the measurement started.
+ /// Value is platform-dependent.
+ int64_t start_;
+};
+
+/// The singleton that stores metrics and prints the report.
+struct Metrics {
+ Metric* NewMetric(const string& name);
+
+ /// Print a summary report to stdout.
+ void Report();
+
+private:
+ vector metrics_;
+};
+
+/// Get the current time as relative to some epoch.
+/// Epoch varies between platforms; only useful for measuring elapsed time.
+int64_t GetTimeMillis();
+
+/// A simple stopwatch which returns the time
+/// in seconds since Restart() was called.
+struct Stopwatch {
+ public:
+ Stopwatch() : started_(0) {}
+
+ /// Seconds since Restart() call.
+ double Elapsed() const {
+ return 1e-6 * static_cast(Now() - started_);
+ }
+
+ void Restart() { started_ = Now(); }
+
+ private:
+ uint64_t started_;
+ uint64_t Now() const;
+};
+
+/// The primary interface to metrics. Use METRIC_RECORD("foobar") at the top
+/// of a function to get timing stats recorded for each call of the function.
+#define METRIC_RECORD(name) \
+ static Metric* metrics_h_metric = \
+ g_metrics ? g_metrics->NewMetric(name) : NULL; \
+ ScopedMetric metrics_h_scoped(metrics_h_metric);
+
+extern Metrics* g_metrics;
+
+#endif // NINJA_METRICS_H_
diff --git a/samples/C++/render_adapter.cpp b/samples/C++/render_adapter.cpp
new file mode 100644
index 00000000..4a18f6f6
--- /dev/null
+++ b/samples/C++/render_adapter.cpp
@@ -0,0 +1,6 @@
+#include
+
+namespace Gui
+{
+
+}
diff --git a/samples/C++/rpc.h b/samples/C++/rpc.h
new file mode 100644
index 00000000..ce810992
--- /dev/null
+++ b/samples/C++/rpc.h
@@ -0,0 +1,26 @@
+// Copyright (C) 2013 Simon Que
+//
+// This file is part of DuinoCube.
+//
+// DuinoCube is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// DuinoCube is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with DuinoCube. If not, see .
+
+// DuinoCube remote procedure call functions.
+
+#include
+
+// Initializes RPC system.
+void rpc_init();
+
+// Runs the RPC server loop forever.
+void rpc_server_loop();
diff --git a/samples/C/bootstrap.h b/samples/C/bootstrap.h
new file mode 100644
index 00000000..8c29de82
--- /dev/null
+++ b/samples/C/bootstrap.h
@@ -0,0 +1,102 @@
+#ifndef BOOTSTRAP_H
+#define BOOTSTRAP_H
+
+#include
+#include "cxrs.h"
+
+/* If we're not using GNU C, elide __attribute__ */
+#ifndef __GNUC__
+# define __attribute__(x) /*NOTHING*/
+#endif
+
+typedef struct object object;
+
+object *true;
+object *false;
+object *eof;
+object *empty_list;
+object *global_enviroment;
+
+enum obj_type {
+ scm_bool,
+ scm_empty_list,
+ scm_eof,
+ scm_char,
+ scm_int,
+ scm_pair,
+ scm_symbol,
+ scm_prim_fun,
+ scm_lambda,
+ scm_str,
+ scm_file
+};
+
+typedef object *(*prim_proc)(object *args);
+
+object *read(FILE *in);
+object *eval(object *code, object *env);
+void print(FILE *out, object *obj, int display);
+
+int check_type(enum obj_type type, object *obj, int err_on_false);
+
+static inline int is_true(object *obj)
+{
+ return obj != false;
+}
+
+object *make_int(int value);
+int obj2int(object *i);
+
+object *make_bool(int value);
+int obj2bool(object *b);
+
+object *make_char(char c);
+char obj2char(object *ch);
+
+object *make_str(char *str);
+char *obj2str(object *str);
+
+object *cons(object *car, object *cdr);
+object *car(object *pair);
+object *cdr(object *pair);
+void set_car(object *pair, object *new);
+void set_cdr(object *pair, object *new);
+
+object *make_symbol(char *name);
+char *sym2str(object *sym);
+object *get_symbol(char *name) __attribute__((pure));
+
+object *make_prim_fun(prim_proc fun);
+prim_proc obj2prim_proc(object *proc);
+
+object *make_lambda(object *args, object *code, object *env);
+object *lambda_code(object *lambda);
+object *lambda_args(object *lambda);
+
+object *make_port(FILE *handle, int direction);
+int port_direction(object *port);
+FILE *port_handle(object *port);
+void set_port_handle_to_null(object *port);
+
+/*both of these should never be called*/
+object *apply_proc(object *);
+object *eval_proc(object *);
+
+
+object *maybe_add_begin(object *code);
+
+void init_enviroment(object *env);
+
+
+void eval_err(char *msg, object *code) __attribute__((noreturn));
+
+void define_var(object *var, object *val, object *env);
+void set_var(object *var, object *val, object *env);
+object *get_var(object *var, object *env);
+
+object *cond2nested_if(object *cond);
+object *let2lambda(object *let);
+object *and2nested_if(object *and);
+object *or2nested_if(object *or);
+
+#endif /*include guard*/
diff --git a/samples/C/dynarray.cats b/samples/C/dynarray.cats
new file mode 100644
index 00000000..95ee54ba
--- /dev/null
+++ b/samples/C/dynarray.cats
@@ -0,0 +1,56 @@
+/* ******************************************************************* */
+/* */
+/* Applied Type System */
+/* */
+/* ******************************************************************* */
+
+/*
+** ATS/Postiats - Unleashing the Potential of Types!
+** Copyright (C) 2011-20?? Hongwei Xi, ATS Trustful Software, Inc.
+** All rights reserved
+**
+** ATS is free software; you can redistribute it and/or modify it under
+** the terms of the GNU GENERAL PUBLIC LICENSE (GPL) as published by the
+** Free Software Foundation; either version 3, or (at your option) any
+** later version.
+**
+** ATS is distributed in the hope that it will be useful, but WITHOUT ANY
+** WARRANTY; without even the implied warranty of MERCHANTABILITY or
+** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+** for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with ATS; see the file COPYING. If not, please write to the
+** Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+** 02110-1301, USA.
+*/
+
+/* ****** ****** */
+
+/*
+(* Author: Hongwei Xi *)
+(* Authoremail: hwxi AT cs DOT bu DOT edu *)
+(* Start time: March, 2013 *)
+*/
+
+/* ****** ****** */
+
+#ifndef ATSHOME_LIBATS_DYNARRAY_CATS
+#define ATSHOME_LIBATS_DYNARRAY_CATS
+
+/* ****** ****** */
+
+#include
+
+/* ****** ****** */
+
+#define atslib_dynarray_memcpy memcpy
+#define atslib_dynarray_memmove memmove
+
+/* ****** ****** */
+
+#endif // ifndef ATSHOME_LIBATS_DYNARRAY_CATS
+
+/* ****** ****** */
+
+/* end of [dynarray.cats] */
diff --git a/samples/C/readline.cats b/samples/C/readline.cats
new file mode 100644
index 00000000..3fad326b
--- /dev/null
+++ b/samples/C/readline.cats
@@ -0,0 +1,47 @@
+/*
+** API in ATS for GNU-readline
+*/
+
+/* ****** ****** */
+
+/*
+** Permission to use, copy, modify, and distribute this software for any
+** purpose with or without fee is hereby granted, provided that the above
+** copyright notice and this permission notice appear in all copies.
+**
+** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+** WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+** MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+** ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+** WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+** ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+
+/* ****** ****** */
+
+#ifndef READLINE_READLINE_CATS
+#define READLINE_READLINE_CATS
+
+/* ****** ****** */
+
+#include
+
+/* ****** ****** */
+//
+#define \
+atscntrb_readline_rl_library_version() ((char*)rl_library_version)
+//
+#define atscntrb_readline_rl_readline_version() (rl_readline_version)
+//
+/* ****** ****** */
+
+#define atscntrb_readline_readline readline
+
+/* ****** ****** */
+
+#endif // ifndef READLINE_READLINE_CATS
+
+/* ****** ****** */
+
+/* end of [readline.cats] */
diff --git a/samples/Cirru/array.cirru b/samples/Cirru/array.cirru
new file mode 100644
index 00000000..9375c650
--- /dev/null
+++ b/samples/Cirru/array.cirru
@@ -0,0 +1,12 @@
+
+print $ array
+ int 1
+ string 2
+
+print $ array
+ int 1
+ array
+ int 2
+ string 3
+ array
+ string 4
\ No newline at end of file
diff --git a/samples/Cirru/block.cirru b/samples/Cirru/block.cirru
new file mode 100644
index 00000000..a9bf0c83
--- /dev/null
+++ b/samples/Cirru/block.cirru
@@ -0,0 +1,7 @@
+
+set f $ block (a b c)
+ print a b c
+
+call f (int 1) (int 2) (int 3)
+
+f (int 1) (int 2) (int 3)
\ No newline at end of file
diff --git a/samples/Cirru/bool.cirru b/samples/Cirru/bool.cirru
new file mode 100644
index 00000000..686d132e
--- /dev/null
+++ b/samples/Cirru/bool.cirru
@@ -0,0 +1,7 @@
+
+print $ bool true
+print $ bool false
+print $ bool yes
+print $ bool no
+print $ bool 1
+print $ bool 0
\ No newline at end of file
diff --git a/samples/Cirru/map.cirru b/samples/Cirru/map.cirru
new file mode 100644
index 00000000..5f445668
--- /dev/null
+++ b/samples/Cirru/map.cirru
@@ -0,0 +1,14 @@
+
+print $ map
+ a $ int 5
+ b $ array (int 1) (int 2)
+ c $ map
+ int 1
+ array (int 4)
+
+set m $ map
+ a $ int 1
+
+set m b $ int 2
+
+print m
\ No newline at end of file
diff --git a/samples/Cirru/number.cirru b/samples/Cirru/number.cirru
new file mode 100644
index 00000000..56e0ac7d
--- /dev/null
+++ b/samples/Cirru/number.cirru
@@ -0,0 +1,3 @@
+
+print $ int 1
+print $ float 1.2
\ No newline at end of file
diff --git a/samples/Cirru/require.cirru b/samples/Cirru/require.cirru
new file mode 100644
index 00000000..53283468
--- /dev/null
+++ b/samples/Cirru/require.cirru
@@ -0,0 +1,2 @@
+
+require ./stdio.cr
diff --git a/samples/Cirru/scope.cirru b/samples/Cirru/scope.cirru
new file mode 100644
index 00000000..9a6512c9
--- /dev/null
+++ b/samples/Cirru/scope.cirru
@@ -0,0 +1,23 @@
+
+set a (int 2)
+
+print (self)
+
+set c (child)
+
+under c
+ under parent
+ print a
+
+print $ get c a
+
+set c x (int 3)
+print $ get c x
+
+set just-print $ code
+ print a
+
+print just-print
+
+eval (self) just-print
+eval just-print
\ No newline at end of file
diff --git a/samples/Cirru/stdio.cirru b/samples/Cirru/stdio.cirru
new file mode 100644
index 00000000..ef5400e6
--- /dev/null
+++ b/samples/Cirru/stdio.cirru
@@ -0,0 +1,55 @@
+
+set a $ string 1
+print a
+
+print (string 1)
+
+print nothing
+
+print
+ map
+ a (int 4)
+ b $ map
+ a $ int 5
+ b $ int 6
+ c $ map
+ int 7
+
+print
+ array
+ int 1
+ int 2
+ array
+ int 3
+ int 4
+
+print
+ array
+ int 1
+ map
+ a $ int 2
+ b $ array
+ int 3
+
+print
+ int 1
+ int 2
+
+print $ code
+ set a 1
+ print (get a)
+ print $ array
+ int a
+ array
+ int a
+
+set container (map)
+set container code $ code
+ set a 1
+ print (get a)
+ print $ array
+ int a
+ array
+ int a
+
+print container
\ No newline at end of file
diff --git a/samples/Cirru/string.cirru b/samples/Cirru/string.cirru
new file mode 100644
index 00000000..d4c4331b
--- /dev/null
+++ b/samples/Cirru/string.cirru
@@ -0,0 +1,3 @@
+
+print $ string a
+print $ string "a b"
\ No newline at end of file
diff --git a/samples/Common Lisp/macros-advanced.cl b/samples/Common Lisp/macros-advanced.cl
new file mode 100644
index 00000000..b746d769
--- /dev/null
+++ b/samples/Common Lisp/macros-advanced.cl
@@ -0,0 +1,82 @@
+;; @file macros-advanced.cl
+;;
+;; @breif Advanced macro practices - defining your own macros
+;;
+;; Macro definition skeleton:
+;; (defmacro name (parameter*)
+;; "Optional documentation string"
+;; body-form*)
+;;
+;; Note that backquote expression is most often used in the `body-form`
+;;
+
+; `primep` test a number for prime
+(defun primep (n)
+ "test a number for prime"
+ (if (< n 2) (return-from primep))
+ (do ((i 2 (1+ i)) (p t (not (zerop (mod n i)))))
+ ((> i (sqrt n)) p)
+ (when (not p) (return))))
+; `next-prime` return the next prime bigger than the specified number
+(defun next-prime (n)
+ "return the next prime bigger than the speicified number"
+ (do ((i (1+ n) (1+ i)))
+ ((primep i) i)))
+;
+; The recommended procedures to writting a new macro are as follows:
+; 1. Write a sample call to the macro and the code it should expand into
+(do-primes (p 0 19)
+ (format t "~d " p))
+; Expected expanded codes
+(do ((p (next-prime (- 0 1)) (next-prime p)))
+ ((> p 19))
+ (format t "~d " p))
+; 2. Write code that generate the hardwritten expansion from the arguments in
+; the sample call
+(defmacro do-primes (var-and-range &rest body)
+ (let ((var (first var-and-range))
+ (start (second var-and-range))
+ (end (third var-and-range)))
+ `(do ((,var (next-prime (- ,start 1)) (next-prime ,var)))
+ ((> ,var ,end))
+ ,@body)))
+; 2-1. More concise implementations with the 'parameter list destructuring' and
+; '&body' synonym, it also emits more friendly messages on incorrent input.
+(defmacro do-primes ((var start end) &body body)
+ `(do ((,var (next-prime (- ,start 1)) (next-prime ,var)))
+ ((> ,var ,end))
+ ,@body))
+; 2-2. Test the result of macro expansion with the `macroexpand-1` function
+(macroexpand-1 '(do-primes (p 0 19) (format t "~d " p)))
+; 3. Make sure the macro abstraction does not "leak"
+(defmacro do-primes ((var start end) &body body)
+ (let ((end-value-name (gensym)))
+ `(do ((,var (next-prime (- ,start 1)) (next-prime ,var))
+ (,end-value-name ,end))
+ ((> ,var ,end-value-name))
+ ,@body)))
+; 3-1. Rules to observe to avoid common and possible leaks
+; a. include any subforms in the expansion in positions that will be evaluated
+; in the same order as the subforms appear in the macro call
+; b. make sure subforms are evaluated only once by creating a variable in the
+; expansion to hold the value of evaluating the argument form, and then
+; using that variable anywhere else the value is needed in the expansion
+; c. use `gensym` at macro expansion time to create variable names used in the
+; expansion
+;
+; Appendix I. Macro-writting macros, 'with-gensyms', to guranttee that rule c
+; gets observed.
+; Example usage of `with-gensyms`
+(defmacro do-primes-a ((var start end) &body body)
+ "do-primes implementation with macro-writting macro 'with-gensyms'"
+ (with-gensyms (end-value-name)
+ `(do ((,var (next-prime (- ,start 1)) (next-prime ,var))
+ (,end-value-name ,end))
+ ((> ,var ,end-value-name))
+ ,@body)))
+; Define the macro, note how comma is used to interpolate the value of the loop
+; expression
+(defmacro with-gensyms ((&rest names) &body body)
+ `(let ,(loop for n in names collect `(,n (gensym)))
+ ,@body)
+)
\ No newline at end of file
diff --git a/samples/Common Lisp/motor-inferencia.cl b/samples/Common Lisp/motor-inferencia.cl
new file mode 100644
index 00000000..6a2a97ea
--- /dev/null
+++ b/samples/Common Lisp/motor-inferencia.cl
@@ -0,0 +1,475 @@
+#|
+ESCUELA POLITECNICA SUPERIOR - UNIVERSIDAD AUTONOMA DE MADRID
+INTELIGENCIA ARTIFICIAL
+
+Motor de inferencia
+Basado en parte en "Paradigms of AI Programming: Case Studies
+in Common Lisp", de Peter Norvig, 1992
+|#
+
+
+;;;;;;;;;;;;;;;;;;;;;
+;;;; Global variables
+;;;;;;;;;;;;;;;;;;;;;
+
+
+(defvar *hypothesis-list*)
+(defvar *rule-list*)
+(defvar *fact-list*)
+
+;;;;;;;;;;;;;;;;;;;;;
+;;;; Constants
+;;;;;;;;;;;;;;;;;;;;;
+
+(defconstant +fail+ nil "Indicates unification failure")
+
+(defconstant +no-bindings+ '((nil))
+ "Indicates unification success, with no variables.")
+
+(defconstant *mundo-abierto* nil)
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Functions for the user
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+;; Resets *fact-list* to NIL
+(defun erase-facts () (setq *fact-list* nil))
+
+(defun set-hypothesis-list (h) (setq *hypothesis-list* h))
+
+
+;; Returns a list of solutions, each one satisfying all the hypothesis contained
+;; in *hypothesis-list*
+(defun motor-inferencia ()
+ (consulta *hypothesis-list*))
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; Auxiliary functions
+;;;;;;;;;;;;;;;;;;;;;;;;
+
+#|____________________________________________________________________________
+FUNCTION: CONSULTA
+
+COMMENTS:
+CONSULTA receives a list of hypothesis (variable ), and returns
+a list of binding lists (each binding list being a solution).
+
+EXAMPLES:
+hypotheses is:
+((brothers ?x ?y) (neighbours juan ?x)).
+
+That is, we are searching the brothers of the possible neighbors of Juan.
+
+The function can return in this case:
+
+(((?x . sergio) (?y . javier)) ((?x . julian) (?y . mario)) ((?x . julian) (?y . pedro))).
+That is, the neighbors of Juan (Sergio and Julian) have 3 brothers in total(Javier, Mario, Pedro)
+____________________________________________________________________________|#
+
+(defun consulta (hypotheses)
+ (if (null hypotheses) (list +no-bindings+)
+ (mapcan #'(lambda (b)
+ (mapcar #'(lambda (x) (une-bindings-con-bindings b x))
+ (consulta (subst-bindings b (rest hypotheses)))))
+ (find-hypothesis-value (first hypotheses)))))
+
+
+
+#|____________________________________________________________________________
+FUNCTION: FIND-HYPOTHESIS-VALUE
+
+COMMENTS:
+This function manages the query a single query (only one hypothesis) given a binding list.
+It tries (in the following order) to:
+- Answer the query from *fact-list*
+- Answer the query from the rules in *rule-list*
+- Ask the user
+
+The function returns a list of solutions (list of binding lists).
+
+EXAMPLES:
+If hypothesis is (brothers ?x ?y)
+and the function returns:
+(((?x . sergio) (?y . javier)) ((?x . julian) (?y . maria)) ((?x . alberto) (?y . pedro))).
+
+Means that Sergio and Javier and brothers, Julian and Mario are brothers, and Alberto and Pedro are brothers.
+____________________________________________________________________________|#
+
+(defun find-hypothesis-value (hypothesis)
+ (let (rules)
+ (cond
+ ((equality? hypothesis)
+ (value-from-equality hypothesis))
+ ((value-from-facts hypothesis))
+ ((setq good-rules (find-rules hypothesis))
+ (value-from-rules hypothesis good-rules))
+ (t (ask-user hypothesis)))))
+
+
+
+; une-bindings-con-bindings takes two binding lists and returns a binding list
+; Assumes that b1 and b2 are not +fail+
+(defun une-bindings-con-bindings (b1 b2)
+ (cond
+ ((equal b1 +no-bindings+) b2)
+ ((equal b2 +no-bindings+) b1)
+ (T (append b1 b2))))
+
+
+
+#|____________________________________________________________________________
+FUNCTION: VALUE-FROM-FACTS
+
+COMMENTS:
+Returns all the solutions of obtained directly from *fact-list*
+
+EXAMPLES:
+> (setf *fact-list* '((man luis) (man pedro)(woman mart)(man daniel)(woman laura)))
+
+> (value-from-facts '(man ?x))
+returns:
+
+(((?X . LUIS)) ((?X . PEDRO)) ((?X . DANIEL)))
+____________________________________________________________________________|#
+
+(defun value-from-facts (hypothesis)
+ (mapcan #'(lambda(x) (let ((aux (unify hypothesis x)))
+ (when aux (list aux)))) *fact-list*))
+
+
+
+
+#|____________________________________________________________________________
+FUNCTION: FIND-RULES
+
+COMMENTS:
+Returns the rules in *rule-list* whose THENs unify with the term given in
+The variables in the rules that satisfy this requirement are renamed.
+
+EXAMPLES:
+> (setq *rule-list*
+ '((R1 (pertenece ?E (?E . ?_)))
+ (R2 (pertenece ?E (?_ . ?Xs)) :- ((pertenece ?E ?Xs)))))
+
+Then:
+> (FIND-RULES (PERTENECE 1 (2 5)))
+returns:
+((R2 (PERTENECE ?E.1 (?_ . ?XS.2)) :- ((PERTENECE ?E.1 ?XS.2))))
+That is, only the THEN of rule R2 unify with
+
+However,
+> (FIND-RULES (PERTENECE 1 (1 6 7)))
+
+returns:
+((R1 (PERTENECE ?E.6 (?E.6 . ?_)))
+ (R2 (PERTENECE ?E.7 (?_ . ?XS.8)) :- ((PERTENECE ?E.7 ?XS.8))))
+So the THEN of both rules unify with
+____________________________________________________________________________|#
+
+(defun find-rules (hypothesis)
+ (mapcan #'(lambda(b) (let ((renamed-rule (rename-variables b)))
+ (when (in-then? hypothesis renamed-rule)
+ (list renamed-rule)))) *rule-list*))
+
+(defun in-then? (hypothesis rule)
+ (unless (null (rule-then rule))
+ (not (equal +fail+ (unify hypothesis (rule-then rule))))))
+
+
+
+#|____________________________________________________________________________
+FUNCTION: VALUE-FROM-RULES
+
+COMMENTS:
+Returns all the solutions to found using all the rules given in
+the list . Note that a single rule can have multiple solutions.
+____________________________________________________________________________|#
+(defun value-from-rules (hypothesis rules)
+ (mapcan #'(lambda (r) (eval-rule hypothesis r)) rules))
+
+(defun limpia-vinculos (termino bindings)
+ (unify termino (subst-bindings bindings termino)))
+
+
+#|____________________________________________________________________________
+FUNCTION: EVAL-RULE
+
+COMMENTS:
+Returns all the solutions found using the rule given as input argument.
+
+EXAMPLES:
+> (setq *rule-list*
+ '((R1 (pertenece ?E (?E . ?_)))
+ (R2 (pertenece ?E (?_ . ?Xs)) :- ((pertenece ?E ?Xs)))))
+Then:
+> (EVAL-RULE
+ (PERTENECE 1 (1 6 7))
+ (R1 (PERTENECE ?E.42 (?E.42 . ?_))))
+returns:
+(((NIL)))
+That is, the query (PERTENECE 1 (1 6 7)) can be proven from the given rule, and
+no binding in the variables in the query is necessary (in fact, the query has no variables).
+On the other hand:
+> (EVAL-RULE
+ (PERTENECE 1 (7))
+ (R2 (PERTENECE ?E.49 (?_ . ?XS.50)) :- ((PERTENECE ?E.49 ?XS.50))))
+returns:
+NIL
+That is, the query can not be proven from the rule R2.
+____________________________________________________________________________|#
+
+(defun eval-rule (hypothesis rule)
+ (let ((bindings-then
+ (unify (rule-then rule) hypothesis)))
+ (unless (equal +fail+ bindings-then)
+ (if (rule-ifs rule)
+ (mapcar #'(lambda(b) (limpia-vinculos hypothesis (append bindings-then b)))
+ (consulta (subst-bindings bindings-then (rule-ifs rule))))
+ (list (limpia-vinculos hypothesis bindings-then))))))
+
+
+(defun ask-user (hypothesis)
+ (let ((question hypothesis))
+ (cond
+ ((variables-in question) +fail+)
+ ((not-in-fact-list? question) +fail+)
+ (*mundo-abierto*
+ (format t "~%Es cierto el hecho ~S? (T/nil)" question)
+ (cond
+ ((read) (add-fact question) +no-bindings+)
+ (T (add-fact (list 'NOT question)) +fail+)))
+ (T +fail+))))
+
+
+; value-from-equality:
+(defun value-from-equality (hypothesis)
+ (let ((new-bindings (unify (second hypothesis) (third hypothesis))))
+ (if (not (equal +fail+ new-bindings))
+ (list new-bindings))))
+
+
+
+#|____________________________________________________________________________
+FUNCTION: UNIFY
+
+COMMENTS:
+Finds the most general unifier of two input expressions, taking into account the
+bindings specified in the input
+In case the two expressions can unify, the function returns the total bindings necessary
+for that unification. Otherwise, returns +fail+
+
+EXAMPLES:
+> (unify '1 '1)
+((NIL)) ;; which is the constant +no-bindings+
+> (unify 1 '2)
+nil ;; which is the constant +fail+
+> (unify '?x 1)
+((?x . 1))
+> (unify '(1 1) ?x)
+((? x 1 1))
+> (unify '?_ '?x)
+((NIL))
+> (unify '(p ?x 1 2) '(p ?y ?_ ?_))
+((?x . ?y))
+> (unify '(?a . ?_) '(1 2 3))
+((?a . 1))
+> (unify '(?_ ?_) '(1 2))
+((nil))
+> (unify '(?a . ?b) '(1 2 3))
+((?b 2 3) (?a . 1))
+> (unify '(?a . ?b) '(?v . ?d))
+((?b . ?d) (?a . ?v))
+> (unify '(?eval (+ 1 1)) '1)
+nil
+> (unify '(?eval (+ 1 1)) '2)
+(nil))
+____________________________________________________________________________|#
+
+(defun unify (x y &optional (bindings +no-bindings+))
+ "See if x and y match with given bindings. If they do,
+ return a binding list that would make them equal [p 303]."
+ (cond ((eq bindings +fail+) +fail+)
+ ((eql x y) bindings)
+ ((eval? x) (unify-eval x y bindings))
+ ((eval? y) (unify-eval y x bindings))
+ ((variable? x) (unify-var x y bindings))
+ ((variable? y) (unify-var y x bindings))
+ ((and (consp x) (consp y))
+ (unify (rest x) (rest y)
+ (unify (first x) (first y) bindings)))
+ (t +fail+)))
+
+
+;; rename-variables: renombra ?X por ?X.1, ?Y por ?Y.2 etc. salvo ?_ que no se renombra
+(defun rename-variables (x)
+ "Replace all variables in x with new ones. Excepto ?_"
+ (sublis (mapcar #'(lambda (var)
+ (if (anonymous-var? var)
+ (make-binding var var)
+ (make-binding var (new-variable var))))
+ (variables-in x))
+ x))
+
+
+
+;;;; Auxiliary Functions
+
+(defun unify-var (var x bindings)
+ "Unify var with x, using (and maybe extending) bindings [p 303]."
+ (cond ((or (anonymous-var? var)(anonymous-var? x)) bindings)
+ ((get-binding var bindings)
+ (unify (lookup var bindings) x bindings))
+ ((and (variable? x) (get-binding x bindings))
+ (unify var (lookup x bindings) bindings))
+ ((occurs-in? var x bindings)
+ +fail+)
+ (t (extend-bindings var x bindings))))
+
+(defun variable? (x)
+ "Is x a variable (a symbol starting with ?)?"
+ (and (symbolp x) (eql (char (symbol-name x) 0) #\?)))
+
+(defun get-binding (var bindings)
+ "Find a (variable . value) pair in a binding list."
+ (assoc var bindings))
+
+(defun binding-var (binding)
+ "Get the variable part of a single binding."
+ (car binding))
+
+(defun binding-val (binding)
+ "Get the value part of a single binding."
+ (cdr binding))
+
+(defun make-binding (var val) (cons var val))
+
+(defun lookup (var bindings)
+ "Get the value part (for var) from a binding list."
+ (binding-val (get-binding var bindings)))
+
+(defun extend-bindings (var val bindings)
+ "Add a (var . value) pair to a binding list."
+ (append
+ (unless (eq bindings +no-bindings+) bindings)
+ (list (make-binding var val))))
+
+(defun occurs-in? (var x bindings)
+ "Does var occur anywhere inside x?"
+ (cond ((eq var x) t)
+ ((and (variable? x) (get-binding x bindings))
+ (occurs-in? var (lookup x bindings) bindings))
+ ((consp x) (or (occurs-in? var (first x) bindings)
+ (occurs-in? var (rest x) bindings)))
+ (t nil)))
+
+(defun subst-bindings (bindings x)
+ "Substitute the value of variables in bindings into x,
+ taking recursively bound variables into account."
+ (cond ((eq bindings +fail+) +fail+)
+ ((eq bindings +no-bindings+) x)
+ ((and (listp x) (eq '?eval (car x)))
+ (subst-bindings-quote bindings x))
+ ((and (variable? x) (get-binding x bindings))
+ (subst-bindings bindings (lookup x bindings)))
+ ((atom x) x)
+ (t (cons (subst-bindings bindings (car x)) ;; s/reuse-cons/cons
+ (subst-bindings bindings (cdr x))))))
+
+(defun unifier (x y)
+ "Return something that unifies with both x and y (or fail)."
+ (subst-bindings (unify x y) x))
+
+(defun variables-in (exp)
+ "Return a list of all the variables in EXP."
+ (unique-find-anywhere-if #'variable? exp))
+
+(defun unique-find-anywhere-if (predicate tree &optional found-so-far)
+ "Return a list of leaves of tree satisfying predicate,
+ with duplicates removed."
+ (if (atom tree)
+ (if (funcall predicate tree)
+ (pushnew tree found-so-far)
+ found-so-far)
+ (unique-find-anywhere-if
+ predicate
+ (first tree)
+ (unique-find-anywhere-if predicate (rest tree)
+ found-so-far))))
+
+(defun find-anywhere-if (predicate tree)
+ "Does predicate apply to any atom in the tree?"
+ (if (atom tree)
+ (funcall predicate tree)
+ (or (find-anywhere-if predicate (first tree))
+ (find-anywhere-if predicate (rest tree)))))
+
+(defun new-variable (var)
+ "Create a new variable. Assumes user never types variables of form ?X.9"
+ (gentemp (format nil "~S." var)))
+; (gentemp "?") )
+;;;
+
+(defun anonymous-var? (x)
+ (eq x '?_))
+
+(defun subst-bindings-quote (bindings x)
+ "Substitute the value of variables in bindings into x,
+ taking recursively bound variables into account."
+ (cond ((eq bindings +fail+) +fail+)
+ ((eq bindings +no-bindings+) x)
+ ((and (variable? x) (get-binding x bindings))
+ (if (variable? (lookup x bindings))
+ (subst-bindings-quote bindings (lookup x bindings))
+ (subst-bindings-quote bindings (list 'quote (lookup x bindings)))
+ )
+ )
+ ((atom x) x)
+ (t (cons (subst-bindings-quote bindings (car x)) ;; s/reuse-cons/cons
+ (subst-bindings-quote bindings (cdr x))))))
+
+(defun eval? (x)
+ (and (consp x) (eq (first x) '?eval)))
+
+(defun unify-eval (x y bindings)
+ (let ((exp (subst-bindings-quote bindings (second x))))
+ (if (variables-in exp)
+ +fail+
+ (unify (eval exp) y bindings))))
+
+
+
+(defun rule-ifs (rule) (fourth rule))
+(defun rule-then (rule) (second rule))
+
+
+(defun equality? (term)
+ (and (consp term) (eql (first term) '?=)))
+
+
+(defun in-fact-list? (expresion)
+ (some #'(lambda(x) (equal x expresion)) *fact-list*))
+
+(defun not-in-fact-list? (expresion)
+ (if (eq (car expresion) 'NOT)
+ (in-fact-list? (second expresion))
+ (in-fact-list? (list 'NOT expresion))))
+
+
+;; add-fact:
+
+(defun add-fact (fact)
+ (setq *fact-list* (cons fact *fact-list*)))
+
+
+(defun variable? (x)
+ "Is x a variable (a symbol starting with ?) except ?eval and ?="
+ (and (not (equal x '?eval)) (not (equal x '?=))
+ (symbolp x) (eql (char (symbol-name x) 0) #\?)))
+
+
+;; EOF
\ No newline at end of file
diff --git a/samples/Component Pascal/Example.cp b/samples/Component Pascal/Example.cp
new file mode 100644
index 00000000..5bace2c4
--- /dev/null
+++ b/samples/Component Pascal/Example.cp
@@ -0,0 +1,130 @@
+MODULE ObxControls;
+(**
+ project = "BlackBox"
+ organization = "www.oberon.ch"
+ contributors = "Oberon microsystems"
+ version = "System/Rsrc/About"
+ copyright = "System/Rsrc/About"
+ license = "Docu/BB-License"
+ changes = ""
+ issues = ""
+
+**)
+
+IMPORT Dialog, Ports, Properties, Views;
+
+CONST beginner = 0; advanced = 1; expert = 2; guru = 3; (* user classes *)
+
+TYPE
+ View = POINTER TO RECORD (Views.View)
+ size: INTEGER (* border size in mm *)
+ END;
+
+VAR
+ data*: RECORD
+ class*: INTEGER; (* current user class *)
+ list*: Dialog.List; (* list of currently available sizes, derived from class *)
+ width*: INTEGER (* width of next view to be opened. Derived from
+ class, or entered through a text entry field *)
+ END;
+
+ predef: ARRAY 6 OF INTEGER; (* table of predefined sizes *)
+
+
+PROCEDURE SetList;
+BEGIN
+ IF data.class = beginner THEN
+ data.list.SetLen(1);
+ data.list.SetItem(0, "default")
+ ELSIF data.class = advanced THEN
+ data.list.SetLen(4);
+ data.list.SetItem(0, "default");
+ data.list.SetItem(1, "small");
+ data.list.SetItem(2, "medium");
+ data.list.SetItem(3, "large");
+ ELSE
+ data.list.SetLen(6);
+ data.list.SetItem(0, "default");
+ data.list.SetItem(1, "small");
+ data.list.SetItem(2, "medium");
+ data.list.SetItem(3, "large");
+ data.list.SetItem(4, "tiny");
+ data.list.SetItem(5, "huge");
+ END
+END SetList;
+
+(* View *)
+
+PROCEDURE (v: View) CopyFromSimpleView (source: Views.View);
+BEGIN
+ v.size := source(View).size
+END CopyFromSimpleView;
+
+PROCEDURE (v: View) Restore (f: Views.Frame; l, t, r, b: INTEGER);
+BEGIN (* fill view with a red square of size v.size *)
+ IF v.size = 0 THEN v.size := predef[0] END; (* lazy initialization of size *)
+ f.DrawRect(0, 0, v.size, v.size, Ports.fill, Ports.red)
+END Restore;
+
+PROCEDURE (v: View) HandlePropMsg (VAR msg: Views.PropMessage);
+BEGIN
+ WITH msg: Properties.SizePref DO
+ IF v.size = 0 THEN v.size := predef[0] END; (* lazy initialization of size *)
+ msg.w := v.size; msg.h := v.size (* tell environment about desired width and height *)
+ ELSE (* ignore other messages *)
+ END
+END HandlePropMsg;
+
+(* notifiers *)
+
+PROCEDURE ClassNotify* (op, from, to: INTEGER);
+BEGIN (* react to change in data.class *)
+ IF op = Dialog.changed THEN
+ IF (to = beginner) OR (to = advanced) & (data.list.index > 3) THEN
+ (* if class is reduced, make sure that selection contains legal elements *)
+ data.list.index := 0; data.width := predef[0]; (* modify interactor *)
+ Dialog.Update(data) (* redraw controls where necessary *)
+ END;
+ SetList;
+ Dialog.UpdateList(data.list) (* reconstruct list box contents *)
+ END
+END ClassNotify;
+
+PROCEDURE ListNotify* (op, from, to: INTEGER);
+BEGIN (* reacto to change in data.list (index to was selected) *)
+ IF op = Dialog.changed THEN
+ data.width := predef[to]; (* modify interactor *)
+ Dialog.Update(data) (* redraw controls where necessary *)
+ END
+END ListNotify;
+
+(* guards *)
+
+PROCEDURE ListGuard* (VAR par: Dialog.Par);
+BEGIN (* disable list box for a beginner *)
+ par.disabled := data.class = beginner
+END ListGuard;
+
+PROCEDURE WidthGuard* (VAR par: Dialog.Par);
+BEGIN (* make text entry field read-only if user is not guru *)
+ par.readOnly := data.class # guru
+END WidthGuard;
+
+(* commands *)
+
+PROCEDURE Open*;
+ VAR v: View;
+BEGIN
+ NEW(v); (* create and initialize a new view *)
+ v.size := data.width * Ports.mm; (* define view's size in function of class *)
+ Views.OpenAux(v, "Example") (* open the view in a window *)
+END Open;
+
+BEGIN (* initialization of global variables *)
+ predef[0] := 40; predef[1] := 30; predef[2] := 50; (* predefined sizes *)
+ predef[3] := 70; predef[4] := 20; predef[5] := 100;
+ data.class := beginner; (* default values *)
+ data.list.index := 0;
+ data.width := predef[0];
+ SetList
+END ObxControls.
diff --git a/samples/Component Pascal/Example2.cps b/samples/Component Pascal/Example2.cps
new file mode 100644
index 00000000..4c4b3930
--- /dev/null
+++ b/samples/Component Pascal/Example2.cps
@@ -0,0 +1,71 @@
+MODULE ObxFact;
+(**
+ project = "BlackBox"
+ organization = "www.oberon.ch"
+ contributors = "Oberon microsystems"
+ version = "System/Rsrc/About"
+ copyright = "System/Rsrc/About"
+ license = "Docu/BB-License"
+ changes = ""
+ issues = ""
+
+**)
+
+IMPORT
+ Stores, Models, TextModels, TextControllers, Integers;
+
+PROCEDURE Read(r: TextModels.Reader; VAR x: Integers.Integer);
+ VAR i, len, beg: INTEGER; ch: CHAR; buf: POINTER TO ARRAY OF CHAR;
+BEGIN
+ r.ReadChar(ch);
+ WHILE ~r.eot & (ch <= " ") DO r.ReadChar(ch) END;
+ ASSERT(~r.eot & (((ch >= "0") & (ch <= "9")) OR (ch = "-")));
+ beg := r.Pos() - 1; len := 0;
+ REPEAT INC(len); r.ReadChar(ch) UNTIL r.eot OR (ch < "0") OR (ch > "9");
+ NEW(buf, len + 1);
+ i := 0; r.SetPos(beg);
+ REPEAT r.ReadChar(buf[i]); INC(i) UNTIL i = len;
+ buf[i] := 0X;
+ Integers.ConvertFromString(buf^, x)
+END Read;
+
+PROCEDURE Write(w: TextModels.Writer; x: Integers.Integer);
+ VAR i: INTEGER;
+BEGIN
+ IF Integers.Sign(x) < 0 THEN w.WriteChar("-") END;
+ i := Integers.Digits10Of(x);
+ IF i # 0 THEN
+ REPEAT DEC(i); w.WriteChar(Integers.ThisDigit10(x, i)) UNTIL i = 0
+ ELSE w.WriteChar("0")
+ END
+END Write;
+
+PROCEDURE Compute*;
+ VAR beg, end, i, n: INTEGER; ch: CHAR;
+ s: Stores.Operation;
+ r: TextModels.Reader; w: TextModels.Writer; attr: TextModels.Attributes;
+ c: TextControllers.Controller;
+ x: Integers.Integer;
+BEGIN
+ c := TextControllers.Focus();
+ IF (c # NIL) & c.HasSelection() THEN
+ c.GetSelection(beg, end);
+ r := c.text.NewReader(NIL); r.SetPos(beg); r.ReadChar(ch);
+ WHILE ~r.eot & (beg < end) & (ch <= " ") DO r.ReadChar(ch); INC(beg) END;
+ IF ~r.eot & (beg < end) THEN
+ r.ReadPrev; Read(r, x);
+ end := r.Pos(); r.ReadPrev; attr :=r.attr;
+ IF (Integers.Sign(x) > 0) & (Integers.Compare(x, Integers.Long(MAX(LONGINT))) <= 0) THEN
+ n := SHORT(Integers.Short(x)); i := 2; x := Integers.Long(1);
+ WHILE i <= n DO x := Integers.Product(x, Integers.Long(i)); INC(i) END;
+ Models.BeginScript(c.text, "computation", s);
+ c.text.Delete(beg, end);
+ w := c.text.NewWriter(NIL); w.SetPos(beg); w.SetAttr(attr);
+ Write(w, x);
+ Models.EndScript(c.text, s)
+ END
+ END
+ END
+END Compute;
+
+END ObxFact.
\ No newline at end of file
diff --git a/samples/Crystal/const_spec.cr b/samples/Crystal/const_spec.cr
new file mode 100644
index 00000000..3ab20f14
--- /dev/null
+++ b/samples/Crystal/const_spec.cr
@@ -0,0 +1,169 @@
+#!/usr/bin/env bin/crystal --run
+require "../../spec_helper"
+
+describe "Codegen: const" do
+ it "define a constant" do
+ run("A = 1; A").to_i.should eq(1)
+ end
+
+ it "support nested constant" do
+ run("class B; A = 1; end; B::A").to_i.should eq(1)
+ end
+
+ it "support constant inside a def" do
+ run("
+ class Foo
+ A = 1
+
+ def foo
+ A
+ end
+ end
+
+ Foo.new.foo
+ ").to_i.should eq(1)
+ end
+
+ it "finds nearest constant first" do
+ run("
+ A = 1
+
+ class Foo
+ A = 2.5_f32
+
+ def foo
+ A
+ end
+ end
+
+ Foo.new.foo
+ ").to_f32.should eq(2.5)
+ end
+
+ it "allows constants with same name" do
+ run("
+ A = 1
+
+ class Foo
+ A = 2.5_f32
+
+ def foo
+ A
+ end
+ end
+
+ A
+ Foo.new.foo
+ ").to_f32.should eq(2.5)
+ end
+
+ it "constants with expression" do
+ run("
+ A = 1 + 1
+ A
+ ").to_i.should eq(2)
+ end
+
+ it "finds global constant" do
+ run("
+ A = 1
+
+ class Foo
+ def foo
+ A
+ end
+ end
+
+ Foo.new.foo
+ ").to_i.should eq(1)
+ end
+
+ it "define a constant in lib" do
+ run("lib Foo; A = 1; end; Foo::A").to_i.should eq(1)
+ end
+
+ it "invokes block in const" do
+ run("require \"prelude\"; A = [\"1\"].map { |x| x.to_i }; A[0]").to_i.should eq(1)
+ end
+
+ it "declare constants in right order" do
+ run("A = 1 + 1; B = true ? A : 0; B").to_i.should eq(2)
+ end
+
+ it "uses correct types lookup" do
+ run("
+ module A
+ class B
+ def foo
+ 1
+ end
+ end
+
+ C = B.new;
+ end
+
+ def foo
+ A::C.foo
+ end
+
+ foo
+ ").to_i.should eq(1)
+ end
+
+ it "codegens variable assignment in const" do
+ run("
+ class Foo
+ def initialize(@x)
+ end
+
+ def x
+ @x
+ end
+ end
+
+ A = begin
+ f = Foo.new(1)
+ f
+ end
+
+ def foo
+ A.x
+ end
+
+ foo
+ ").to_i.should eq(1)
+ end
+
+ it "declaring var" do
+ run("
+ BAR = begin
+ a = 1
+ while 1 == 2
+ b = 2
+ end
+ a
+ end
+ class Foo
+ def compile
+ BAR
+ end
+ end
+
+ Foo.new.compile
+ ").to_i.should eq(1)
+ end
+
+ it "initialize const that might raise an exception" do
+ run("
+ require \"prelude\"
+ CONST = (raise \"OH NO\" if 1 == 2)
+
+ def doit
+ CONST
+ rescue
+ end
+
+ doit.nil?
+ ").to_b.should be_true
+ end
+end
diff --git a/samples/Crystal/declare_var_spec.cr b/samples/Crystal/declare_var_spec.cr
new file mode 100644
index 00000000..c6a44127
--- /dev/null
+++ b/samples/Crystal/declare_var_spec.cr
@@ -0,0 +1,79 @@
+#!/usr/bin/env bin/crystal --run
+require "../../spec_helper"
+
+describe "Type inference: declare var" do
+ it "types declare var" do
+ assert_type("a :: Int32") { int32 }
+ end
+
+ it "types declare var and reads it" do
+ assert_type("a :: Int32; a") { int32 }
+ end
+
+ it "types declare var and changes its type" do
+ assert_type("a :: Int32; while 1 == 2; a = 'a'; end; a") { union_of(int32, char) }
+ end
+
+ it "declares instance var which appears in initialize" do
+ result = assert_type("
+ class Foo
+ @x :: Int32
+ end
+
+ Foo.new") { types["Foo"] }
+
+ mod = result.program
+
+ foo = mod.types["Foo"] as NonGenericClassType
+ foo.instance_vars["@x"].type.should eq(mod.int32)
+ end
+
+ it "declares instance var of generic class" do
+ result = assert_type("
+ class Foo(T)
+ @x :: T
+ end
+
+ Foo(Int32).new") do
+ foo = types["Foo"] as GenericClassType
+ foo_i32 = foo.instantiate([int32] of Type | ASTNode)
+ foo_i32.lookup_instance_var("@x").type.should eq(int32)
+ foo_i32
+ end
+ end
+
+ it "declares instance var of generic class after reopen" do
+ result = assert_type("
+ class Foo(T)
+ end
+
+ f = Foo(Int32).new
+
+ class Foo(T)
+ @x :: T
+ end
+
+ f") do
+ foo = types["Foo"] as GenericClassType
+ foo_i32 = foo.instantiate([int32] of Type | ASTNode)
+ foo_i32.lookup_instance_var("@x").type.should eq(int32)
+ foo_i32
+ end
+ end
+
+ it "declares an instance variable in initialize" do
+ assert_type("
+ class Foo
+ def initialize
+ @x :: Int32
+ end
+
+ def x
+ @x
+ end
+ end
+
+ Foo.new.x
+ ") { int32 }
+ end
+end
diff --git a/samples/Crystal/transformer.cr b/samples/Crystal/transformer.cr
new file mode 100644
index 00000000..8bb78fbe
--- /dev/null
+++ b/samples/Crystal/transformer.cr
@@ -0,0 +1,515 @@
+module Crystal
+ class ASTNode
+ def transform(transformer)
+ transformer.before_transform self
+ node = transformer.transform self
+ transformer.after_transform self
+ node
+ end
+ end
+
+ class Transformer
+ def before_transform(node)
+ end
+
+ def after_transform(node)
+ end
+
+ def transform(node : Expressions)
+ exps = [] of ASTNode
+ node.expressions.each do |exp|
+ new_exp = exp.transform(self)
+ if new_exp
+ if new_exp.is_a?(Expressions)
+ exps.concat new_exp.expressions
+ else
+ exps << new_exp
+ end
+ end
+ end
+
+ if exps.length == 1
+ exps[0]
+ else
+ node.expressions = exps
+ node
+ end
+ end
+
+ def transform(node : Call)
+ if node_obj = node.obj
+ node.obj = node_obj.transform(self)
+ end
+ transform_many node.args
+
+ if node_block = node.block
+ node.block = node_block.transform(self)
+ end
+
+ if node_block_arg = node.block_arg
+ node.block_arg = node_block_arg.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : And)
+ node.left = node.left.transform(self)
+ node.right = node.right.transform(self)
+ node
+ end
+
+ def transform(node : Or)
+ node.left = node.left.transform(self)
+ node.right = node.right.transform(self)
+ node
+ end
+
+ def transform(node : StringInterpolation)
+ transform_many node.expressions
+ node
+ end
+
+ def transform(node : ArrayLiteral)
+ transform_many node.elements
+
+ if node_of = node.of
+ node.of = node_of.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : HashLiteral)
+ transform_many node.keys
+ transform_many node.values
+
+ if of_key = node.of_key
+ node.of_key = of_key.transform(self)
+ end
+
+ if of_value = node.of_value
+ node.of_value = of_value.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : If)
+ node.cond = node.cond.transform(self)
+ node.then = node.then.transform(self)
+ node.else = node.else.transform(self)
+ node
+ end
+
+ def transform(node : Unless)
+ node.cond = node.cond.transform(self)
+ node.then = node.then.transform(self)
+ node.else = node.else.transform(self)
+ node
+ end
+
+ def transform(node : IfDef)
+ node.cond = node.cond.transform(self)
+ node.then = node.then.transform(self)
+ node.else = node.else.transform(self)
+ node
+ end
+
+ def transform(node : MultiAssign)
+ transform_many node.targets
+ transform_many node.values
+ node
+ end
+
+ def transform(node : SimpleOr)
+ node.left = node.left.transform(self)
+ node.right = node.right.transform(self)
+ node
+ end
+
+ def transform(node : Def)
+ transform_many node.args
+ node.body = node.body.transform(self)
+
+ if receiver = node.receiver
+ node.receiver = receiver.transform(self)
+ end
+
+ if block_arg = node.block_arg
+ node.block_arg = block_arg.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : Macro)
+ transform_many node.args
+ node.body = node.body.transform(self)
+
+ if receiver = node.receiver
+ node.receiver = receiver.transform(self)
+ end
+
+ if block_arg = node.block_arg
+ node.block_arg = block_arg.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : PointerOf)
+ node.exp = node.exp.transform(self)
+ node
+ end
+
+ def transform(node : SizeOf)
+ node.exp = node.exp.transform(self)
+ node
+ end
+
+ def transform(node : InstanceSizeOf)
+ node.exp = node.exp.transform(self)
+ node
+ end
+
+ def transform(node : IsA)
+ node.obj = node.obj.transform(self)
+ node.const = node.const.transform(self)
+ node
+ end
+
+ def transform(node : RespondsTo)
+ node.obj = node.obj.transform(self)
+ node
+ end
+
+ def transform(node : Case)
+ node.cond = node.cond.transform(self)
+ transform_many node.whens
+
+ if node_else = node.else
+ node.else = node_else.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : When)
+ transform_many node.conds
+ node.body = node.body.transform(self)
+ node
+ end
+
+ def transform(node : ImplicitObj)
+ node
+ end
+
+ def transform(node : ClassDef)
+ node.body = node.body.transform(self)
+
+ if superclass = node.superclass
+ node.superclass = superclass.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : ModuleDef)
+ node.body = node.body.transform(self)
+ node
+ end
+
+ def transform(node : While)
+ node.cond = node.cond.transform(self)
+ node.body = node.body.transform(self)
+ node
+ end
+
+ def transform(node : Generic)
+ node.name = node.name.transform(self)
+ transform_many node.type_vars
+ node
+ end
+
+ def transform(node : ExceptionHandler)
+ node.body = node.body.transform(self)
+ transform_many node.rescues
+
+ if node_ensure = node.ensure
+ node.ensure = node_ensure.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : Rescue)
+ node.body = node.body.transform(self)
+ transform_many node.types
+ node
+ end
+
+ def transform(node : Union)
+ transform_many node.types
+ node
+ end
+
+ def transform(node : Hierarchy)
+ node.name = node.name.transform(self)
+ node
+ end
+
+ def transform(node : Metaclass)
+ node.name = node.name.transform(self)
+ node
+ end
+
+ def transform(node : Arg)
+ if default_value = node.default_value
+ node.default_value = default_value.transform(self)
+ end
+
+ if restriction = node.restriction
+ node.restriction = restriction.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : BlockArg)
+ node.fun = node.fun.transform(self)
+ node
+ end
+
+ def transform(node : Fun)
+ transform_many node.inputs
+
+ if output = node.output
+ node.output = output.transform(self)
+ end
+
+ node
+ end
+
+ def transform(node : Block)
+ node.args.map! { |exp| exp.transform(self) as Var }
+ node.body = node.body.transform(self)
+ node
+ end
+
+ def transform(node : FunLiteral)
+ node.def.body = node.def.body.transform(self)
+ node
+ end
+
+ def transform(node : FunPointer)
+ if obj = node.obj
+ node.obj = obj.transform(self)
+ end
+ node
+ end
+
+ def transform(node : Return)
+ transform_many node.exps
+ node
+ end
+
+ def transform(node : Break)
+ transform_many node.exps
+ node
+ end
+
+ def transform(node : Next)
+ transform_many node.exps
+ node
+ end
+
+ def transform(node : Yield)
+ if scope = node.scope
+ node.scope = scope.transform(self)
+ end
+ transform_many node.exps
+ node
+ end
+
+ def transform(node : Include)
+ node.name = node.name.transform(self)
+ node
+ end
+
+ def transform(node : Extend)
+ node.name = node.name.transform(self)
+ node
+ end
+
+ def transform(node : RangeLiteral)
+ node.from = node.from.transform(self)
+ node.to = node.to.transform(self)
+ node
+ end
+
+ def transform(node : Assign)
+ node.target = node.target.transform(self)
+ node.value = node.value.transform(self)
+ node
+ end
+
+ def transform(node : Nop)
+ node
+ end
+
+ def transform(node : NilLiteral)
+ node
+ end
+
+ def transform(node : BoolLiteral)
+ node
+ end
+
+ def transform(node : NumberLiteral)
+ node
+ end
+
+ def transform(node : CharLiteral)
+ node
+ end
+
+ def transform(node : StringLiteral)
+ node
+ end
+
+ def transform(node : SymbolLiteral)
+ node
+ end
+
+ def transform(node : RegexLiteral)
+ node
+ end
+
+ def transform(node : Var)
+ node
+ end
+
+ def transform(node : MetaVar)
+ node
+ end
+
+ def transform(node : InstanceVar)
+ node
+ end
+
+ def transform(node : ClassVar)
+ node
+ end
+
+ def transform(node : Global)
+ node
+ end
+
+ def transform(node : Require)
+ node
+ end
+
+ def transform(node : Path)
+ node
+ end
+
+ def transform(node : Self)
+ node
+ end
+
+ def transform(node : LibDef)
+ node.body = node.body.transform(self)
+ node
+ end
+
+ def transform(node : FunDef)
+ if body = node.body
+ node.body = body.transform(self)
+ end
+ node
+ end
+
+ def transform(node : TypeDef)
+ node
+ end
+
+ def transform(node : StructDef)
+ node
+ end
+
+ def transform(node : UnionDef)
+ node
+ end
+
+ def transform(node : EnumDef)
+ node
+ end
+
+ def transform(node : ExternalVar)
+ node
+ end
+
+ def transform(node : IndirectRead)
+ node.obj = node.obj.transform(self)
+ node
+ end
+
+ def transform(node : IndirectWrite)
+ node.obj = node.obj.transform(self)
+ node.value = node.value.transform(self)
+ node
+ end
+
+ def transform(node : TypeOf)
+ transform_many node.expressions
+ node
+ end
+
+ def transform(node : Primitive)
+ node
+ end
+
+ def transform(node : Not)
+ node
+ end
+
+ def transform(node : TypeFilteredNode)
+ node
+ end
+
+ def transform(node : TupleLiteral)
+ transform_many node.exps
+ node
+ end
+
+ def transform(node : Cast)
+ node.obj = node.obj.transform(self)
+ node.to = node.to.transform(self)
+ node
+ end
+
+ def transform(node : DeclareVar)
+ node.var = node.var.transform(self)
+ node.declared_type = node.declared_type.transform(self)
+ node
+ end
+
+ def transform(node : Alias)
+ node.value = node.value.transform(self)
+ node
+ end
+
+ def transform(node : TupleIndexer)
+ node
+ end
+
+ def transform(node : Attribute)
+ node
+ end
+
+ def transform_many(exps)
+ exps.map! { |exp| exp.transform(self) } if exps
+ end
+ end
+end
diff --git a/samples/Dart/point.dart b/samples/Dart/point.dart
index 5bb74b29..ee91239b 100644
--- a/samples/Dart/point.dart
+++ b/samples/Dart/point.dart
@@ -1,15 +1,19 @@
+import 'dart:math' as math;
+
class Point {
+ num x, y;
+
Point(this.x, this.y);
- distanceTo(Point other) {
+
+ num distanceTo(Point other) {
var dx = x - other.x;
var dy = y - other.y;
- return Math.sqrt(dx * dx + dy * dy);
+ return math.sqrt(dx * dx + dy * dy);
}
- var x, y;
}
-main() {
- Point p = new Point(2, 3);
- Point q = new Point(3, 4);
+void main() {
+ var p = new Point(2, 3);
+ var q = new Point(3, 4);
print('distance from p to q = ${p.distanceTo(q)}');
}
diff --git a/samples/Dogescript/example.djs b/samples/Dogescript/example.djs
new file mode 100644
index 00000000..6903cc5a
--- /dev/null
+++ b/samples/Dogescript/example.djs
@@ -0,0 +1,16 @@
+quiet
+ wow
+ such language
+ very syntax
+ github recognized wow
+loud
+
+such language much friendly
+ rly friendly is true
+ plz console.loge with 'such friend, very inclusive'
+ but
+ plz console.loge with 'no love for doge'
+ wow
+wow
+
+module.exports is language
\ No newline at end of file
diff --git a/samples/E/Extends.E b/samples/E/Extends.E
new file mode 100644
index 00000000..002a9105
--- /dev/null
+++ b/samples/E/Extends.E
@@ -0,0 +1,31 @@
+# from
+# http://wiki.erights.org/wiki/Walnut/Ordinary_Programming/Objects_and_Functions
+def makeVehicle(self) {
+ def vehicle {
+ to milesTillEmpty() {
+ return self.milesPerGallon() * self.getFuelRemaining()
+ }
+ }
+ return vehicle
+}
+
+def makeCar() {
+ var fuelRemaining := 20
+ def car extends makeVehicle(car) {
+ to milesPerGallon() {return 19}
+ to getFuelRemaining() {return fuelRemaining}
+ }
+ return car
+}
+
+def makeJet() {
+ var fuelRemaining := 2000
+ def jet extends makeVehicle(jet) {
+ to milesPerGallon() {return 2}
+ to getFuelRemaining() {return fuelRemaining}
+ }
+ return jet
+}
+
+def car := makeCar()
+println(`The car can go ${car.milesTillEmpty()} miles.`)
diff --git a/samples/E/Functions.E b/samples/E/Functions.E
new file mode 100644
index 00000000..086e4f7a
--- /dev/null
+++ b/samples/E/Functions.E
@@ -0,0 +1,21 @@
+# from
+# http://wiki.erights.org/wiki/Walnut/Ordinary_Programming/Objects_and_Functions
+def makeCar(var name) {
+ var x := 0
+ var y := 0
+ def car {
+ to moveTo(newX,newY) {
+ x := newX
+ y := newY
+ }
+ to getX() {return x}
+ to getY() {return y}
+ to setName(newName) {name := newName}
+ to getName() {return name}
+ }
+ return car
+}
+# Now use the makeCar function to make a car, which we will move and print
+def sportsCar := makeCar("Ferrari")
+sportsCar.moveTo(10,20)
+println(`The car ${sportsCar.getName()} is at X location ${sportsCar.getX()}`)
diff --git a/samples/E/Guards.E b/samples/E/Guards.E
new file mode 100644
index 00000000..e3e841ae
--- /dev/null
+++ b/samples/E/Guards.E
@@ -0,0 +1,69 @@
+# from
+# http://wiki.erights.org/wiki/Walnut/Advanced_Topics/Build_your_Own_Guards
+def makeVOCPair(brandName :String) :near {
+
+ var myTempContents := def none {}
+
+ def brand {
+ to __printOn(out :TextWriter) :void {
+ out.print(brandName)
+ }
+ }
+
+ def ProveAuth {
+ to __printOn(out :TextWriter) :void {
+ out.print(`<$brandName prover>`)
+ }
+ to getBrand() :near { return brand }
+ to coerce(specimen, optEjector) :near {
+ def sealedBox {
+ to getBrand() :near { return brand }
+ to offerContent() :void {
+ myTempContents := specimen
+ }
+ }
+ return sealedBox
+ }
+ }
+ def CheckAuth {
+ to __printOn(out :TextWriter) :void {
+ out.print(`<$brandName checker template>`)
+ }
+ to getBrand() :near { return brand }
+ match [`get`, authList :any[]] {
+ def checker {
+ to __printOn(out :TextWriter) :void {
+ out.print(`<$brandName checker>`)
+ }
+ to getBrand() :near { return brand }
+ to coerce(specimenBox, optEjector) :any {
+ myTempContents := null
+ if (specimenBox.__respondsTo("offerContent", 0)) {
+ # XXX Using __respondsTo/2 here is a kludge
+ specimenBox.offerContent()
+ } else {
+ myTempContents := specimenBox
+ }
+ for auth in authList {
+ if (auth == myTempContents) {
+ return auth
+ }
+ }
+ myTempContents := none
+ throw.eject(optEjector,
+ `Unmatched $brandName authorization`)
+ }
+ }
+ }
+ match [`__respondsTo`, [`get`, _]] {
+ true
+ }
+ match [`__respondsTo`, [_, _]] {
+ false
+ }
+ match [`__getAllegedType`, []] {
+ null.__getAllegedType()
+ }
+ }
+ return [ProveAuth, CheckAuth]
+}
diff --git a/samples/E/IO.E b/samples/E/IO.E
new file mode 100644
index 00000000..e96e41ad
--- /dev/null
+++ b/samples/E/IO.E
@@ -0,0 +1,14 @@
+# E sample from
+# http://wiki.erights.org/wiki/Walnut/Ordinary_Programming/InputOutput
+#File objects for hardwired files:
+def file1 :=
+def file2 :=
+
+#Using a variable for a file name:
+def filePath := "c:\\docs\\myFile.txt"
+def file3 :=