Permalink
Browse files

added a quick text file with my ideas about how to re-do function cal…

…ls and statements to be more consisten and support nargou and nargin
  • Loading branch information...
Whiteknight committed Jan 27, 2010
1 parent d1c2bcb commit ef9b28fbdc3a20403de741e72b9d5d0eb133f28d
Showing with 47 additions and 0 deletions.
  1. +47 −0 src/parser/grammar-plan.txt
@@ -0,0 +1,47 @@
rule statement {
| <matrix_literal> = <accessor>
# _matrix_literal = !build_matrix_literal(elements)
# _nargsout = _matrix_literal.'get_nargs'()
# _accessor = !build_accessor(args)
# _result = _accessor.'get_result'(_nargsout)
# _matrix_literal.'assign_result'(_result)
| <accessor> = <accessor>
# _accessor1 = !build_accessor(args1)
# _nargsout = _accessor1.'get_nargs'() # always == 1
# _accessor2 = !build_accessor(args2)
# _result = _accessor.'get_result'(_nargsout)
# _accessor.'assign_result'(_result)
| <accessor> = <matrix_literal>
# _accessor = !build_access(args)
# _nargsout = accessor.'get_nargs'() # always == 1
# _matrix_literal = !build_matrix_literal(elements)
# _result = _matrix_literal.'get_result'(_nargsout)
# _accessor.'assign_result'(_result)
| <matrix_literal>
# _ans = !get_ans()
# _nargsout = _ans.'get_nargs'() # always 1
# _matrix_literal = !build_matrix_literal(elements)
# _result = _matrix_literal.'get_result'(_nargsout)
# _ans.'assign_result'(_result)
| <accessor>
# _ans = !get_ans()
# _nargsout = _ans.'get_nargs'()
# _matrix_literal = !build_matrix_literal(elements)
# _result = _matrix_literal.'get_result'(_nargsout)
# _ans.'assign_result'(_result)
}
rule accessor {
| <name> '(' <args> ')'
| <name>
}
_accessor = !build_accessor(args)
rule matrix_literal {
'[' <elements> ']'
}
_matrix_literal = !build_matrix_literal(elements)

0 comments on commit ef9b28f

Please sign in to comment.