1 /* François Thomasset -- INRIA Rocquencourt -- Octobre 2001 *)
3 (* Translation from Maple to MuPad : syntaxic specification of maple *)
6 Copyright © 2001-2002 François Thomasset, all rights reserved.
7 All of Dan Stanger's changes are Copyright © 2021 Dan Stanger, all rights reserved.
8 Copying is covered by the GNU General Public License (GPL).
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details. */
20 lexer grammar mapleLexer ;
21 COMMENT : '#' ~[\b]* ;
22 BACKSPACE : [\b] {setText(";"); setType(SEMICOLON); };
23 WS : [ \t\r\n]+ -> skip ;
46 REPEAT_COMPOSE : '@@' ;
48 // : ;'&' [ ^' ' '\t' '\r' '\n' '*' '&' '(' ')' '[' ']' '{' '}' ';' ':' '\'' '`' '#' ]+
49 // : ;{ AMPOP ( String.sub (lexeme lexbuf) 1 ( String.length (lexeme lexbuf) - 1 ) ) }
90 INTERSECT : 'intersect' ;
94 ID : LETTER (LETTER | [0-9])* ;
95 fragment LETTER : [a-zA-Z_] ;
96 DOUBLEQUOTE : '"' .*? '"' ;
97 BACKQUOTE : '`' .*? '`' ;
98 QUOTE : '\'' .*? '\'' ;