Lines Matching refs:tok
224 mdoc_macros[n->tok].flags & MDOC_EXPLICIT)
226 n->line, n->pos, mdoc_macronames[n->tok]);
294 n->tok);
326 rew_alt(int tok)
328 switch (tok) {
362 return tok;
367 rew_elem(struct roff_man *mdoc, int tok)
375 assert(tok == n->tok);
385 find_pending(struct roff_man *mdoc, int tok, int line, int ppos,
399 mdoc_macros[n->tok].flags & MDOC_EXPLICIT) {
407 "%s breaks %s", mdoc_macronames[tok],
408 mdoc_macronames[n->tok]);
410 tok, target, ENDBODY_NOSPACE);
450 mdoc->last->parent->tok != MDOC_Fd)
504 ntok = lookup(mdoc, tok, line, ppos, p);
507 dword(mdoc, line, ppos, p, DELIM_MAX, tok == TOKEN_NONE ||
508 mdoc_macros[tok].flags & MDOC_JOIN);
511 if (mdoc_macros[tok].fp == in_line_eoln)
512 rew_elem(mdoc, tok);
514 if (tok == TOKEN_NONE)
540 switch (tok) {
557 atok = rew_alt(tok);
568 if (n->type == ROFFT_BODY && atok == n->tok) {
574 if (n->type != ROFFT_BLOCK || n->tok == MDOC_Nm)
577 if (n->tok == MDOC_It) {
582 if (atok == n->tok) {
592 (tok == MDOC_El && itblk == NULL))
606 mdoc_macronames[later->tok]);
611 if (tok == MDOC_El)
627 if (n->tok == MDOC_Nd) {
641 line, ppos, mdoc_macronames[tok]);
658 if ( ! (mdoc_macros[tok].flags & MDOC_PARSED)) {
662 "%s %s", mdoc_macronames[tok],
679 ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
684 lookup(mdoc, tok, line, lastarg, p);
688 MDOC_JOIN & mdoc_macros[tok].flags);
733 switch (tok) {
747 mdoc_argv(mdoc, line, tok, &arg, pos, buf);
754 ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
776 if (cnt == 0 && (nc == 0 || tok == MDOC_An))
781 ntok = (ac == ARGS_QWORD || (tok == MDOC_Fn && !cnt)) ?
782 TOKEN_NONE : lookup(mdoc, tok, line, la, p);
793 rew_elem(mdoc, tok);
795 mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
801 mdoc_macronames[tok]);
825 (d == DELIM_MIDDLE && tok == MDOC_Fl)) &&
827 mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
830 if (tok == MDOC_Nm)
838 rew_elem(mdoc, tok);
840 if (tok == MDOC_Fn)
843 mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
849 MDOC_JOIN & mdoc_macros[tok].flags);
865 if (scope && tok == MDOC_Fl) {
866 rew_elem(mdoc, tok);
872 rew_elem(mdoc, tok);
882 mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
887 line, ppos, mdoc_macronames[tok]);
908 if (buf[*pos] == '\0' && (tok == MDOC_Sh || tok == MDOC_Ss)) {
910 line, ppos, mdoc_macronames[tok]);
914 if ( ! (mdoc_macros[tok].flags & MDOC_EXPLICIT)) {
916 /* Here, tok is one of Sh Ss Nm Nd It. */
928 if (tok == MDOC_It && n->tok == MDOC_Bl) {
933 mdoc_macronames[blk->tok]);
939 if (mdoc_macros[n->tok].flags & MDOC_EXPLICIT) {
940 switch (tok) {
946 mdoc_macronames[tok],
947 mdoc_macronames[n->tok]);
963 if (tok != MDOC_Sh && (n->tok == MDOC_Sh ||
964 (tok != MDOC_Ss && (n->tok == MDOC_Ss ||
965 (tok != MDOC_It && n->tok == MDOC_It)))))
974 mdoc_macronames[blk->tok]);
986 if (tok == MDOC_It && (n == NULL || n->tok != MDOC_Bl)) {
1004 mdoc_argv(mdoc, line, tok, &arg, pos, buf);
1005 blk = mdoc_block_alloc(mdoc, line, ppos, tok, arg);
1013 parsed = tok != MDOC_It ||
1014 mdoc->last->parent->tok != MDOC_Bl ||
1022 if (tok == MDOC_Nd) {
1023 head = roff_head_alloc(mdoc, line, ppos, tok);
1025 body = roff_body_alloc(mdoc, line, ppos, tok);
1028 if (tok == MDOC_Bk)
1046 ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
1059 body = roff_body_alloc(mdoc, line, ppos, tok);
1064 if (tok == MDOC_Bd || tok == MDOC_Bk) {
1067 mdoc_macronames[tok], buf + la);
1070 if (tok == MDOC_Rs) {
1094 head = roff_head_alloc(mdoc, line, ppos, tok);
1104 body = roff_body_alloc(mdoc, line, ppos, tok);
1119 if (macro_or_word(mdoc, tok, line, la, pos, buf, parsed))
1126 head = roff_head_alloc(mdoc, line, ppos, tok);
1127 if (nl && tok != MDOC_Bd && tok != MDOC_Bl && tok != MDOC_Rs)
1131 if (find_pending(mdoc, tok, line, ppos, head))
1137 body = roff_body_alloc(mdoc, line, ppos, tok);
1167 blk = mdoc_block_alloc(mdoc, line, ppos, tok, NULL);
1168 rew_last(mdoc, roff_head_alloc(mdoc, line, ppos, tok));
1178 ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
1189 body = roff_body_alloc(mdoc, line, ppos, tok);
1191 if (macro_or_word(mdoc, tok, line, la, pos, buf, 1))
1195 body = roff_body_alloc(mdoc, line, ppos, tok);
1197 if (find_pending(mdoc, tok, line, ppos, body))
1209 if (n && n->tok == MDOC_Ns)
1229 roff_block_alloc(mdoc, line, ppos, tok);
1233 ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
1246 head = roff_head_alloc(mdoc, line, ppos, tok);
1247 if (tok == MDOC_Eo) /* Not parsed. */
1250 roff_body_alloc(mdoc, line, ppos, tok);
1251 if (tok == MDOC_Eo)
1255 if (macro_or_word(mdoc, tok, line, la, pos, buf, 1))
1262 rew_last(mdoc, roff_head_alloc(mdoc, line, ppos, tok));
1263 roff_body_alloc(mdoc, line, ppos, tok);
1289 switch (tok) {
1305 mdoc_argv(mdoc, line, tok, &arg, pos, buf);
1311 ac = mdoc_args(mdoc, line, pos, buf, tok, &p);
1314 ! (mdoc_macros[tok].flags & MDOC_IGNDELIM) &&
1320 if (state == -1 && tok != MDOC_In &&
1321 tok != MDOC_St && tok != MDOC_Xr) {
1322 mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
1327 if (abs(state) < 2 && tok == MDOC_Pf)
1335 rew_elem(mdoc, tok);
1339 ntok = (ac == ARGS_QWORD || (tok == MDOC_Pf && state == 0)) ?
1340 TOKEN_NONE : lookup(mdoc, tok, line, la, p);
1344 rew_elem(mdoc, tok);
1352 mdoc_macros[tok].flags & MDOC_IGNDELIM ||
1355 mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
1360 rew_elem(mdoc, tok);
1365 MDOC_JOIN & mdoc_macros[tok].flags);
1370 line, ppos, mdoc_macronames[tok]);
1374 if (state == 0 && tok == MDOC_Pf)
1377 rew_elem(mdoc, tok);
1388 if ((tok == MDOC_Pp || tok == MDOC_Lp) &&
1393 if (n->tok == MDOC_Nm)
1398 (tok == MDOC_Fd || mdoc_macronames[tok][0] == '%')) {
1400 line, ppos, mdoc_macronames[tok]);
1404 mdoc_argv(mdoc, line, tok, &arg, pos, buf);
1405 mdoc_elem_alloc(mdoc, line, ppos, tok, arg);
1406 if (parse_rest(mdoc, tok, line, pos, buf))
1408 rew_elem(mdoc, tok);
1417 parse_rest(struct roff_man *mdoc, int tok, int line, int *pos, char *buf)
1423 if (mdoc_args(mdoc, line, pos, buf, tok, NULL) == ARGS_EOLN)
1425 if (macro_or_word(mdoc, tok, line, la, pos, buf, 1))
1435 in_line(mdoc, tok, line, ppos, pos, buf);
1436 else if (tok == MDOC_Nm)
1437 blk_full(mdoc, tok, line, ppos, pos, buf);
1439 assert(tok == MDOC_Vt);
1440 blk_part_imp(mdoc, tok, line, ppos, pos, buf);
1460 if (n->tok == MDOC_It && n->type == ROFFT_BODY)
1462 if (n->tok == MDOC_Bl)