Initial support for Forth
authorDaniel C. Sobral <dcsobral@gmail.com>
Thu, 23 Feb 2012 20:05:15 +0000 (18:05 -0200)
committerDaniel C. Sobral <dcsobral@gmail.com>
Thu, 23 Feb 2012 20:05:15 +0000 (18:05 -0200)
commitad04b509bd0ff9626e478ab3b1dcfaa4c0a98d53
tree45b14fe4bebc0494111ef141db2a256a5ac6ee34
parent9a2f0c5922b8226122d01e4bf8a71e7ae8a59e80
Initial support for Forth

This is based on the Scala parser, which is actually quite
incorrect -- assumes existence of single-quote strings (which
will cause problem on any file with symbols), doesn't know
multiline strings, doesn't handle nested comments: all of which
made it a pretty good starting point for Forth.

Parsing Forth is impossible, but this will recognize comments,
strings and blank lines on most projects. Tested against FreeBSD
source.
12 files changed:
src/hash/extensions.gperf
src/hash/languages.gperf
src/hash/parsers.gperf
src/languages.h
src/parsers/forth.rl [new file with mode: 0644]
test/detect_files/forth.4th [new file with mode: 0644]
test/detect_files/forth.fr [new file with mode: 0644]
test/expected_dir/forth.4th [new file with mode: 0644]
test/src_dir/forth.4th [new file with mode: 0644]
test/unit/detector_test.h
test/unit/parser_test.h
test/unit/parsers/test_forth.h [new file with mode: 0644]