"THIS FILE WAS GENERATED AUTOMATICALLY -- DO NOT EDIT!" { import: Parser } PBookParser : Parser (user fileName) PBookParser start :inputStream [ | _ok_ pos1 | _ok_ := (self tex :inputStream). ^_ok_ ] PBookParser parse :inputStream [ | _ok_ pos1 pos2 pos3 | _ok_ := ((pos1 := TokenGroup new) and: [[((self emptyLine :inputStream) or: [(self comment :inputStream) or: [(self body :inputStream)]])] whileTrue: [(pos1 add: result)]. (result := pos1)]). ^_ok_ ] PBookParser emptyLine :inputStream [ | _ok_ pos1 | _ok_ := (((pos1 := inputStream position) and: [(self eol :inputStream) and: [((result := TokenGroup new) add: #emptyLine)]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser comment :inputStream [ | lines _ok_ pos1 pos2 | _ok_ := (((pos1 := inputStream position) and: [(((self blockComment :inputStream) or: [(self lineComment :inputStream)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: lines)) ifTrue: [(self findCommentLevel :inputStream)])]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser findCommentLevel :inputStream [ | x xs _ok_ pos1 pos2 pos3 pos4 pos5 | _ok_ := (((pos1 := inputStream position) and: [(((pos2 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [(((pos3 := inputStream position) and: [(((pos4 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((self commentLevel :inputStream) and: [x := result. 1])]]) ifTrue: [(result := (inputStream := pos4) next)] ifFalse: [(inputStream := pos4). nil]) and: [(((pos4 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos4 add: result)]. (result := pos4)]) and: [xs := result. 1])]]) or: [(inputStream position: pos3)])]]) ifTrue: [(result := (inputStream := pos2) next)] ifFalse: [(inputStream := pos2). nil]) and: [((result := TokenGroup new) concat: x; concat: xs)]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser commentLevel :inputStream [ | chars _ok_ pos1 pos2 | _ok_ := ((((pos1 := inputStream position) and: [(self string: '###' :inputStream) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [chars := result. 1]) and: [((result := TokenGroup new) add: #header3; add: chars)]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [(self string: '##' :inputStream) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [chars := result. 1]) and: [((result := TokenGroup new) add: #header2; add: chars)]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == 35) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [chars := result. 1]) and: [((result := TokenGroup new) add: #header1; add: chars)]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [chars := result. 1]) and: [((result := TokenGroup new) add: #comment; add: chars)]]) or: [(inputStream position: pos1)])]]]). ^_ok_ ] PBookParser blockComment :inputStream [ | x _ok_ pos1 pos2 pos3 pos4 | _ok_ := (((pos1 := inputStream position) and: [((inputStream peek == 34) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [(((((pos3 := inputStream position) and: [(((pos4 := inputStream position) and: [((inputStream peek == 34) ifTrue: [result := inputStream next. 1])]) ifTrue: [(inputStream position: pos4)] ifFalse: [1]) and: [(inputStream notAtEnd and: [result := inputStream next. 1])]]) or: [(inputStream position: pos3)])) ifTrue: [(pos2 add: result). 1]) and: [[(((pos3 := inputStream position) and: [(((pos4 := inputStream position) and: [((inputStream peek == 34) ifTrue: [result := inputStream next. 1])]) ifTrue: [(inputStream position: pos4)] ifFalse: [1]) and: [(inputStream notAtEnd and: [result := inputStream next. 1])]]) or: [(inputStream position: pos3)])] whileTrue: [(pos2 add: result)]. (result := pos2). 1]]) and: [x := result. 1]) and: [((inputStream peek == 34) ifTrue: [result := inputStream next. 1]) and: [((pos2 := TokenGroup new) and: [[(((pos3 := inputStream position) and: [(((pos4 := inputStream position) and: [(self eol :inputStream)]) ifTrue: [(inputStream position: pos4)] ifFalse: [1]) and: [(inputStream notAtEnd and: [result := inputStream next. 1])]]) or: [(inputStream position: pos3)])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [(((self eol :inputStream)) ifTrue: [result := TokenGroup with: result] ifFalse: [result := TokenGroup new]) and: [((result := TokenGroup new) add: x)]]]]]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser lineComment :inputStream [ | c ret _ok_ pos1 pos2 pos3 pos4 pos5 pos6 | _ok_ := ((pos1 := TokenGroup new) and: [(((((pos2 := inputStream position) and: [((inputStream peek == 37) ifTrue: [result := inputStream next. 1]) and: [(((pos3 := TokenGroup new) and: [[(((pos4 := inputStream position) and: [(((pos5 := inputStream position) and: [(self eol :inputStream)]) ifTrue: [(inputStream position: pos5)] ifFalse: [1]) and: [(inputStream notAtEnd and: [result := inputStream next. 1])]]) or: [(inputStream position: pos4)])] whileTrue: [(pos3 add: result)]. (result := pos3)]) and: [c := result. 1]) and: [((((self eol :inputStream)) ifTrue: [result := TokenGroup with: result] ifFalse: [result := TokenGroup new]) and: [ret := result. 1]) and: [((result := TokenGroup new) concat: c; concat: ret)]]]]) or: [(inputStream position: pos2)])) ifTrue: [(pos1 add: result). 1]) and: [[(((pos2 := inputStream position) and: [((inputStream peek == 37) ifTrue: [result := inputStream next. 1]) and: [(((pos3 := TokenGroup new) and: [[(((pos4 := inputStream position) and: [(((pos5 := inputStream position) and: [(self eol :inputStream)]) ifTrue: [(inputStream position: pos5)] ifFalse: [1]) and: [(inputStream notAtEnd and: [result := inputStream next. 1])]]) or: [(inputStream position: pos4)])] whileTrue: [(pos3 add: result)]. (result := pos3)]) and: [c := result. 1]) and: [((((self eol :inputStream)) ifTrue: [result := TokenGroup with: result] ifFalse: [result := TokenGroup new]) and: [ret := result. 1]) and: [((result := TokenGroup new) concat: c; concat: ret)]]]]) or: [(inputStream position: pos2)])] whileTrue: [(pos1 add: result)]. (result := pos1). 1]]). ^_ok_ ] PBookParser body :inputStream [ | lines _ok_ pos1 pos2 | _ok_ := (((pos1 := inputStream position) and: [(((pos2 := TokenGroup new) and: [(((self line :inputStream)) ifTrue: [(pos2 add: result). 1]) and: [[(self line :inputStream)] whileTrue: [(pos2 add: result)]. (result := pos2). 1]]) and: [lines := result. 1]) and: [((result := TokenGroup new) add: #body; concat: lines)]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser line :inputStream [ | chars ret _ok_ pos1 pos2 pos3 pos4 | _ok_ := (((pos1 := inputStream position) and: [(((pos2 := inputStream position) and: [(self comment :inputStream)]) ifTrue: [(inputStream position: pos2)] ifFalse: [1]) and: [(((pos2 := TokenGroup new) and: [[(((pos3 := inputStream position) and: [(((pos4 := inputStream position) and: [(self eol :inputStream)]) ifTrue: [(inputStream position: pos4)] ifFalse: [1]) and: [(inputStream notAtEnd and: [result := inputStream next. 1])]]) or: [(inputStream position: pos3)])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [chars := result. 1]) and: [((((self eol :inputStream)) ifTrue: [result := TokenGroup with: result] ifFalse: [result := TokenGroup new]) and: [ret := result. 1]) and: [((result := TokenGroup new) concat: chars; concat: ret)]]]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser eol :inputStream [ | _ok_ pos1 | _ok_ := ((self string: '\015\012' :inputStream) or: [((inputStream peek == 10) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 13) ifTrue: [result := inputStream next. 1])]]). ^_ok_ ] PBookParser eof :inputStream [ | _ok_ pos1 pos2 | _ok_ := (((pos1 := inputStream position) and: [(inputStream notAtEnd and: [result := inputStream next. 1])]) ifTrue: [(inputStream position: pos1)] ifFalse: [1]). ^_ok_ ] PBookParser html :inputStream [ | _ok_ pos1 | _ok_ := ((inputStream pushGroup: (TokenGroup new add: (((self parse :inputStream)) ifTrue: [result] ifFalse: [result]))) ifTrue: [(self renderHtml :inputStream)]). ^_ok_ ] PBookParser renderHtml :inputStream [ | _ok_ pos1 pos2 pos3 pos4 pos5 pos6 | _ok_ := (((pos1 := inputStream position) and: [(self htmlHeader :inputStream) and: [(((pos2 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos3 := TokenGroup new) and: [[(((pos4 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [(self renderHtmlSection :inputStream)]]) ifTrue: [(result := (inputStream := pos4) next)] ifFalse: [(inputStream := pos4). nil])] whileTrue: [(pos3 add: result)]. (result := pos3)])]]) ifTrue: [(result := (inputStream := pos2) next)] ifFalse: [(inputStream := pos2). nil])]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser htmlHeader :inputStream [ | _ok_ pos1 | _ok_ := ([ '' put . 1] value). ^_ok_ ] PBookParser renderHtmlSection :inputStream [ | lines _ok_ pos1 pos2 | _ok_ := ((((pos1 := inputStream position) and: [((inputStream peek == #header1) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'h1'; add: lines)) ifTrue: [(self renderHtmlTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #header2) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'h2'; add: lines)) ifTrue: [(self renderHtmlTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #header3) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'h3'; add: lines)) ifTrue: [(self renderHtmlTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #comment) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'p'; add: lines)) ifTrue: [(self renderHtmlTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #body) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'pre'; add: lines)) ifTrue: [(self renderHtmlTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #emptyLine) ifTrue: [result := inputStream next. 1]) and: [((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [([ '\n' put . 1] value)]]]) or: [(inputStream position: pos1)])]]]]]). ^_ok_ ] PBookParser renderHtmlTag :inputStream [ | tag lines _ok_ pos1 | _ok_ := (((pos1 := inputStream position) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [tag := result. 1]) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [lines := result. 1]) and: [([ ('<', tag, '>') putln. . 1] value) and: [((inputStream pushGroup: (TokenGroup new add: lines)) ifTrue: [(self renderHtmlLines :inputStream)]) and: [([ ('') putln. . 1] value)]]]]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser renderHtmlLines :inputStream [ | _ok_ pos1 pos2 pos3 pos4 pos5 pos6 pos7 | _ok_ := (((pos1 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos2 := TokenGroup new) and: [[(((pos3 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos4 := TokenGroup new) and: [[(self renderHtmlChar :inputStream)] whileTrue: [(pos4 add: result)]. (result := pos4)])]]) ifTrue: [(result := (inputStream := pos3) next)] ifFalse: [(inputStream := pos3). nil])] whileTrue: [(pos2 add: result)]. (result := pos2)])]]) ifTrue: [(result := (inputStream := pos1) next)] ifFalse: [(inputStream := pos1). nil]). ^_ok_ ] PBookParser renderHtmlChar :inputStream [ | char _ok_ pos1 | _ok_ := ((((pos1 := inputStream position) and: [((inputStream peek == 60) ifTrue: [result := inputStream next. 1]) and: [([ '<' put . 1] value)]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == 62) ifTrue: [result := inputStream next. 1]) and: [([ '>' put . 1] value)]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == 34) ifTrue: [result := inputStream next. 1]) and: [([ '"' put . 1] value)]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == 38) ifTrue: [result := inputStream next. 1]) and: [([ '&' put . 1] value)]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [char := result. 1]) and: [([ char put . 1] value)]]) or: [(inputStream position: pos1)])]]]]). ^_ok_ ] PBookParser tex :inputStream [ | _ok_ pos1 | _ok_ := ((inputStream pushGroup: (TokenGroup new add: (((self parse :inputStream)) ifTrue: [result] ifFalse: [result]))) ifTrue: [(self renderTex :inputStream)]). ^_ok_ ] PBookParser renderTex :inputStream [ | _ok_ pos1 pos2 pos3 pos4 pos5 pos6 | _ok_ := (((pos1 := inputStream position) and: [(self texHeader :inputStream) and: [(((pos2 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos3 := TokenGroup new) and: [[(((pos4 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [(self renderTexSection :inputStream)]]) ifTrue: [(result := (inputStream := pos4) next)] ifFalse: [(inputStream := pos4). nil])] whileTrue: [(pos3 add: result)]. (result := pos3)])]]) ifTrue: [(result := (inputStream := pos2) next)] ifFalse: [(inputStream := pos2). nil]) and: [(self texFooter :inputStream)]]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser texHeader :inputStream [ | _ok_ pos1 | _ok_ := ([ (' \\documentclass[notitlepage,a4paper]{article} \\usepackage{fullpage} \\title{', fileName, '} \\author{', user, '} \\begin{document} \\maketitle \\tableofcontents ') put . 1] value). ^_ok_ ] PBookParser texFooter :inputStream [ | _ok_ pos1 | _ok_ := ([ '\\end{document}' putln . 1] value). ^_ok_ ] PBookParser renderTexSection :inputStream [ | lines _ok_ pos1 pos2 | _ok_ := ((((pos1 := inputStream position) and: [((inputStream peek == #header1) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'section'; add: lines)) ifTrue: [(self renderTexTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #header2) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'subsection'; add: lines)) ifTrue: [(self renderTexTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #header3) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: 'subsubsection'; add: lines)) ifTrue: [(self renderTexTag :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #comment) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: lines)) ifTrue: [(self renderTexLines :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #body) ifTrue: [result := inputStream next. 1]) and: [(((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [lines := result. 1]) and: [((inputStream pushGroup: (TokenGroup new add: lines)) ifTrue: [(self renderTexVerbatim :inputStream)])]]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream peek == #emptyLine) ifTrue: [result := inputStream next. 1]) and: [((pos2 := TokenGroup new) and: [[(inputStream notAtEnd and: [result := inputStream next. 1])] whileTrue: [(pos2 add: result)]. (result := pos2)]) and: [([ '\n' put . 1] value)]]]) or: [(inputStream position: pos1)])]]]]]). ^_ok_ ] PBookParser renderTexTag :inputStream [ | tag lines _ok_ pos1 | _ok_ := (((pos1 := inputStream position) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [tag := result. 1]) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [lines := result. 1]) and: [([ ('\n\\', tag, '\173') put . 1] value) and: [((inputStream pushGroup: (TokenGroup new add: lines)) ifTrue: [(self renderTexLines :inputStream)]) and: [([ '\175' putln . 1] value)]]]]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser renderTexVerbatim :inputStream [ | lines _ok_ pos1 | _ok_ := (((pos1 := inputStream position) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [lines := result. 1]) and: [([ '\\begin\{verbatim\}' putln . 1] value) and: [((inputStream pushGroup: (TokenGroup new add: lines)) ifTrue: [(self renderTexVerbatimLines :inputStream)]) and: [([ '\\end\{verbatim\}' putln . 1] value)]]]]) or: [(inputStream position: pos1)]). ^_ok_ ] PBookParser renderTexLines :inputStream [ | _ok_ pos1 pos2 pos3 pos4 pos5 pos6 pos7 | _ok_ := (((pos1 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos2 := TokenGroup new) and: [[(((pos3 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos4 := TokenGroup new) and: [[(self renderTexChar :inputStream)] whileTrue: [(pos4 add: result)]. (result := pos4)])]]) ifTrue: [(result := (inputStream := pos3) next)] ifFalse: [(inputStream := pos3). nil])] whileTrue: [(pos2 add: result)]. (result := pos2)])]]) ifTrue: [(result := (inputStream := pos1) next)] ifFalse: [(inputStream := pos1). nil]). ^_ok_ ] PBookParser renderTexChar :inputStream [ | char _ok_ pos1 pos2 | _ok_ := ((((pos1 := inputStream position) and: [((((inputStream peek == 35) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 37) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 38) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 126) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 36) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 95) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 94) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 123) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 125) ifTrue: [result := inputStream next. 1])]]]]]]]]) and: [char := result. 1]) and: [((result := [ '\\' put. char put ] value) or: [1])]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((((inputStream peek == 60) ifTrue: [result := inputStream next. 1]) or: [((inputStream peek == 62) ifTrue: [result := inputStream next. 1])]) and: [char := result. 1]) and: [((result := [ $$ put. char put. $$ put ] value) or: [1])]]) or: [(inputStream position: pos1)]) or: [(((pos1 := inputStream position) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [char := result. 1]) and: [([ char put . 1] value)]]) or: [(inputStream position: pos1)])]]). ^_ok_ ] PBookParser renderTexVerbatimLines :inputStream [ | _ok_ pos1 pos2 pos3 pos4 pos5 pos6 pos7 | _ok_ := (((pos1 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos2 := TokenGroup new) and: [[(((pos3 := inputStream) and: [(inputStream := self beginStructure: inputStream) and: [((pos4 := TokenGroup new) and: [[(self renderTexVerbatimChar :inputStream)] whileTrue: [(pos4 add: result)]. (result := pos4)])]]) ifTrue: [(result := (inputStream := pos3) next)] ifFalse: [(inputStream := pos3). nil])] whileTrue: [(pos2 add: result)]. (result := pos2)])]]) ifTrue: [(result := (inputStream := pos1) next)] ifFalse: [(inputStream := pos1). nil]). ^_ok_ ] PBookParser renderTexVerbatimChar :inputStream [ | char _ok_ pos1 | _ok_ := (((pos1 := inputStream position) and: [((inputStream notAtEnd and: [result := inputStream next. 1]) and: [char := result. 1]) and: [([ char put . 1] value)]]) or: [(inputStream position: pos1)]). ^_ok_ ]