Commit ccbe3cf1 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Do not show predefined alphabets in vcsn-int-b's output.

parent ad6dc12c
2008-07-31 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Do not show predefined alphabets in vcsn-int-b's output.
* taf-kit/src/main.cc [NO_PREDEF_ALPHABETS]: Do
not handle and show predefined alphabet.
(parse_opt): Do not assign `found' twice.
* Makefile.am (vcsn_int_b_CPPFLAGS): Add -DNO_PREDEF_ALPHABETS.
2008-07-31 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Create vcsn-int-b. (It is not functional yet.)
......@@ -19,7 +28,7 @@
Add context of int based fmp transducers.
Add context of int based fmp transducers.
Remove useless escaper in op_rout which lead to escape integers when dealing with 1 and 0.
Fix fmp type for allowing generic letters.
......
......@@ -75,7 +75,8 @@ vcsn_int_b_SOURCES = $(COMMON_SOURCES) \
ratexp_commands.hh \
common_automaton_commands.hh \
b_commands.cc
vcsn_int_b_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=int_boolean_automaton
vcsn_int_b_CPPFLAGS = $(AM_CPPFLAGS) -DCONTEXT=int_boolean_automaton \
-DNO_PREDEF_ALPHABETS
vcsn_int_b_LDADD = $(LDADD) \
$(top_builddir)/lib/libkrat_exp.la
......
......@@ -107,15 +107,18 @@ namespace
"Set the working parser options for rational expressions", 0 },
#endif /* ! WITH_TWO_ALPHABETS */
#ifndef NO_PREDEF_ALPHABETS
{ 0, 0, 0, 0, "The following alphabets are predefined:\n"
" `letters': Use [a-z] as the alphabet, " DEFAULT_EPSILON " as epsilon\n"
" `alpha': Use [a-zA-Z] as the alphabet, " DEFAULT_EPSILON " as epsilon\n"
" `digits': Use [0-9] as the alphabet, " DEFAULT_EPSILON " as epsilon\n"
" `ascii': Use ascii characters as the alphabet, " DEFAULT_EPSILON " as epsilon\n", 0},
#endif
{ 0, 0, 0, 0, 0, 0 }
};
#ifndef NO_PREDEF_ALPHABETS
const struct alphabet
{
const char* name;
......@@ -126,6 +129,7 @@ namespace
{ "digits", ALPHABET_DIGITS, DEFAULT_EPSILON },
{ "ascii", ALPHABET_ASCII, DEFAULT_EPSILON },
{ 0, 0, 0 } };
#endif
error_t parse_opt (int key, char* arg, argp_state* state)
{
......@@ -136,7 +140,7 @@ namespace
{
case 'a':
case 'A':
found = false;
#ifndef NO_PREDEF_ALPHABETS
for (const alphabet* alpha = predefined_alphabets; alpha->name; ++alpha)
{
if (std::string (alpha->name) == arg)
......@@ -157,6 +161,7 @@ namespace
break;
}
}
#endif
if (!found)
{
if (key == 'a')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment