Add REBOL detection and (basic) parsing
authorAndreas Bolka <a@bolka.at>
Wed, 1 Jun 2011 21:21:23 +0000 (23:21 +0200)
committerAndreas Bolka <a@bolka.at>
Wed, 1 Jun 2011 23:31:22 +0000 (01:31 +0200)
commit3aa5db4e644b4ce718530068ebf4be8c6f97e509
treecbf5f73480affe4c6cdf9f72c2a781f228d12674
parent3d6c5b9e0cfb7c3bdfc74e0a6face0110466a7b0
Add REBOL detection and (basic) parsing

Also adds a simple .r disambiguation to discern REBOL and R sources. R
is the default, REBOL is used if "rebol" is found anywhere in the
contents.

The REBOL parser currently does not handle multi-line strings ({...}),
which could (in rare cases) lead to string parts being classified as
comments.

Signed-off-by: Andreas Bolka <a@bolka.at>
15 files changed:
src/detector.c
src/hash/disambiguatefuncs.gperf
src/hash/extensions.gperf
src/hash/languages.gperf
src/hash/parsers.gperf
src/languages.h
src/parsers/rebol.rl [new file with mode: 0644]
test/detect_files/foo_r.R [moved from test/detect_files/foo.R with 100% similarity]
test/detect_files/foo_rebol_lower.r [new file with mode: 0644]
test/detect_files/foo_rebol_upper.r [new file with mode: 0644]
test/expected_dir/rebol.r [new file with mode: 0644]
test/src_dir/rebol.r [new file with mode: 0644]
test/unit/detector_test.h
test/unit/parser_test.h
test/unit/parsers/test_rebol.h [new file with mode: 0644]