Tcl Library Source Code

Artifact [ec02b7bbb1]
Login

Artifact ec02b7bbb1e1219f83b703e7f9dc0c84a2206ecd:


# -*- text -*-
# Parsing Expression Grammar 'TEMPLATE'.
# Generated for unknown, from file 'TEST'

#
# Grammar Start Expression
#

<<MAIN>>:
         call              sym_Expression
         halt

#
# value Symbol 'Expression'
#

sym_Expression:
# (Function)

         symbol_restore    Expression
  found! jump              found_3
         loc_push
         ast_push

         call              sym_Function

   fail! value_clear
     ok! value_reduce      Expression
         symbol_save       Expression
         error_nonterminal Expression
         ast_pop_rewind
         loc_pop_discard

found_3:
     ok! ast_value_push
         return
#
# value Symbol 'Function'
#

sym_Function:
# (Sinus)

         symbol_restore    Function
  found! jump              found_6
         loc_push
         ast_push

         call              sym_Sinus

   fail! value_clear
     ok! value_reduce      Function
         symbol_save       Function
         error_nonterminal Function
         ast_pop_rewind
         loc_pop_discard

found_6:
     ok! ast_value_push
         return
#
# value Symbol 'Sinus'
#

sym_Sinus:
# x
#     's'
#     'i'
#     'n'
#     '\('
#     (Expression)
#     '\)'

         symbol_restore    Sinus
  found! jump              found_18
         loc_push
         ast_push

         call              sequence_14

   fail! value_clear
     ok! value_reduce      Sinus
         symbol_save       Sinus
         error_nonterminal Sinus
         ast_pop_rewind
         loc_pop_discard

found_18:
     ok! ast_value_push
         return

sequence_14:
# x
#     's'
#     'i'
#     'n'
#     '\('
#     (Expression)
#     '\)'

         loc_push
         error_clear

         error_push

         input_next        "t s"
     ok! test_char         "s"

         error_pop_merge
   fail! jump              failednoast_16
         error_push

         input_next        "t i"
     ok! test_char         "i"

         error_pop_merge
   fail! jump              failednoast_16
         error_push

         input_next        "t n"
     ok! test_char         "n"

         error_pop_merge
   fail! jump              failednoast_16
         error_push

         input_next        "t ("
     ok! test_char         "("

         error_pop_merge
   fail! jump              failednoast_16
         ast_push
         error_push

         call              sym_Expression

         error_pop_merge
   fail! jump              failed_15
         error_push

         input_next        "t )"
     ok! test_char         ")"

         error_pop_merge
   fail! jump              failed_15

         ast_pop_discard
         loc_pop_discard
         return

failed_15:
         ast_pop_rewind

failednoast_16:
         loc_pop_rewind
         return

#
#