<!-- saved from url=(0059)file:///home/mdlowis/Source/proto/sclpl-rb/Ada%20Notes.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ada Notes</title>
-
+
<style>
* { -moz-box-sizing: border-box; box-sizing: border-box; }
*:focus { outline: none; }
a { color: deepskyblue; }
li { margin-bottom: 1rem; }
-table {
- display: block;
- width: 100%;
- overflow: auto;
- border-spacing: 0;
- border-collapse: collapse;
-}
-
code {
display: block;
padding: 1rem 1.5rem;
- white-space: pre;
+ white-space: pre-wrap;
margin: 0.2rem;
background: #F1F1F1;
border: 1px solid #E1E1E1;
padding-left: 15px;
margin-right: 0px;
}
-
-table {
- width: 100%;
- display: table;
- border-collapse: separate;
- border-color: grey;
- text-align: left;
- vertical-align: middle;
-}
-
-th, td {
- padding: 0.80rem 0.80rem;
- border-bottom: 1px solid #E1E1E1;
-}
-
-th:first-child, td:first-child {
- padding-left: 0;
-}
</style>
</head>
<body>
real_def := 'digits' static_simple_expr { range_spec }
-array_def :=
+array_def :=
-record_def :=
+record_def :=
-access_def :=
+access_def :=
-derived_def :=
+derived_def :=
-interface_def :=
+interface_def :=
# Miscellaneous
symbol := <ident> | <char-lit>
range_spec := 'range' static_simple_expr '..' static_simple_expr
static_expr :=
-static_simple_expr :=
+static_simple_expr :=
</code></div><p></p></div></article>
</section>
sym[:kind] = :var
sym[:type] = type_specifier()
if accept("=")
- sym[:value] = const_expr()
+ sym[:value] = expression()
end
end
- def const_expr()
- expect("{")
- expect("}")
- end
-
#######################################
# Function Definitions
#######################################
expect("}")
end
+ #######################################
+ # Expression Parsing
+ #######################################
+ def expression()
+ expect("{")
+ expect("}")
+ end
+
+ #######################################
+ # Parsing Primitives
+ #######################################
def error(str)
puts str
exit 1
module Main
imports (X11, XSel, Posix)
-Command is [ 1 String ]
-Command2 is [10 [5 String]]
-PointRef is **Point
-MyStruct is {
- foo : Int
- bar : [10 Int]
-}
+cmd : [String] = [ "fetch", nil, nil ]
-##Command is {
-## name : String
-##}
-#
-#cmd : Command #= [ "fetch", nil, nil ]
-#
#fetchsel(sel : String)
#{
## cmd[1] = sel;
#
#$main(args : array of String) : Int
#{
-## x : X11.Config = {0}
+## x : X11.Config = {}
## X11.init(&x)
## X11.mkwin(&x, 1, 1, X11.PropertyChangeMask)
## XSel.init(&x)