• 请不要在回答技术问题时复制粘贴 AI 生成的内容
hackingwu
V2EX  ›  程序员

有了解 LEX&YACC 的进来讨论讨论

  •  
  •   hackingwu ·
    hackingwu · Apr 7, 2017 · 1774 views
    This topic created in 3331 days ago, the information mentioned may be changed or developed.

    是否存在办法可以指定 Action 的执行顺序

    targetA: sub1 sub2 { printf("target"); } sub1 : a { printf("sub1"); } sub2 : b { printf("sub2"); }

    以上是范例,模式匹配的时候按照 sub1 sub2 的顺序 即( a b),但是 Action 执行的顺序希望是 sub2 sub1 的顺序执行, 即希望 output 结果 是 sub2sub1target 请问有可能实现吗,如何实现?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1394 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:12 · PVG 01:12 · LAX 10:12 · JFK 13:12
    ♥ Do have faith in what you're doing.