Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old TODO #208

Open
Ericson2314 opened this issue Oct 17, 2021 · 0 comments
Open

Old TODO #208

Ericson2314 opened this issue Oct 17, 2021 · 0 comments

Comments

@Ericson2314
Copy link
Collaborator

This was the contents of the old TODO file. We should triage these at some point and put in their own issues.

* happyError should take the current token as an argument in %lexer mode;
  it's silly not to, because it means the monad has to keep track of the
  previous token in order to report it in the error message.

* BUG in error handling without %lexer: see tests/ParGF.y

* allow polymorphic type signatures for productions.
* allow omitted semnatic values, defaulting to $1?

* unlit properly

* maintain indentation in code between { } so that layout works.

-OLD-------------------------------------------------------------------------

1. Add in a simple lexical analyser

2. Add in choice for lexical analyis

%lexerstyle original		-- the default
%lexerstyle auto	
%lexerstyle monadic

---[1] :: [Token] -> a ---------------------------------------------------------

 As things are now :-(
	
---[2] :: String -> a ----------------------------------------------------------

 Using the special lexer, as defined using

  %macro letter		( [A-Z][a-z] )
  %autotoken
	id		( {letter}({digit}|{letter}) )

---[3] :: ParseM Token -> ParseM a ---------------------------------------------

    This presumes the exsitance of the defintions:

	type ParseM a b c = a -> ParseR a b
	data ParseR a b c = ParseSucc a b | ParseFail c
	thenPM :: a -> ParseM a b c
	returnPM :: ParseM a b c -> (a -> ParseM d b c) -> ParseM d b c -> 

    and is intended for *serious* parsers, like our Haskell parser.


    You need to give a %eof 

-----------------------------------------------------------------------------

******************************************************************************

ToAdd:

	--magic-name Sad

	allows other names to be used as the *Magic* name, currently
	only Happy.
Ericson2314 added a commit that referenced this issue Oct 17, 2021
Its contents are now issue #208 to be triaged.
Ericson2314 added a commit that referenced this issue Oct 20, 2021
Its contents are now issue #208 to be triaged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant