Maple strings start with '`'
tangle.web line 1074

@x
    if (isdigit(c) || c=='\\' || c=='.') @<Get a constant@>@;/*spider*/
    else if (isalpha(c) || c=='_' || c=='$') @<Get an identifier@>@;/*spider*/
    else if (c=='\'' || c=='\"') @<Get a string@>@;/*spider*/
@y
    if (isdigit(c) || c=='.') @<Get a constant@>@;/*spider*/
    else if (isalpha(c) || c=='_' || c=='\\') @<Get an identifier@>@;/*spider*/
    else if (c=='`' ) @<Get a string@>@;/*spider*/
@z

@x
@ @<Get an identifier@>= {/*spider*/
  id_first=--loc;
  while (isalpha(*++loc) || isdigit(*loc) || *loc=='_');
  if (*loc=='$') while (isdigit(*++loc)||*loc=='$');
 	/* make room for \$\$ and \$nnn suffixes */
  id_loc=loc; return(identifier);
}
@y
@ @<Get an identifier@>= {/*spider*/
  id_first=--loc;
  while (isalpha(*++loc) || isdigit(*loc) || *loc=='_' || *loc=='\\');
  id_loc=loc; return(identifier);
}
@z


Maple allows e.g. 1234\4567 for 'better' readability
tangle.web line 1092
@x
@ @<Get a constant@>= {/*spider*/
  id_first=loc-1;
  if (*id_first=='.' && !isdigit(*loc)) goto mistake; /* not a constant */
  if (*id_first=='\\') while (isdigit(*loc)) loc++; /* octal constant */
  else {
    if (*id_first=='0') {
      if (*loc=='x' || *loc=='X') { /* hex constant */
        loc++; while (isxdigit(*loc)) loc++; goto found;
      }
    }
    while (isdigit(*loc)) loc++;
    if (*loc=='.') {
	loc++;
	while (isdigit(*loc)) loc++;
	}
    if (*loc=='e' || *loc=='E') { /* float constant */
      if (*++loc=='+' || *loc=='-') loc++;
      while (isdigit(*loc)) loc++;
    }
  }
  found: 
  id_loc=loc;
  return(constant);
}
@y
@ @<Get a constant@>= {/*spider*/
  id_first=loc-1;
  if (*id_first=='.' && !isdigit(*loc)) goto mistake; /* not a constant */
  if (*id_first=='\\') while (isdigit(*loc)) loc++; /* octal constant */
  else {
    if (*id_first=='0') {
      if (*loc=='x' || *loc=='X') { /* hex constant */
        loc++; while (isxdigit(*loc)) loc++; goto found;
      }
    }
    while (isdigit(*loc)) loc++;
    if (*loc=='.'  || *loc=='\\') {
	loc++;
	while (isdigit(*loc)) loc++;
	}
    if (*loc=='e' || *loc=='E') { /* float constant */
      if (*++loc=='+' || *loc=='-') loc++;
      while (isdigit(*loc)) loc++;
    }
  }
  found: 
  id_loc=loc;
  return(constant);
}
@z

tangle.web line 1122
@x
@<Get a string@>= {/*spider*/
  ASCII delim = c; /* what started the string */
@#
/* if it's not a single-character literal, it's a tick mark or an |at_sign| */
  if (delim=='\'' && (loc+1>=limit || 
			(*loc != '\\' && *loc!=at_sign && loc[1]!='\'')	|| 
			(*loc=='\\' && (loc+2>=limit||loc[2]!='\'')) ||
			(*loc==at_sign && 
			    (loc+2>=limit||loc[1]!=at_sign||loc[2]!='\''))
		     )) goto mistake;
  id_first = mod_text+1;
  id_loc = mod_text; *++id_loc=delim;
  while (1) {
    if (loc>=limit) {
      if(*(limit-1)!='\\') {
        err_print("! String didn't end"); loc=limit; break;
@.String didn't end@>
      }
      if(get_line()==0) {
        err_print("! Input ended in middle of string"); loc=buffer; break;
@.Input ended in middle of string@>
      }
      else if (++id_loc<=mod_text_end) *id_loc=@`\n'; /* will print as
      \.{"\\\\\\n"} */
    }
    if ((c=*loc++)==delim) {
      if (++id_loc<=mod_text_end) *id_loc=c;
      break;
    }
    if (c=='\\') {
      if (loc>=limit) continue;
      if (++id_loc<=mod_text_end) *id_loc = '\\';
      c=*loc++;
    }
    if (++id_loc<=mod_text_end) *id_loc=c;
  }
  if (id_loc>=mod_text_end) {
    printf("\n! String too long: ");
@.String too long@>
    ASCII_write(mod_text+1,25);
    printf("..."); mark_error;
  }
  id_loc++;
  return(string);
}
@y
@<Get a string@>= {/*spider*/
  ASCII delim = c; /* what started the string */
@#
  id_first = mod_text+1;
  id_loc = mod_text; *++id_loc=delim;
  while (1) {
    if (loc>=limit) {
      err_print("! String didn't end"); loc=limit;
@.String didn't end@>
      if (get_line()==0) {
        err_print("! Input ended in middle of string"); loc=buffer;
@.Input ended in middle of string@>
      }
      break;
    }
    if ((c=*loc++)==delim) {
      if (++id_loc<=mod_text_end) *id_loc=c;
      if (*loc==delim) loc++;
      else break;
    }
    if (++id_loc<=mod_text_end) *id_loc=c;
  }
  if (id_loc>=mod_text_end) {
    printf("\n! String too long: ");
@.String too long@>
    ASCII_write(mod_text+1,25);
    printf("..."); mark_error;
  }
  id_loc++;
  return(string);
}
@z