Archived
1
This repository has been archived on 2022-08-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
mathpad/MathPad/MPMath.lm
2014-09-06 01:54:15 +02:00

16 lines
384 B
Plaintext

%option noyywrap
%{
@import Foundation;
#include "MPMath.tab.h"
%}
%%
/* Ignore Whitespaces */
[ \t\n] ;
/* Operators. Divisions are automatically transformed into fractions and dealt
with elsewhere. */
\+ { return PLUS; }
- { return MINUS; }
\* { return DOT; }
/* Numbers */
[0-9]+(\.[0-9]+)? { yylval.number = atof(yytext); return NUMBER; }
%%