diff --git a/web/CXM_cookies.anubis b/web/CXM_cookies.anubis index b2da482..76cf936 100644 --- a/web/CXM_cookies.anubis +++ b/web/CXM_cookies.anubis @@ -141,7 +141,31 @@ define Bool if c +< 124 then false else if c = 124 then true else c = 126. - + + value char are token added of =, (, ) + +define Bool + is_value_char + ( + Word8 c + ) = + if c +< 33 then false else + if c +< 34 then true else + if c +< 35 then false else + if c +< 44 then true else + if c +< 45 then false else + if c +< 47 then true else + if c +< 48 then false else + if c +< 58 then true else + if c +< 61 then false else + if c +< 62 then true else + if c +< 65 then false else + if c +< 91 then true else + if c +< 94 then false else + if c +< 123 then true else + if c +< 124 then false else + if c = 124 then true else + c = 126. From the grammar, it is clear that atomic entities (called 'tokens' by YACC) are: @@ -215,14 +239,15 @@ define One define Atom read_token ( - List(Word8) so_far // contains at least 1 character + List(Word8) so_far, // contains at least 1 character + (Word8) -> Bool is_valid_char ) = if next_char is { - failure then recognize_keyword(implode(reverse(so_far))), - success(c) then - if is_token_char(c) - then read_token([c . so_far]) + failure then recognize_keyword(implode(reverse(so_far))), + success(c) then + if is_valid_char(c) + then read_token([c . so_far], is_valid_char) else unput_char; recognize_keyword(implode(reverse(so_far))) }. @@ -260,7 +285,7 @@ define Atom failure then end_of_input, success(c) then if is_blank(c) then read_atom else // skip blanks - if is_token_char(c) then read_token([c]) else + if is_token_char(c) then read_token([c], is_token_char) else if c = '\"' then read_quoted_string([]) else if c = '=' then equals else if c = ':' then colon else @@ -271,7 +296,26 @@ define Atom unput_atoms <- t; h }. - +define Atom + read_value + = + if *unput_atoms is + { + [ ] then + if next_char is + { + failure then end_of_input, + success(c) then + if is_blank(c) then read_value else // skip blanks + if is_value_char(c) then read_token([c], is_value_char) else + if c = '\"' then read_quoted_string([]) else + if c = ';' then semi_colon else + error + }, + [h . t] then + unput_atoms <- t; h + }. + Reading an attribute-value pair. type AttrVal: @@ -422,7 +466,8 @@ define Maybe(Cookie) ) = if read_attr_val is { - failure then success(cookie( + failure then + success(cookie( *server_name, name, value, @@ -442,7 +487,8 @@ define Maybe(Cookie) ( String name ) = - with a = read_atom, + with a = read_value, + if a is token(value) then read_cookie_n_e_v(name,value,[]) else if a is quoted_string(value) then read_cookie_n_e_v(name,value,[]) else unput_atom(a); failure. diff --git a/web/CXM_making_a_web_site.anubis b/web/CXM_making_a_web_site.anubis index d7d8eab..35e633d 100644 --- a/web/CXM_making_a_web_site.anubis +++ b/web/CXM_making_a_web_site.anubis @@ -1836,7 +1836,6 @@ define (String state_name) -> PreviousState($State) ) = (String state_name) |-> with file_path = state_directory+"/s"+state_name, - //println("Retreive state ["+file_path+"]"); if (RetrieveResult((Int,$State)))retrieve(file_path) is ok(d) then ( if d is (time_stamp,s) then diff --git a/web/jQuery/CXM_jquery_button.anubis b/web/jQuery/CXM_jquery_button.anubis index e77adcc..9411044 100644 --- a/web/jQuery/CXM_jquery_button.anubis +++ b/web/jQuery/CXM_jquery_button.anubis @@ -9,7 +9,7 @@ read calexium_lib/web/CXM_making_a_web_site.anubis read calexium_lib/web/CXM_jquery.anubis -read calexium_lib/web/CXM_jquery_icons.anubis +read calexium_lib/web/jQuery/CXM_jquery_icons.anubis read tools/basis.anubis read system/string.anubis diff --git a/web/jQuery/CXM_jquery_datatable.anubis b/web/jQuery/CXM_jquery_datatable.anubis index f542a02..aadd7cd 100644 --- a/web/jQuery/CXM_jquery_datatable.anubis +++ b/web/jQuery/CXM_jquery_datatable.anubis @@ -9,8 +9,8 @@ read calexium_lib/web/CXM_making_a_web_site.anubis read calexium_lib/web/CXM_jquery.anubis -read calexium_lib/web/CXM_jquery_datatable_types.anubis -read calexium_lib/web/jquery/CXM_jquery_datatable_translation.anubis +read calexium_lib/web/jQuery/CXM_jquery_datatable_types.anubis +read calexium_lib/web/jQuery/CXM_jquery_datatable_translation.anubis read tools/basis.anubis read system/string.anubis read system/convert.anubis diff --git a/web/jQuery/CXM_jquery_eudock.anubis b/web/jQuery/CXM_jquery_eudock.anubis index ed2821f..6eaacf7 100644 --- a/web/jQuery/CXM_jquery_eudock.anubis +++ b/web/jQuery/CXM_jquery_eudock.anubis @@ -9,7 +9,7 @@ read calexium_lib/web/CXM_making_a_web_site.anubis read calexium_lib/web/CXM_jquery.anubis -read calexium_lib/web/CXM_jquery_eudock_types.anubis +read calexium_lib/web/jQuery/CXM_jquery_eudock_types.anubis read tools/basis.anubis read system/string.anubis read system/convert.anubis -- libgit2 0.21.4