(* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. *) program() import sys.posix.stdio, std, elna.lexer, elna.ast, elna.parser var global_cursor: ElnaLexerCursor sample_source_text := "Here.a few (* documentation block *) or #size if '\\n' `У` \"некоторая строка\" 23 -- End line comment\0" token: ^ElnaLexerToken tree: StdOptional#[ElnaAstUnit] begin elna_lexer_transitions(); global_cursor := { ElnaLexerCursor; start: sample_source_text.ptr, cursor: sample_source_text.ptr, position: 1u }; tree := elna_parser_program(@global_cursor); puts("void main(){}\0".ptr) end.