Message.md

In grammar silver:langutil file Message.sv:

A Universal error/warning message data structure


closed data nonterminal Message

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 12.

A Message represents a compiler output message (error/warning)


synthesized attribute where :: Location

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 17.

The location of an error message.


synthesized attribute message :: String

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 22.

The contents of the error message.


synthesized attribute output :: String

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 27.

A recommended way to turn this message into console output with location info.


synthesized attribute noLocOutput :: String

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 32.

A recommended way to turn this message into console output without location info.


synthesized attribute severity :: Integer

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 39.

A convention for determining message severity. err=2, wrn=1, info=0 TODO: Consider making this a custom datatype.


abstract production err   (top::Message ::= l::Location m::String )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 57.

A error that should halt compilation before translation proceeds on the compilation unit the error occurs in.


abstract production wrn   (top::Message ::= l::Location m::String )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 71.

A warning that is not required to halt compilation before translation proceeds on the compilation unit the warning occurs in.


abstract production info   (top::Message ::= l::Location m::String )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 85.

An informational message that does not halt compilation, but is usually attached to an error or warning.


abstract production nested   (top::Message ::= l::Location m::String others::[Message] )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 98.

A group of messages.


function containsErrors   (Boolean ::= l::[Message] wError::Boolean )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 113.

Determines if a list has any errors (or, optionally, warnings, too)


function showMessage   (String ::= m::Message )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 123.

Show a message as a string, specially reporting undesired errors from extension-generated code.


fun messagesToString   (String ::= msgs::[Message] )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 153.

Returns a list of strings, ready to be printed to the command line.

aspect default production top::Message ::= {#aspect_default_production_silver:langutil:Message}

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 41.

(Undocumented.)


fun errFromOrigin   (Message ::= a::a m::String )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 65.

(Undocumented.)


fun wrnFromOrigin   (Message ::= a::a m::String )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 79.

(Undocumented.)


fun infoFromOrigin   (Message ::= a::a m::String )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 93.

(Undocumented.)


fun messageLte   (Boolean ::= m1::Message m2::Message )

Contained in grammar [silver:langutil]. Defined at silver/langutil/Message.sv line 158.

(Undocumented.)