uni

University stuff
git clone git://git.margiolis.net/uni.git
Log | Files | Refs | README | LICENSE

lex.fsm (818B)


      1 START=SZ
      2 
      3 SZ:		+ \-		-> NUM
      4 		0		-> FLOAT_NORM
      5 		1-9		-> INT
      6 		\?		-> VAR
      7 		A-Z a-z		-> DEF
      8 		;		-> CMT
      9 		\s		-> SEP
     10 		"		-> STR
     11 
     12 NUM:		0		-> FLOAT_NORM
     13 		1-9		-> INT
     14 		*		-> BAD
     15 
     16 INT:		0-9		-> INT
     17 		.		-> FLOAT_DEC
     18 		\n		-> GOOD
     19 		*		-> BAD
     20 
     21 FLOAT_NORM:	0-9		-> FLOAT_NORM
     22 		e E		-> FLOAT_EXP
     23 		.		-> FLOAT_DEC
     24 		*		-> BAD
     25 FLOAT_DEC:	0-9		-> FLOAT_DEC
     26 		e E		-> FLOAT_EXP
     27 		\n		-> GOOD
     28 		*		-> BAD
     29 FLOAT_EXP:	0-9 + \-	-> FLOAT_EXP_N
     30 		*		-> BAD
     31 FLOAT_EXP_N:	0-9		-> FLOAT_EXP_N
     32 		\n		-> GOOD
     33 		*		-> BAD
     34 
     35 STR:		\\		-> STR_BSLASH
     36 		"		-> GOOD
     37 		*		-> STR
     38 STR_BSLASH:	" n \\		-> STR
     39 		*		-> BAD
     40 
     41 DEF:		A-Z a-z 0-9 _ \-	-> DEF
     42 		*		-> GOOD
     43 
     44 VAR:		A-Z a-z 0-9	-> VAR_R
     45 		*		-> BAD
     46 VAR_R:		A-Z a-z 0-9	-> VAR_R
     47 		\n		-> GOOD
     48 		*		-> BAD
     49 
     50 CMT:		\n		-> GOOD
     51 		*		-> CMT
     52 
     53 SEP:		\s		-> SEP
     54 		*		-> GOOD
     55 
     56 GOOD(OK):	\n		-> GOOD