Starting to mess around with parsing.

This commit is contained in:
2016-05-08 21:23:07 -07:00
parent 79a291a8e8
commit 12ef49fc7b
6 changed files with 775 additions and 38 deletions

View File

@@ -1,3 +1,5 @@
-- -*- mode: haskell -*-
-- vi: set ft=haskell :
{
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS -w #-}
@@ -43,9 +45,9 @@ $escape_char = [abfnrtv'\"\\]
$decdigit+"e""-"?$decdigit+ { emitS FloatTok}
-- Identifier
$typestart $identrest* { emitS TypeIdent }
$valstart $identrest* { emitS ValIdent }
$opident+ { emitS OpIdent }
$typestart $identrest* { emitS TypeIdent }
$valstart $identrest* { emitS ValIdent }
$opident+ { emitS (OpIdent (LeftAssoc 9)) }
-- Characters and Strings
['].['] { emitS CharTok }