Lines Matching full:dom
76 $dom = ebnf_parse_syntax($tokens); variable
79 echo $dom->saveXML();
81 render_node($dom->firstChild, true);
85 $dom = new DOMDocument(); variable
86 $syntax = $dom->createElement("syntax");
92 $dom->appendChild($syntax);
93 render_node($dom->firstChild, true);
287 $dom = new DOMDocument();
288 $syntax = $dom->createElement("syntax");
290 $dom->appendChild($syntax);
301 $syntax->appendChild(ebnf_parse_production($dom, $tokens, $i));
312 return $dom;
315 function ebnf_parse_production(&$dom, &$tokens, &$i) { argument
319 $production = $dom->createElement("rule");
324 $production->appendChild( ebnf_parse_expression($dom, $tokens, $i));
332 function ebnf_parse_expression(&$dom, &$tokens, &$i) { argument
333 $choise = $dom->createElement("choise");
334 $choise->appendChild(ebnf_parse_term($dom, $tokens, $i));
338 $choise->appendChild(ebnf_parse_term($dom, $tokens, $i));
343 function ebnf_parse_term(&$dom, &$tokens, &$i) { argument
344 $sequence = $dom->createElement("sequence");
345 $factor = ebnf_parse_factor($dom, $tokens, $i);
350 $sequence->appendChild(ebnf_parse_factor($dom, $tokens, $i));
355 function ebnf_parse_factor(&$dom, &$tokens, &$i) { argument
358 $identifier = $dom->createElement("identifier");
362 $literal = $dom->createElement("terminal");
366 $expression = ebnf_parse_expression($dom, $tokens, $i);
372 $option = $dom->createElement("option");
373 $option->appendChild(ebnf_parse_expression($dom, $tokens, $i));
379 $loop = $dom->createElement("loop");
380 $loop->appendChild(ebnf_parse_expression($dom, $tokens, $i));