PreviousUpNext

15.3.183  src/lib/compiler/back/low/tools/parser/architecture-description-language-parser.api

## architecture-description-language-parser.api
#
# Parse an architecture definition such as that in
#
#     src/lib/compiler/back/low/intel32/one_word_int.architecture-description
#
# and return the resulting raw-syntax parsetree.

# Compiled by:
#     src/lib/compiler/back/low/tools/architecture-parser.lib




###               "I was so obsessed by this problem that
###                I was thinking about it all the time --
###                when I woke up in the morning,
###                when I went to sleep at night --
###                and that went on for eight years."
###
###                                -- Andrew Wiles


stipulate
    package fil =  file__premicrothread;                                                                        # file__premicrothread  is from   src/lib/std/src/posix/file--premicrothread.pkg
    package raw =  adl_raw_syntax_form;                                                                         # adl_raw_syntax_form   is from   src/lib/compiler/back/low/tools/adl-syntax/adl-raw-syntax-form.pkg
herein

    # This api is implemented in:
    #     src/lib/compiler/back/low/tools/parser/architecture-description-language-parser-g.pkg

    api Architecture_Description_Language_Parser {
        #
        exception PARSE_ERROR;
        #
        load          :         String -> List( raw::Declaration );                                             # 'String' is something like "src/lib/compiler/back/low/intel32/one_word_int.architecture-description"
        load'         : Bool -> String -> List( raw::Declaration );                                             # 'Bool' is 'silent' -- a narrative-verbosity control.  (Defaults to FALSE above.)
        #
        parse         :         (String, fil::Input_Stream) -> List( raw::Declaration );                        # 'String' as above, 'Input_Stream' is open on it. ('load' just opens the given file and calls 'parse', essentially.)
        parse'        : Bool -> (String, fil::Input_Stream) -> List( raw::Declaration );                        # 'Bool'   as above.
        #
        parse_string  :         String -> List( raw::Declaration );                                             # Parse architecture description directly from 'String' (instead of from a file).
        parse_string' : Bool -> String -> List( raw::Declaration );                                             # 'Bool'   as above.
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext