Lines Matching +full:- +full:- +full:strip +full:- +full:components

51      * @return int Sort order - Low numbers go before high numbers
63 if( $this->init ) return;
71 …$this->stack=array(array('/^.{0,30}[$%>#](?:$|\\s)/', '/^.{0,30}>(?:$|\\s)/', '/(?:^#)|\\s#/', '',…
73 if(''!=($s=$this->getConf('prompt')))
74 $this->stack[0][self::PROMPT]=$this->_toregexp($s);
75 if(''!=($s=$this->getConf('continue')))
76 $this->stack[0][self::CONT]=$this->_toregexp($s);
77 if(''!=($s=$this->getConf('comment')))
78 $this->stack[0][self::COMMENT]=$this->_toregexp($s, 1);
79 $this->_parsenamedparam($this->getConf('namedprompt'), self::PROMPT);
80 $this->_parsenamedparam($this->getConf('namedcontinue'), self::CONT);
81 $this->_parsenamedparam($this->getConf('namedcomment'), self::COMMENT);
82 $this->init = true;
102 $this->Lexer->addEntryPattern('<cli(?:[)]?' .
103 '"(?:\\\\.|[^\\\\"])*"' . /* double-quoted string */
104 '|\'(?:\\\\.|[^\'\\\\])*\'' . /* single-quoted string */
122 $this->Lexer->addExitPattern('\r?\n?</cli>','plugin_cli');
138 $this->_init();
139 $level=count($this->stack) - 1;
140 $args = substr(rtrim($match), 4, -1); // strip '<cli' and '>EOL?'
141 $params=$this->_parseparams($args);
144 $this->current=array();
147 $last=end($this->stack);
148 $this->current[self::PROMPT]=$last[self::PROMPT];
149 $this->current[self::CONT]=$last[self::CONT];
150 $this->current[self::COMMENT]=$last[self::COMMENT];
151 $this->current[self::TYPE]=$last[self::TYPE];
154 $this->current[self::PROMPT]=($params['prompt']) ?
155 $this->_toregexp($params['prompt'])
156 : (($type && ($t=$this->namedpcc[$type][self::PROMPT])) ?
158 : $this->stack[0][self::PROMPT]
160 $this->current[self::CONT]=($params['continue']) ?
161 $this->_toregexp($params['continue'])
162 : (($type && ($t=$this->namedpcc[$type][self::CONT])) ?
164 : $this->stack[0][self::CONT]
166 $this->current[self::COMMENT]=($params['comment']) ?
167 $this->_toregexp($params['comment'],1)
168 : (($type && ($t=$this->namedpcc[$type][self::COMMENT])) ?
170 : $this->stack[0][self::COMMENT]
172 $this->current[self::TYPE]=$type;
174 $this->current[self::STYLE]=$style;
175 $this->stack[]=$this->current;
177 return array($state, count($this->stack) - 2, $type, $style);
180 $top=end($this->stack);
181 … return array( $state, $this->_parse_conversation($match), $top[self::TYPE], $top[self::STYLE] );
183 $top=array_pop($this->stack);
184 $this->current=end($this->stack);
186 return array($state, count($this->stack) -1, $top[self::TYPE], $top[self::STYLE] );
206 $main_prompt=$this->current[self::PROMPT];
207 $cont_prompt=$this->current[self::CONT];
212 // continuation lines can only appear after a main-prompt line or continuation-line
218 $parsed_lines[]=$this->_parseline( $line, $matches[0] );
224 $parsed_lines[]=$this->_parseline( $line, $matches[0] );
237 * @return String[] the 3 components of the line : prompt, command, comment
243 $ar=preg_split($this->current[self::COMMENT], $comcom, 2, PREG_SPLIT_DELIM_CAPTURE);
273 $this->genhtml = '';
276 $this->genhtml .= "<div class='$type $style'>";
278 $this->genhtml .= DOKU_LF;
286 $this->genhtml .= DOKU_LF;
290 $this->genhtml .= '<span class="cli_prompt">' . hsc($line[0]) . "</span>";
292 $this->genhtml .= '<span class="cli_command">' . hsc($line[1]) . "</span>";
294 $this->genhtml .= '<span class="cli_comment">' . hsc($line[2]) . "</span>";
296 $this->genhtml .= '<span class="cli_output">' . hsc($line) . "</span>";
305 $renderer->doc .= "</p><pre class='cli $type $style'>";
306 $renderer->doc .= $this->genhtml;
307 $renderer->doc .= '</pre><p>';
310 if(!$renderer->styleExists('Command Line Interface')) {
312 'style-name' => 'Command Line Interface',
313 'style-display-name' => 'Command Line Interface',
314 'background-color' => $this->getConf('odtbackground'),
315 'border' => $this->getConf('odtborderwidth').' solid '.
316 $this->getConf('odtbordercolor'),
318 $renderer->createParagraphStyle( $style );
321 …// see https://github.com/LarsGit223/dokuwiki-plugin-odt/commit/19f42d58f1d97758a2ccbac38aae725382…
327 $renderer->generateODTfromHTMLCode($this->genhtml, $options);
331 $this->genhtml .= '</div>';
333 $this->genhtml .= DOKU_LF;
351 $this->namedpcc[$nom][$kind]=$this->_toregexp($val, $kind == self::COMMENT);
369 $s = $s[0] . '(' . substr( $s, 1, -1 ) . ')' . $s[0];
383 * recognize bare word, =, \-escaped char, and single or double quoted strings.
387 * sed -ne '/digr''aph/,/}/s/ *.//p' syntax.php | dot -Tpng >/tmp/graph.png
390 * 0 -> 0 [label="\\s"]
391 * 0 -> 1 [label="\""]
392 * 0 -> 3 [label="'"]
393 * 0 -> 6 [label="\\ [+]"]
394 * 0 -> 7 [label="= [+]"]
395 * 0 -> 5 [label=". [+]"]
397 * 1 -> 2 [label="\\ [+]"]
398 * 1 -> 0 [label="\" [A]"]
399 * 1 -> 1 [label=". [+]"]
400 * 2 -> 1 [label="[\"\\] [-]"]
401 * 2 -> 8 [label=". [+]"]
402 * 8 -> 2 [label="\\ [+]"]
403 * 8 -> 0 [label="\" [A]"]
404 * 8 -> 1 [label=". [+]"]
406 * 3 -> 4 [label="\\ [+]"]
407 * 3 -> 0 [label="' [A]"]
408 * 3 -> 3 [label=". [+]"]
409 * 4 -> 3 [label="['\\] [-]"]
410 * 4 -> 9 [label=". [+]"]
411 * 9 -> 4 [label="\\ [+]"]
412 * 9 -> 0 [label="' [A]"]
413 * 9 -> 3 [label=". [+]"]
415 * 5 -> 6 [label="\\ [+]"]
416 * 5 -> 0 [label="\\s [A]"]
417 * 5 -> 7 [label="= [A+]"]
418 * 5 -> 1 [label="\" [A]"]
419 * 5 -> 3 [label="' [A]"]
420 * 5 -> 5 [label=". [+]"]
422 * 6 -> 5 [label="[\"' =\\>] [-]"]
423 * 6 -> 5 [label=". [+]"]
425 * 7 -> 0 [label="\\s [A]"]
426 * 7 -> 1 [label="\" [A]"]
427 * 7 -> 3 [label="' [A]"]
428 * 7 -> 6 [label="\\ [A+]"]
429 * 7 -> 5 [label=". [A+]"]
430 …* e [shape=box,label="arc label : current char [actions]\n+: add current char to token\n-: repla…
451 2 => array( 1 => array( '"' => '-', "\\" => '-', 'def' => '+')),
453 4 => array( 3 => array( "'" => '-', "\\" => '-', 'def' => '+',)),
455 …6 => array( 5 => array( '"' => '-', "'" => '-', ' ' => '-', '=' => '-', "\\" => '-', '>' => '-', '…
471 case '-' : $tok = substr($tok, 0, -1).$c; break;
485 if($this->getConf('debug'))
505 if($this->getConf('debug'))
507 $toks=$this->_tokenize($str);
513 for( $i = 0; $i < $n - 2; ++$i ) {
515 $key=$this->_map($toks[$i]);
523 … 'Error, unknown attribute «' . hsc($toks[$i]) . '» in &lt;cli> parametre', -1, '', '', MSG_USERS_…