command: Factor command name matching out of command.c.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 19 Nov 2010 06:19:58 +0000 (22:19 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 19 Nov 2010 06:19:58 +0000 (22:19 -0800)
commit5a6b751888278c8c849ab0f4adf99f1be610e610
treea77dd6e317b8fb4be8070544802ece58df44f289
parent325168fb62e51d5154e932abec91ba40dd081f3f
command: Factor command name matching out of command.c.

Making command parsing into a library will allow other code to use
the same functionality, which will be useful later in the lexer.
It also simplifies parsing command names and allows us to easily
add tests for command name parsing.

The new command name parsing code supports UTF-8.  This is not useful yet,
because its only client does not feed it UTF-8 strings, but it will be
useful later when the rest of the lexer is rewritten, where it will gain
another client that does feed it UTF-8.
src/language/command.c
src/language/expressions/operations.def
src/language/lexer/automake.mk
src/language/lexer/command-name.c [new file with mode: 0644]
src/language/lexer/command-name.h [new file with mode: 0644]
tests/automake.mk
tests/language/command.at
tests/language/data-io/inpt-pgm.at
tests/language/lexer/command-name-test.c [new file with mode: 0644]
tests/language/lexer/command-name.at [new file with mode: 0644]