Robin Luckey [Thu, 26 Jun 2008 23:52:28 +0000 (16:52 -0700)]
Merge from Ohcount main line
Conflicts:
ext/ohcount_native/generator.rb
test/unit/vhdl_test.rb
Robin Luckey [Thu, 26 Jun 2008 23:46:35 +0000 (16:46 -0700)]
[FIX] increase MAX_LANGUAGE_NAME
mitchell [Thu, 26 Jun 2008 22:37:23 +0000 (18:37 -0400)]
Deleted the code the new Ragel parser obsoletes.
Robin Luckey [Thu, 26 Jun 2008 21:24:31 +0000 (14:24 -0700)]
[FIX] bin/ohcount incorrectly output nothing at all in the case where comment % causes div/0
mitchell [Tue, 24 Jun 2008 19:20:40 +0000 (15:20 -0400)]
Ignore switches to executables in detector.rb.
e.g. 'a /usr/bin/perl -w script text executable'.
mitchell [Tue, 24 Jun 2008 05:38:48 +0000 (01:38 -0400)]
Check for buffer overflow before writing to lb so there's no segfaulting.
For now I'm ceasing callbacks when buffer overflows occur. In the future I'll
probably add a Ruby exception that will be thrown and can be caught to notify
the user of the file that wasn't parsed correctly.
mitchell [Mon, 23 Jun 2008 20:08:01 +0000 (16:08 -0400)]
Added enqueue..commit to lua.rl's longstrings.
mitchell [Mon, 23 Jun 2008 20:03:45 +0000 (16:03 -0400)]
Fixed parsers that could succomb to segfaulting.
It happens for parsers can cannot detect all language entities yet such as
HEREDOCs, or ones that have complicated entities.
I've ignored the other parsers that cover all of their language entities because
ohcount will only parser syntactically correct code.
mitchell [Mon, 23 Jun 2008 19:13:26 +0000 (15:13 -0400)]
Fixed another segfault; renamed 'queue' action to 'enqueue'.
mitchell [Sat, 21 Jun 2008 21:58:42 +0000 (17:58 -0400)]
Ruby.rl's regexen can of course include tabs and spaces.
mitchell [Sat, 21 Jun 2008 21:54:18 +0000 (17:54 -0400)]
Fixed issue with Ragel executing actions in real time; fixed some parsers.
Added a queue for callbacks in entities that span multiple lines and may not
have end delimitters. Ragel will backtrack if the complete match fails, so if
it's the case, the false callbacks will not be called. If the end delimitter is
reached, callbacks in the queue are committed and executed.
Samuel Bronson [Fri, 20 Jun 2008 23:26:14 +0000 (19:26 -0400)]
Fix indentation in Ada unit test
Samuel Bronson [Fri, 20 Jun 2008 22:59:41 +0000 (18:59 -0400)]
Update .gitignore
For some reason my ohcount_native.so is in lib/i486-linux/, and I didn't
like those *_parser.h files cluttering my "unstaged changes" pane.
Robin Luckey [Fri, 20 Jun 2008 21:18:10 +0000 (14:18 -0700)]
[CHANGE] Remove the verbose output from the unit tests.
Robin Luckey [Fri, 20 Jun 2008 21:16:45 +0000 (14:16 -0700)]
[CHANGE] 'configure' files are now considered autoconf, not shell
fperrad [Fri, 6 Jun 2008 07:00:00 +0000 (00:00 -0700)]
Add extension for Perl6
mitchell [Fri, 20 Jun 2008 20:28:12 +0000 (16:28 -0400)]
Added "padding" to fix some of the memory freeing crashes as in parser.c.
mitchell [Mon, 16 Jun 2008 18:26:53 +0000 (14:26 -0400)]
Fixed REXX parser to include nested block comments.
mitchell [Thu, 12 Jun 2008 18:15:47 +0000 (14:15 -0400)]
Added raw entity flag to Ohcount for debugging purposes.
mitchell [Thu, 12 Jun 2008 18:12:18 +0000 (14:12 -0400)]
Ohcount -e flag does a bit better than dumping entities to screen.
It now counts entity occurances for each language and puts them in a hash for
printing.
mitchell [Thu, 12 Jun 2008 17:36:43 +0000 (13:36 -0400)]
Integrated entity parsing into Ohcount.
See the documentation for Ohcount::parse_entities.
mitchell [Thu, 12 Jun 2008 17:33:41 +0000 (13:33 -0400)]
Fixed issue in c.rl's entity parsing machine.
mitchell [Tue, 10 Jun 2008 17:20:37 +0000 (13:20 -0400)]
Fixed typos in parsers as per the typo in PARSER_DOC.
mitchell [Tue, 10 Jun 2008 17:19:50 +0000 (13:19 -0400)]
More descriptive invalid polyglot error message.
mitchell [Tue, 10 Jun 2008 17:09:08 +0000 (13:09 -0400)]
Fixed important typo in PARSER_DOC. Please see revision.
mitchell [Tue, 10 Jun 2008 16:41:51 +0000 (12:41 -0400)]
Added Lua entity machine.
mitchell [Wed, 4 Jun 2008 21:31:52 +0000 (17:31 -0400)]
Removed printf statement for debugging in ragel_parser.c.
mitchell [Wed, 4 Jun 2008 21:12:45 +0000 (17:12 -0400)]
Added Perl parser.
mitchell [Wed, 4 Jun 2008 20:15:36 +0000 (16:15 -0400)]
Updated PHP unit tests and added PHP parser.
mitchell [Wed, 4 Jun 2008 20:04:58 +0000 (16:04 -0400)]
Updated Boo parser to better distinguish between '"' and '"""'.
mitchell [Wed, 4 Jun 2008 20:04:37 +0000 (16:04 -0400)]
Updated Python unit tests and added Python parser.
mitchell [Wed, 4 Jun 2008 18:59:04 +0000 (14:59 -0400)]
Added XMLSchema unit tests.
mitchell [Wed, 4 Jun 2008 18:45:55 +0000 (14:45 -0400)]
Fixed MATLAB parser and unit tests to include GNU Octave comments.
mitchell [Wed, 4 Jun 2008 18:40:55 +0000 (14:40 -0400)]
Added support for VHDL and accompanying unit tests.
For some reason a VHDL patch that was submitted is not in Robin's repos. I had
already written my unit tests so Robin can merge the two later if necessary.
mitchell [Wed, 4 Jun 2008 18:11:22 +0000 (14:11 -0400)]
Added Scheme unit tests.
mitchell [Wed, 4 Jun 2008 17:58:23 +0000 (13:58 -0400)]
Added Erlang parser.
mitchell [Wed, 4 Jun 2008 17:48:36 +0000 (13:48 -0400)]
Removed Scheme parser, moved it into Lisp parser.
mitchell [Wed, 4 Jun 2008 17:40:13 +0000 (13:40 -0400)]
Updated Boo unit tests and Boo parser.
mitchell [Wed, 4 Jun 2008 00:56:54 +0000 (20:56 -0400)]
Fixed ragel_parser.c and ragel_parser_macros.h to stop warnings on compile.
mitchell [Wed, 4 Jun 2008 00:25:30 +0000 (20:25 -0400)]
Forgot to comment out the parsers I haven't checked in yet (bad unit tests).
mitchell [Wed, 4 Jun 2008 00:24:25 +0000 (20:24 -0400)]
Alphabetized parsers in ragel_parser.c.
mitchell [Tue, 3 Jun 2008 23:57:40 +0000 (19:57 -0400)]
Added Metapost with Tex parser.
mitchell [Tue, 3 Jun 2008 23:57:17 +0000 (19:57 -0400)]
Fixed 'is_blank_entry' function in ragel_parser_macros.h.
mitchell [Tue, 3 Jun 2008 23:04:46 +0000 (19:04 -0400)]
Added Clearsilver and Clearsilver template parsers.
mitchell [Tue, 3 Jun 2008 22:34:50 +0000 (18:34 -0400)]
Updated MXML parser to use new embedded language parser techniques.
mitchell [Tue, 3 Jun 2008 22:31:10 +0000 (18:31 -0400)]
Added JSP parser.
mitchell [Tue, 3 Jun 2008 20:26:29 +0000 (16:26 -0400)]
Cleaned up HTML and RHML parsers.
mitchell [Tue, 3 Jun 2008 19:36:08 +0000 (15:36 -0400)]
Updated PARSER_DOC for consistency.
mitchell [Tue, 3 Jun 2008 19:34:33 +0000 (15:34 -0400)]
Updated PARSER_DOC to include updates to embedded language parsers.
mitchell [Tue, 3 Jun 2008 19:13:28 +0000 (15:13 -0400)]
Added RHTML parser.
mitchell [Tue, 3 Jun 2008 19:12:59 +0000 (15:12 -0400)]
Added check_blank_outry action to common.rl.
mitchell [Tue, 3 Jun 2008 19:12:03 +0000 (15:12 -0400)]
ruby.rl's string and regex literals shouldn't call @code right after '%'.
Having @code right after '%' conflicts with rhtml's rhtml_ruby_outry and counts
it as a line of Ruby code which is incorrect.
mitchell [Tue, 3 Jun 2008 19:10:17 +0000 (15:10 -0400)]
Added embedded versions of the standard newline and internal_newline macros.
mitchell [Mon, 2 Jun 2008 21:39:10 +0000 (17:39 -0400)]
Added Scala parser.
mitchell [Mon, 2 Jun 2008 21:35:19 +0000 (17:35 -0400)]
Added Tex parser.
mitchell [Mon, 2 Jun 2008 21:29:03 +0000 (17:29 -0400)]
Added D parser.
mitchell [Mon, 2 Jun 2008 21:06:47 +0000 (17:06 -0400)]
Added Groovy parser.
mitchell [Mon, 2 Jun 2008 20:10:04 +0000 (16:10 -0400)]
Reverted conditional in 'code' action and fixed VIM parser appropriately.
mitchell [Mon, 2 Jun 2008 18:36:38 +0000 (14:36 -0400)]
Added conditional to 'code' action in ragel_parser_macros.h like common.rl.
mitchell [Mon, 2 Jun 2008 17:38:56 +0000 (13:38 -0400)]
Added contitional to 'code' action in common.rl.
For quirky languages such as VIM where a character can be multiple entries to an
entity, (in VIM's case, '"' can be both a comment and string entity), the
scanner will see it is both a comment (if only whitespace has been observed) and
a string and call 'code' and 'comment' actions. The comment action is called
first and whole_line_comment is set, but previously the code action never
checked if whole_line_comment was set because I never forsaw this kind of
confusion and line_contains_code would also be set.
mitchell [Mon, 2 Jun 2008 17:32:36 +0000 (13:32 -0400)]
Added VIM parser.
mitchell [Sun, 1 Jun 2008 00:27:24 +0000 (20:27 -0400)]
Added MXML parser with embedded CSS and Actionscript.
mitchell [Sat, 31 May 2008 22:40:23 +0000 (18:40 -0400)]
Added XML Schema parser.
mitchell [Sat, 31 May 2008 22:32:37 +0000 (18:32 -0400)]
Added XSLT parser.
mitchell [Sat, 31 May 2008 22:22:40 +0000 (18:22 -0400)]
Added XML parser.
mitchell [Fri, 30 May 2008 22:12:30 +0000 (18:12 -0400)]
Added VHDL parser.
mitchell [Fri, 30 May 2008 21:59:44 +0000 (17:59 -0400)]
Added Vala language to the c.rl parser.
mitchell [Fri, 30 May 2008 21:57:21 +0000 (17:57 -0400)]
Added Tcl parser.
mitchell [Fri, 30 May 2008 21:49:39 +0000 (17:49 -0400)]
Added Smalltalk parser.
mitchell [Fri, 30 May 2008 21:38:20 +0000 (17:38 -0400)]
Added Shell parser.
mitchell [Fri, 30 May 2008 21:33:00 +0000 (17:33 -0400)]
Fixed line comments in Pascal parser.
mitchell [Fri, 30 May 2008 21:28:30 +0000 (17:28 -0400)]
Added Scheme parser.
mitchell [Fri, 30 May 2008 21:09:52 +0000 (17:09 -0400)]
Added Rexx parser.
mitchell [Fri, 30 May 2008 20:55:13 +0000 (16:55 -0400)]
Forgot to commit the Lisp and Emacslisp parser.
mitchell [Fri, 30 May 2008 20:45:40 +0000 (16:45 -0400)]
Added Pike parser.
mitchell [Fri, 30 May 2008 19:14:54 +0000 (15:14 -0400)]
Added Pascal parser.
mitchell [Fri, 30 May 2008 18:26:04 +0000 (14:26 -0400)]
Added Metapost and Metafont parsers.
mitchell [Fri, 30 May 2008 17:59:41 +0000 (13:59 -0400)]
Added MATLAB parser.
mitchell [Fri, 30 May 2008 17:59:03 +0000 (13:59 -0400)]
MATLAB unit tests are wrong.
'#' is not a comment character.
'%{' is the beginning of a block comment, not '{%'.
mitchell [Fri, 30 May 2008 17:16:02 +0000 (13:16 -0400)]
Added Makefile parser.
mitchell [Fri, 30 May 2008 17:08:49 +0000 (13:08 -0400)]
Added Haskell parser.
mitchell [Fri, 30 May 2008 16:49:35 +0000 (12:49 -0400)]
Added Fortran parsers.
mitchell [Fri, 30 May 2008 02:21:25 +0000 (22:21 -0400)]
Added Emacslisp and Lisp parsers.
mitchell [Fri, 30 May 2008 02:13:01 +0000 (22:13 -0400)]
Patterns with newlines cannot contain newlines in other '|'ed sections.
mitchell [Fri, 30 May 2008 01:57:15 +0000 (21:57 -0400)]
Added Exheres parser.
mitchell [Fri, 30 May 2008 01:42:17 +0000 (21:42 -0400)]
Added ebuild parser.
mitchell [Fri, 30 May 2008 01:34:30 +0000 (21:34 -0400)]
Added Dylan parser.
mitchell [Fri, 30 May 2008 01:32:48 +0000 (21:32 -0400)]
Boo character strings can contain "\'".
mitchell [Fri, 30 May 2008 01:23:15 +0000 (21:23 -0400)]
Added DCL parser.
mitchell [Fri, 30 May 2008 01:22:49 +0000 (21:22 -0400)]
Fixed DCL unit tests to return correct counts.
mitchell [Fri, 30 May 2008 00:41:30 +0000 (20:41 -0400)]
Added Boo parser.
Note: Unit tests for Boo are incorrect. Need to update them.
mitchell [Fri, 30 May 2008 00:40:50 +0000 (20:40 -0400)]
Added C# parser.
mitchell [Thu, 29 May 2008 23:54:28 +0000 (19:54 -0400)]
Added Batch parser.
mitchell [Thu, 29 May 2008 23:35:20 +0000 (19:35 -0400)]
Added Awk parser.
mitchell [Thu, 29 May 2008 23:35:00 +0000 (19:35 -0400)]
Some parsers' strings cannot contain newlines; updated.
mitchell [Thu, 29 May 2008 23:13:32 +0000 (19:13 -0400)]
Added Automake parser.
mitchell [Thu, 29 May 2008 23:09:56 +0000 (19:09 -0400)]
Updated entities in autoconf parser.
mitchell [Thu, 29 May 2008 22:11:21 +0000 (18:11 -0400)]
Added Autoconf parser.
mitchell [Thu, 29 May 2008 21:51:54 +0000 (17:51 -0400)]
Added Assembler parser.
mitchell [Thu, 29 May 2008 21:44:25 +0000 (17:44 -0400)]
Added Ada parser.