Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /ml-burg/trunk/burg-lex.sml
ViewVC logotype

Diff of /ml-burg/trunk/burg-lex.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2686, Tue Jun 5 02:19:57 2007 UTC revision 2687, Tue Jun 5 02:20:04 2007 UTC
# Line 175  Line 175 
175          (* current input stream *)          (* current input stream *)
176          val yystrm = ref yyins          val yystrm = ref yyins
177          (* get one char of input *)          (* get one char of input *)
178          val yygetc = yyInput.getc          val yylastwasnref = ref true
179            fun yygetc strm = (case yyInput.getc strm
180                  of NONE => NONE
181                   | SOME (#"\n", strm') => (yylastwasnref := true; SOME (#"\n", strm'))
182                   | SOME (c, strm') => (yylastwasnref := false; SOME (c, strm'))
183                 (* end case *))
184          (* create yytext *)          (* create yytext *)
185          fun yymktext(strm) = yyInput.subtract (strm, !yystrm)          fun yymktext(strm) = yyInput.subtract (strm, !yystrm)
186          open UserDeclarations          open UserDeclarations
187          fun lex          fun lex
188  (yyarg as ()) = let  (yyarg as ()) = let
189       fun continue() = let       fun continue() = let
190                val yylastwasn = !yylastwasnref
191              fun yystuck (yyNO_MATCH) = raise Fail "stuck state"              fun yystuck (yyNO_MATCH) = raise Fail "stuck state"
192                | yystuck (yyMATCH (strm, action, old)) =                | yystuck (yyMATCH (strm, action, old)) =
193                    action (strm, old)                    action (strm, old)

Legend:
Removed from v.2686  
changed lines
  Added in v.2687

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0