/[mojave]/metaprl/mllib/comment_parse.mll
ViewVC logotype

Diff of /metaprl/mllib/comment_parse.mll

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

revision 3444 by nogin, Thu Nov 15 23:03:47 2001 UTC revision 3591 by nogin, Sun Apr 28 19:51:58 2002 UTC
# Line 236  Line 236 
236    
237  let white = [' ' '\t']+  let white = [' ' '\t']+
238  let optwhite = [' ' '\t']*  let optwhite = [' ' '\t']*
239    let newline = ['\r' '\n']+
240  let name = ['a'-'z''A'-'Z']+  let name = ['a'-'z''A'-'Z']+
241  let number = ['0'-'9']+  let number = ['0'-'9']+
242  let special = ['[' ']' ';' ',' '_' '^' '!']  let special = ['[' ']' ';' ',' '_' '^' '!']
243    
244  rule main = parse  rule main = parse
245     (* White space *)     (* White space *)
246     '\n' optwhite '*'     newline optwhite '*'
247   | '\n'   | newline
248     { TokWhite true }     { TokWhite true }
249   | white   | white
250     { TokWhite false }     { TokWhite false }
# Line 369  Line 370 
370        { parse_error_buf "string is not terminated" lexbuf }        { parse_error_buf "string is not terminated" lexbuf }
371    
372  and escape = parse  and escape = parse
373      '\n'      newline
374        { string lexbuf }        { string lexbuf }
375    | _    | _
376        { add_string (Lexing.lexeme lexbuf);        { add_string (Lexing.lexeme lexbuf);
# Line 382  Line 383 
383   * Literal forms.   * Literal forms.
384   *)   *)
385  and code_string_brace = parse  and code_string_brace = parse
386     '\n' optwhite '*'     newline optwhite '*'
387        { CodeString "\n" }        { CodeString "\n" }
388   | '}'   | '}'
389        { CodeEnd }        { CodeEnd }
# Line 392  Line 393 
393        { parse_error_buf "code string is not terminated" lexbuf }        { parse_error_buf "code string is not terminated" lexbuf }
394    
395  and code_string_end = parse  and code_string_end = parse
396     '\n' optwhite '*'     newline optwhite '*'
397        { CodeString "\n" }        { CodeString "\n" }
398   | "@end[verbatim]"   | "@end[verbatim]"
399   | "@end[literal]"   | "@end[literal]"

Legend:
Removed from v.3444  
changed lines
  Added in v.3591

  ViewVC Help
Powered by ViewVC 1.1.26