[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Internal command @txiinternalvalue for gdt string
From: |
Patrice Dumas |
Subject: |
branch master updated: Internal command @txiinternalvalue for gdt strings value labels in tree |
Date: |
Thu, 26 Aug 2021 15:28:43 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new dd2b0b5 Internal command @txiinternalvalue for gdt strings value
labels in tree
dd2b0b5 is described below
commit dd2b0b5e7265ca22a426ffc880c6fb0cb7991b2f
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Aug 26 21:25:21 2021 +0200
Internal command @txiinternalvalue for gdt strings value labels in tree
* tp/Texinfo/ParserNonXS.pm (_parse_texi), tp/Texinfo/Report.pm (gdt)
(_substitute_element_array), tp/Texinfo/XS/parsetexi/Parsetexi.pm
(parser), tp/Texinfo/XS/parsetexi/Parsetexi.xs (set_in_gdt),
tp/Texinfo/XS/parsetexi/api.c (reset_parser),
tp/Texinfo/XS/parsetexi/command_data.txt,
tp/Texinfo/XS/parsetexi/command_ids.h,
tp/Texinfo/XS/parsetexi/commands.c (lookup_command),
tp/Texinfo/XS/parsetexi/parser.c (set_in_gdt)
(process_remaining_on_line),
tp/Texinfo/XS/parsetexi/parser.h: use a new internal @-command
@txiinternalvalue to mark strings in trees generated in gdt.
These @-commands are only valid if the parser parsing their
texinfo fragment is called with a specific configuration option.
Same formatting as @value.
* tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_line): call
_get_errors().
---
ChangeLog | 23 ++++++
tp/Texinfo/Common.pm | 3 +
tp/Texinfo/ParserNonXS.pm | 53 ++++++------
tp/Texinfo/Report.pm | 25 +++---
tp/Texinfo/XS/parsetexi/Parsetexi.pm | 6 +-
tp/Texinfo/XS/parsetexi/Parsetexi.xs | 3 +
tp/Texinfo/XS/parsetexi/api.c | 1 +
tp/Texinfo/XS/parsetexi/command_data.txt | 2 +
tp/Texinfo/XS/parsetexi/command_ids.h | 1 +
tp/Texinfo/XS/parsetexi/commands.c | 19 ++++-
tp/Texinfo/XS/parsetexi/parser.c | 94 +++++++++++++--------
tp/Texinfo/XS/parsetexi/parser.h | 2 +
tp/t/55conditionals.t | 12 +++
tp/t/results/conditionals/txiinternalvalue.pl | 50 +++++++++++
.../conditionals/user_defined_txiinternalvalue.pl | 96 ++++++++++++++++++++++
15 files changed, 318 insertions(+), 72 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3e21411..0f7e804 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2021-08-26 Patrice Dumas <pertusus@free.fr>
+
+ Internal command @txiinternalvalue for gdt strings value labels in
+ tree
+
+ * tp/Texinfo/ParserNonXS.pm (_parse_texi), tp/Texinfo/Report.pm (gdt)
+ (_substitute_element_array), tp/Texinfo/XS/parsetexi/Parsetexi.pm
+ (parser), tp/Texinfo/XS/parsetexi/Parsetexi.xs (set_in_gdt),
+ tp/Texinfo/XS/parsetexi/api.c (reset_parser),
+ tp/Texinfo/XS/parsetexi/command_data.txt,
+ tp/Texinfo/XS/parsetexi/command_ids.h,
+ tp/Texinfo/XS/parsetexi/commands.c (lookup_command),
+ tp/Texinfo/XS/parsetexi/parser.c (set_in_gdt)
+ (process_remaining_on_line),
+ tp/Texinfo/XS/parsetexi/parser.h: use a new internal @-command
+ @txiinternalvalue to mark strings in trees generated in gdt.
+ These @-commands are only valid if the parser parsing their
+ texinfo fragment is called with a specific configuration option.
+ Same formatting as @value.
+
+ * tp/Texinfo/XS/parsetexi/Parsetexi.pm (parse_texi_line): call
+ _get_errors().
+
2021-08-25 Patrice Dumas <pertusus@free.fr>
handle @novalidate in a more common way
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index adea3d4..9b5b3e7 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1021,6 +1021,9 @@ our %misc_commands = (%line_commands, %other_commands);
$root_commands{'node'} = 1;
+# there is the @txiinternalvalue command too, but it is considered
+# as a valid command only if a customization option is set, such
+# that it does not appear in user documents. So it is not set here.
our %all_commands;
foreach my $command (
keys(%Texinfo::Common::block_commands),
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 1ed47c0..7d9d0ac 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -138,7 +138,7 @@ my %parser_state_configuration = (
'input_encoding_name' => 'utf-8',
'input_perl_encoding' => 'utf-8'
},
- 'in_gdt' => 0, # whether we are being called by gdt
+ 'in_gdt' => 0, # whether we are being called by gdt.
'clickstyle' => 'arrow',
'kbdinputstyle' => 'distinct',
# this is not really used, but this allows to have an
@@ -3703,7 +3703,8 @@ sub _parse_texi($;$)
"here is the previous definition of `%s'"),
$name), $self->{'macros'}->{$name}->{'element'}->{'line_nr'});
}
- if ($all_commands{$name}) {
+ if ($all_commands{$name}
+ or ($name eq 'txiinternalvalue' and $self->{'in_gdt'})) {
$self->line_warn(sprintf(__(
"redefining Texinfo language command:
\@%s"),
$name), $current->{'line_nr'});
@@ -4098,7 +4099,9 @@ sub _parse_texi($;$)
and !$self->{'macros'}->{$command}
and !$self->{'definfoenclose'}->{$command}
and !$self->{'aliases'}->{$command}
- and !$self->{'command_index'}->{$command}) {
+ and !$self->{'command_index'}->{$command}
+ # @txiinternalvalue is invalid unless in_gdt is set
+ and !($command eq 'txiinternalvalue' and $self->{'in_gdt'})) {
$self->line_error(sprintf(__("unknown command `%s'"),
$command), $line_nr);
_abort_empty_line($self, $current);
@@ -4113,39 +4116,39 @@ sub _parse_texi($;$)
$command = $self->{'aliases'}->{$command};
}
- if ($command eq 'value') {
- $line =~ s/^\s*//
+ if ($command eq 'value' or $command eq 'txiinternalvalue') {
+ $line =~ s/^\s*//
if ($self->{'IGNORE_SPACE_AFTER_BRACED_COMMAND_NAME'});
# REVALUE
if ($line =~ s/^{([\w\-][^\s{\\}~`\^+"<>|@]*)}//) {
my $value = $1;
- if (exists($self->{'values'}->{$value})) {
- if (!defined($self->{'values'}->{$value})) {
- print STDERR "BUG? $value exists but not defined\n";
- } elsif (!ref($self->{'values'}->{$value})) {
+ if ($command eq 'value') {
+ if (exists($self->{'values'}->{$value})) {
$line = $self->{'values'}->{$value} . $line;
} else {
- print STDERR "BUG? $value defined as reference\n";
- }
- } else {
- # Flag not defined. This is an error if it comes from
- # a user's document. It is also expected behaviour for
- # Texinfo::Report::gdt, where we want to defer substitution
- # of the value until after the containing Texinfo is parsed.
- _abort_empty_line($self, $current);
- # caller should expand something along
- # gdt('@{No value for `{value}\'@}', {'value' => $value},
{'keep_texi'=> 1});
- push @{$current->{'contents'}}, { 'cmdname' => 'value',
- 'type' => $value,
- 'contents' => [],
- 'parent' => $current };
- if (!$self->{'in_gdt'}) {
+ _abort_empty_line($self, $current);
+ # caller should expand something along
+ # gdt('@{No value for `{value}\'@}', {'value' => $value},
{'keep_texi'=> 1});
+ push @{$current->{'contents'}}, { 'cmdname' => $command,
+ 'type' => $value,
+ 'contents' => [],
+ 'parent' => $current };
$self->line_warn(
sprintf(__("undefined flag: %s"), $value), $line_nr);
}
+ } else {
+ # txiinternalvalue
+ _abort_empty_line($self, $current);
+ my $new_element = { 'cmdname' => $command,
+ 'args' => [],
+ 'parent' => $current };
+ # type misc_arg?
+ push @{$new_element->{'args'}}, {'text' => $value,
+ 'parent' => $new_element};
+ push @{$current->{'contents'}}, $new_element;
}
} else {
- $self->line_error(__("bad syntax for \@value"), $line_nr);
+ $self->line_error(__("bad syntax for \@$command"), $line_nr);
}
next;
}
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index 96793b5..3855571 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -356,14 +356,7 @@ sub gdt($$;$$)
# the parser is a new one there should not be any problem anyway.
if (defined($re)) {
# next line taken from libintl perl, copyright Guido. sub __expand
- $translation_result =~ s/\{($re)\}/\@value\{_$1\}/g;
- foreach my $substitution(keys %$context) {
- # Only pass simple string @values to parser.
- if (!ref($context->{$substitution})) {
- $parser_conf->{'values'}->{'_'.$substitution}
- = $context->{$substitution};
- }
- }
+ $translation_result =~ s/\{($re)\}/\@txiinternalvalue\{$1\}/g;
}
# Don't reuse the current parser itself, as (tested) the parsing goes
@@ -392,6 +385,15 @@ sub gdt($$;$$)
}
my $tree = $parser->parse_texi_line($translation_result);
+ if ($parser->{'DEBUG'}) {
+ my ($errors, $errors_count) = $parser->errors();
+ if ($errors_count) {
+ print STDERR "GDT $errors_count errors\n";
+ foreach my $error_message (@$errors) {
+ warn $error_message->{'error_line'};
+ }
+ }
+ }
$tree = _substitute ($tree, $context);
return $tree;
}
@@ -401,13 +403,14 @@ sub _substitute_element_array ($$) {
my $array = shift; my $context = shift;
@{$array} = map {
- if ($_->{'cmdname'} and $_->{'cmdname'} eq 'value') {
- my $name = $_->{'type'};
- $name =~ s/^_//;
+ if ($_->{'cmdname'} and $_->{'cmdname'} eq 'txiinternalvalue') {
+ my $name = $_->{'args'}->[0]->{'text'};
if (ref($context->{$name}) eq 'HASH') {
$context->{$name};
} elsif (ref($context->{$name}) eq 'ARRAY') {
@{$context->{$name}};
+ } elsif (ref($context->{$name}) eq '') {
+ {'text' => $context->{$name}};
} else {
(); # undefined - shouldn't happen?
}
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index b9a355f..5a4100b 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -117,8 +117,9 @@ sub parser (;$$)
conf_set_CPP_LINE_DIRECTIVES($conf->{$key});
} elsif ($key eq 'DEBUG') {
set_debug($conf->{$key}) if $conf->{'key'};
- } elsif ($key eq 'in_gdt'
- or $key eq 'ENABLE_ENCODING'
+ } elsif ($key eq 'in_gdt') {
+ set_in_gdt();
+ } elsif ($key eq 'ENABLE_ENCODING'
or $key eq 'novalidate'
or
defined($Texinfo::Common::default_structure_customization_values{$key})) {
# no action needed
@@ -349,6 +350,7 @@ sub parse_texi_line($$;$$$$)
utf8::upgrade($text);
parse_string($text);
my $tree = build_texinfo_tree ();
+ _get_errors ($self);
return $tree;
}
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index 9e3546e..f1f8cad 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -108,3 +108,6 @@ set_documentlanguage (value)
void
set_debug (int i)
+
+void
+set_in_gdt()
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index 1655c1c..3f84e1a 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -147,6 +147,7 @@ reset_parser (void)
wipe_values ();
clear_expanded_formats ();
reset_conf ();
+ global_in_gdt = 0;
}
/* Set ROOT to root of tree obtained by parsing FILENAME. */
diff --git a/tp/Texinfo/XS/parsetexi/command_data.txt
b/tp/Texinfo/XS/parsetexi/command_data.txt
index 4d79049..4aca817 100644
--- a/tp/Texinfo/XS/parsetexi/command_data.txt
+++ b/tp/Texinfo/XS/parsetexi/command_data.txt
@@ -19,6 +19,8 @@
# Not in Common.pm
value brace
+# invalid if not in_gdt set in configuration
+txiinternalvalue brace
##############################################################
# no brace commands - single letter commands
diff --git a/tp/Texinfo/XS/parsetexi/command_ids.h
b/tp/Texinfo/XS/parsetexi/command_ids.h
index 856f6d3..d970703 100644
--- a/tp/Texinfo/XS/parsetexi/command_ids.h
+++ b/tp/Texinfo/XS/parsetexi/command_ids.h
@@ -367,6 +367,7 @@ CM_titlefont,
CM_titlepage,
CM_today,
CM_top,
+CM_txiinternalvalue,
CM_u,
CM_ubaraccent,
CM_udotaccent,
diff --git a/tp/Texinfo/XS/parsetexi/commands.c
b/tp/Texinfo/XS/parsetexi/commands.c
index e0caffd..2f28a6b 100644
--- a/tp/Texinfo/XS/parsetexi/commands.c
+++ b/tp/Texinfo/XS/parsetexi/commands.c
@@ -22,6 +22,12 @@
#include "commands.h"
#include "errors.h"
+/* FIXME pass global_in_gdt to lookup_command instead of
+ * #include parser.h to get the global variable value? */
+
+/* for global_in_gdt */
+#include "parser.h"
+
#include "command_data.c"
COMMAND *user_defined_command_data = 0;
@@ -67,7 +73,18 @@ lookup_command (char *cmdname)
compare_command_fn);
if (c)
- return c - &builtin_command_data[0];
+ {
+ enum command_id cmd;
+ cmd = c - &builtin_command_data[0];
+
+ /* txiinternalvalue is invalid if the corresponding configuration
+ * is not set */
+ if (cmd == CM_txiinternalvalue && !global_in_gdt) {
+ return 0;
+ }
+
+ return cmd;
+ }
return 0;
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index d744aa5..b22228d 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -136,6 +136,7 @@ COUNTER count_cells;
GLOBAL_INFO global_info;
char *global_clickstyle = 0;
char *global_documentlanguage = 0;
+int global_in_gdt = 0;
enum kbd_enum global_kbdinputstyle = kbd_distinct;
@@ -146,6 +147,12 @@ set_documentlanguage (char *value)
global_documentlanguage = strdup (value);
}
+void
+set_in_gdt()
+{
+ global_in_gdt = 1;
+}
+
/* Record the information from a command of global effect. */
int
register_global_command (ELEMENT *current)
@@ -1500,8 +1507,8 @@ superfluous_arg:
line = line_after_command;
debug ("COMMAND %s", command_name(cmd));
- /* @value */
- if (cmd == CM_value)
+ /* @value and @txiinternalvalue */
+ if ((cmd == CM_value) || (cmd == CM_txiinternalvalue))
{
char *arg_start;
char *flag;
@@ -1525,51 +1532,72 @@ superfluous_arg:
{
char *value;
value_valid:
- value = fetch_value (flag);
- if (!value)
+ if (cmd == CM_value)
{
- /* Add element for unexpanded @value.
- This is not necessarily an error - in
- Texinfo::Report::gdt we deliberately pass
- in undefined values. */
- ELEMENT *value_elt;
-
- line_warn ("undefined flag: %s", flag);
- /* Note: In the Perl code, this warning is conditional on
- in_gdt setting, but the only effect that this possibly
has
- is on speed, as these warnings would not be printed to
the
- user. */
+ value = fetch_value (flag);
+ if (!value)
+ {
+ /* Add element for unexpanded @value.
+ This should be an error, but still leave a tree element
+ for the converters to handle */
+ ELEMENT *value_elt;
- abort_empty_line (¤t, NULL);
- value_elt = new_element (ET_NONE);
- value_elt->cmd = CM_value;
- text_append (&value_elt->text, flag);
+ line_warn ("undefined flag: %s", flag);
- /* In the Perl code, the name of the flag is stored in
- the "type" field. We need to store in 'text' instead
- and then output it as the type in
- dump_perl.c / api.c. */
+ abort_empty_line (¤t, NULL);
+ value_elt = new_element (ET_NONE);
+ value_elt->cmd = CM_value;
+ text_append (&value_elt->text, flag);
- add_to_element_contents (current, value_elt);
+ /* In the Perl code, the name of the flag is stored in
+ the "type" field. We need to store in 'text' instead
+ and then output it as the type in
+ dump_perl.c / api.c. */
- line++; /* past '}' */
- retval = STILL_MORE_TO_PROCESS;
+ add_to_element_contents (current, value_elt);
+
+ line++; /* past '}' */
+ retval = STILL_MORE_TO_PROCESS;
+ }
+ else
+ {
+ line++; /* past '}' */
+ input_push_text (strdup (line), line_nr.macro);
+ input_push_text (strdup (value), line_nr.macro);
+ line += strlen (line);
+ retval = STILL_MORE_TO_PROCESS;
+ }
+ free (flag);
+ goto funexit;
}
else
- {
+ { /* CM_txiinternalvalue */
+ ELEMENT *txiinternalvalue_elt;
+
+ abort_empty_line (¤t, NULL);
+ txiinternalvalue_elt = new_element (ET_NONE);
+ txiinternalvalue_elt->cmd = CM_txiinternalvalue;
+
+ /* FIXME or misc_arg?
+ * ELEMENT *txiinternalvalue_arg = new_element (ET_misc_arg)
*/;
+ ELEMENT *txiinternalvalue_arg = new_element (ET_NONE);
+
+ text_append (&txiinternalvalue_arg->text, flag);
+ add_to_element_args (txiinternalvalue_elt,
txiinternalvalue_arg);
+
+ add_to_element_contents (current, txiinternalvalue_elt);
+
line++; /* past '}' */
- input_push_text (strdup (line), line_nr.macro);
- input_push_text (strdup (value), line_nr.macro);
- line += strlen (line);
retval = STILL_MORE_TO_PROCESS;
+
+ free (flag);
+ goto funexit;
}
- free (flag);
- goto funexit;
}
else
{
value_invalid:
- line_error ("bad syntax for @value");
+ line_error ("bad syntax for @%s", command_name(cmd));
retval = STILL_MORE_TO_PROCESS;
goto funexit;
}
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index 2ae42bc..421852b 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -157,6 +157,7 @@ int format_expanded_p (char *format);
int is_end_current_command (ELEMENT *current, char **line,
enum command_id *end_cmd);
void set_documentlanguage (char *);
+void set_in_gdt ();
char *element_type_name (ELEMENT *e);
/* Return values */
@@ -175,6 +176,7 @@ extern ELEMENT *current_part;
extern GLOBAL_INFO global_info;
extern char *global_clickstyle;
extern char *global_documentlanguage;
+extern int global_in_gdt;
enum kbd_enum {kbd_none, kbd_code, kbd_example, kbd_distinct };
extern enum kbd_enum global_kbdinputstyle;
diff --git a/tp/t/55conditionals.t b/tp/t/55conditionals.t
index ffeb0d6..5203bec 100644
--- a/tp/t/55conditionals.t
+++ b/tp/t/55conditionals.t
@@ -464,6 +464,18 @@ strongalias @@alias is defined.
strongalias @@alias is wrongly not defined
@end ifcommandnotdefined
'],
+['txiinternalvalue',
+'@txiinternalvalue
+'],
+# currently this is not an error, it is only an error
+# to redefine @txiinternalvalue if in_gdt
+['user_defined_txiinternalvalue',
+'@macro txiinternalvalue
+user internalvalue
+@end macro
+
+@txiinternalvalue
+'],
['inlineiffmtifelse_not_closed',
'@inlinefmtifelse{html,
'],
diff --git a/tp/t/results/conditionals/txiinternalvalue.pl
b/tp/t/results/conditionals/txiinternalvalue.pl
new file mode 100644
index 0000000..4f5eef7
--- /dev/null
+++ b/tp/t/results/conditionals/txiinternalvalue.pl
@@ -0,0 +1,50 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'txiinternalvalue'} = {
+ 'contents' => [
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => '
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'txiinternalvalue'}{'contents'}[0]{'contents'}[0]{'parent'} =
$result_trees{'txiinternalvalue'}{'contents'}[0];
+$result_trees{'txiinternalvalue'}{'contents'}[0]{'parent'} =
$result_trees{'txiinternalvalue'};
+
+$result_texis{'txiinternalvalue'} = '
+';
+
+
+$result_texts{'txiinternalvalue'} = '
+';
+
+$result_errors{'txiinternalvalue'} = [
+ {
+ 'error_line' => ':1: unknown command `txiinternalvalue\'
+',
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => '',
+ 'text' => 'unknown command `txiinternalvalue\'',
+ 'type' => 'error'
+ }
+];
+
+
+$result_floats{'txiinternalvalue'} = {};
+
+
+1;
diff --git a/tp/t/results/conditionals/user_defined_txiinternalvalue.pl
b/tp/t/results/conditionals/user_defined_txiinternalvalue.pl
new file mode 100644
index 0000000..ab70462
--- /dev/null
+++ b/tp/t/results/conditionals/user_defined_txiinternalvalue.pl
@@ -0,0 +1,96 @@
+use vars qw(%result_texis %result_texts %result_trees %result_errors
+ %result_indices %result_sectioning %result_nodes %result_menus
+ %result_floats %result_converted %result_converted_errors
+ %result_elements %result_directions_text);
+
+use utf8;
+
+$result_trees{'user_defined_txiinternalvalue'} = {
+ 'contents' => [
+ {
+ 'args' => [
+ {
+ 'parent' => {},
+ 'text' => 'txiinternalvalue',
+ 'type' => 'macro_name'
+ }
+ ],
+ 'cmdname' => 'macro',
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'user internalvalue',
+ 'type' => 'raw'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'last_raw_newline'
+ }
+ ],
+ 'extra' => {
+ 'arg_line' => ' txiinternalvalue
+'
+ },
+ 'line_nr' => {
+ 'file_name' => '',
+ 'line_nr' => 1,
+ 'macro' => ''
+ },
+ 'parent' => {}
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line_after_command'
+ },
+ {
+ 'parent' => {},
+ 'text' => '
+',
+ 'type' => 'empty_line'
+ },
+ {
+ 'contents' => [
+ {
+ 'parent' => {},
+ 'text' => 'user internalvalue
+'
+ }
+ ],
+ 'parent' => {},
+ 'type' => 'paragraph'
+ }
+ ],
+ 'type' => 'text_root'
+};
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[0]{'args'}[0]{'parent'}
= $result_trees{'user_defined_txiinternalvalue'}{'contents'}[0];
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[0]{'contents'}[0]{'parent'}
= $result_trees{'user_defined_txiinternalvalue'}{'contents'}[0];
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[0]{'contents'}[1]{'parent'}
= $result_trees{'user_defined_txiinternalvalue'}{'contents'}[0];
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[0]{'parent'} =
$result_trees{'user_defined_txiinternalvalue'};
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[1]{'parent'} =
$result_trees{'user_defined_txiinternalvalue'};
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[2]{'parent'} =
$result_trees{'user_defined_txiinternalvalue'};
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[3]{'contents'}[0]{'parent'}
= $result_trees{'user_defined_txiinternalvalue'}{'contents'}[3];
+$result_trees{'user_defined_txiinternalvalue'}{'contents'}[3]{'parent'} =
$result_trees{'user_defined_txiinternalvalue'};
+
+$result_texis{'user_defined_txiinternalvalue'} = '@macro txiinternalvalue
+user internalvalue
+@end macro
+
+user internalvalue
+';
+
+
+$result_texts{'user_defined_txiinternalvalue'} = '
+user internalvalue
+';
+
+$result_errors{'user_defined_txiinternalvalue'} = [];
+
+
+$result_floats{'user_defined_txiinternalvalue'} = {};
+
+
+1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Internal command @txiinternalvalue for gdt strings value labels in tree,
Patrice Dumas <=